1 # *****************************************************************************
2 # * Copyright (c) 2004, 2011 IBM Corporation
3 # * All rights reserved.
4 # * This program and the accompanying materials
5 # * are made available under the terms of the BSD License
6 # * which accompanies this distribution, and is available at
7 # * http://www.opensource.org/licenses/bsd-license.php
10 # * IBM Corporation - initial implementation
11 # ****************************************************************************/
13 BOARD_TARGETS = tools_build romfs_build clients_build stage1 subdirs
17 COMMON_LIBS = libc libbootmsg libbases libnvram libelf libhvcall libvirtio libusb \
23 .PHONY : subdirs $(SUBDIRS) clean distclean
27 include $(TOPCMNDIR)/make.rules
28 include $(TOPCMNDIR)/Makefile.gen
32 $(SUBDIRS): common-libs
33 @echo " ====== Building $@ ======"
34 $(MAKE) -C $@ $(MAKEARG) RELEASE=-DRELEASE=\"\\\"$(RELEASE)\\\"\"
37 @echo " ====== Building llfw ======"
38 $(MAKE) -C llfw RELEASE=-DRELEASE=\"\\\"$(RELEASE)\\\"\"
44 clean: clean_here clean_gen
45 @for dir in $(SUBDIRS); do \
46 $(MAKE) -C $$dir clean || exit 1; \
49 @$(MAKE) -C llfw clean
51 distclean: clean_here distclean_gen
52 @for dir in $(SUBDIRS); do \
53 $(MAKE) -C $$dir distclean || exit 1; \
59 @rm -rf ../driver-$(RELEASE)
60 @mkdir -p ../driver-$(RELEASE)
63 @mv ../boot_rom.bin ../driver-$(RELEASE)/$(RELEASE)-slof.bin
64 @cp ../VERSION ../driver-$(RELEASE)
65 @cp changes.txt ../driver-$(RELEASE)
66 @cd ../driver-$(RELEASE) && md5sum * > md5sum.txt
67 @chmod 644 ../driver-$(RELEASE)/*
68 @mv ../driver-$(RELEASE) ../driver-$(RELEASE)-`date +%Y-%h%d`
69 @tar czf ../driver-$(RELEASE)-`date +%Y-%h%d`.tar.gz \
70 ../driver-$(RELEASE)-`date +%Y-%h%d` > /dev/null 2>&1
71 @rm -rf ../driver-$(RELEASE)-`date +%Y-%h%d`
73 driver: driver_prep clean .tar_gz