Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / board-js2x / Makefile
1 # *****************************************************************************
2 # * Copyright (c) 2004, 2008 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 rtas 
16 COMMON_LIBS = libc libipmi libbootmsg libbases libnvram libelf libusb libbcm
17
18 all: $(BOARD_TARGETS)
19         $(MAKE) boot_rom.bin
20
21 .PHONY : subdirs $(SUBDIRS) clean distclean
22
23 include config
24 include Makefile.dirs
25 include $(TOPCMNDIR)/make.rules
26 include $(TOPCMNDIR)/Makefile.gen
27
28 subdirs: $(SUBDIRS)
29
30 $(SUBDIRS): common-libs
31         @echo " ====== Building $@ ======"
32         $(MAKE) -C $@ $(MAKEARG)
33
34 stage1: common-libs
35         @echo " ====== Building llfw ======"
36         $(MAKE) -C llfw RELEASE=-DRELEASE=\"\\\"$(RELEASE)\\\"\"
37
38 clean_here:
39         rm -f ../slof/OF.ffs
40         rm -f ../boot_rom.bin
41
42 clean:          clean_here clean_gen
43         @for dir in $(SUBDIRS); do \
44                 $(MAKE) -C $$dir clean || exit 1; \
45         done
46         rm -f ../boot_rom.bin ../js2*.img 
47         @$(MAKE) -C llfw clean
48         @$(MAKE) -C $(TOPCMNDIR)/clients/takeover clean
49
50 distclean:      clean_here distclean_gen
51         @for dir in $(SUBDIRS); do \
52                 $(MAKE) -C $$dir distclean || exit 1; \
53         done
54         rm -f ../boot_rom.bin ../js2*.img 
55         $(MAKE) -C llfw clean
56         $(MAKE) -C $(TOPCMNDIR)/clients/takeover distclean
57
58 takeover: all
59         $(MAKE) -C $(TOPCMNDIR)/clients/takeover
60
61 .driver_dirs:
62         @rm -rf ../driver-$(RELEASE)
63         @mkdir -p ../driver-$(RELEASE)
64
65 .tar_gz:        .driver_dirs takeover external_flasher
66         @mv ../boot_rom.bin \
67                 ../driver-$(RELEASE)/$(RELEASE)-js2x.bin
68         @mv ../boot_rom-$(FLASH_SIZE_MB)MB-BigEndian.bin \
69                 ../driver-$(RELEASE)/$(RELEASE)-$(FLASH_SIZE_MB)MB-BigEndian.bin
70         @mv $(TOPCMNDIR)/clients/takeover/takeover.elf \
71                 ../driver-$(RELEASE)/$(RELEASE)-takeover.bin
72         @cp ../VERSION ../driver-$(RELEASE)
73         @cp changes.txt ../driver-$(RELEASE)
74         @cd ../driver-$(RELEASE) && md5sum * > md5sum.txt
75         @chmod 644 ../driver-$(RELEASE)/*
76         @mv ../driver-$(RELEASE) ../driver-$(RELEASE)-`date +%Y-%h%d`
77         @tar czf ../driver-$(RELEASE)-`date +%Y-%h%d`.tar.gz \
78                 ../driver-$(RELEASE)-`date +%Y-%h%d` > /dev/null  2>&1
79         @rm -rf ../driver-$(RELEASE)-`date +%Y-%h%d`
80
81 driver:         driver_prep clean .tar_gz