Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / board-qemu / Makefile
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
8 # *
9 # * Contributors:
10 # *     IBM Corporation - initial implementation
11 # ****************************************************************************/
12
13 BOARD_TARGETS = tools_build romfs_build clients_build stage1 subdirs
14
15 SUBDIRS = slof
16
17 COMMON_LIBS = libc libbootmsg libbases libnvram libelf libhvcall libvirtio libusb \
18               libveth libe1k
19
20 all: $(BOARD_TARGETS)
21         $(MAKE) boot_rom.bin
22
23 .PHONY : subdirs $(SUBDIRS) clean distclean
24
25 include config
26 include Makefile.dirs
27 include $(TOPCMNDIR)/make.rules
28 include $(TOPCMNDIR)/Makefile.gen
29
30 subdirs: $(SUBDIRS)
31
32 $(SUBDIRS): common-libs
33         @echo " ====== Building $@ ======"
34         $(MAKE) -C $@ $(MAKEARG) RELEASE=-DRELEASE=\"\\\"$(RELEASE)\\\"\"
35
36 stage1: common-libs
37         @echo " ====== Building llfw ======"
38         $(MAKE) -C llfw RELEASE=-DRELEASE=\"\\\"$(RELEASE)\\\"\"
39
40 clean_here:
41         rm -f ../slof/OF.ffs
42         rm -f ../boot_rom.bin
43
44 clean:  clean_here clean_gen
45         @for dir in $(SUBDIRS); do \
46                 $(MAKE) -C $$dir clean || exit 1; \
47         done
48         rm -f ../boot_rom.bin 
49         @$(MAKE) -C llfw clean
50
51 distclean:      clean_here distclean_gen
52         @for dir in $(SUBDIRS); do \
53                 $(MAKE) -C $$dir distclean || exit 1; \
54         done
55         rm -f ../boot_rom.bin 
56         $(MAKE) -C llfw clean
57
58 .driver_dirs:
59         @rm -rf ../driver-$(RELEASE)
60         @mkdir -p ../driver-$(RELEASE)
61
62 .tar_gz:        .driver_dirs
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`
72
73 driver:         driver_prep clean .tar_gz