Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / board-qemu / llfw / 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 include ../../make.rules
14
15 CPPFLAGS        = -I$(INCLBRDDIR) -I$(INCLCMNDIR) -I$(INCLCMNDIR)/$(CPUARCH) \
16                   -I$(LIBCMNDIR)/libc/include
17 CFLAGS          += -fno-builtin $(FLAG) $(CPPFLAGS) -O2  -msoft-float $(MAMBO)
18 CFLAGS          += $(BOOT) $(IOCONF) -Wa,-mregnames $(RELEASE) $(CPUARCHDEF) -Wall
19 ASFLAGS         = $(BOOT) $(IOCONF) $(RELEASE)$(CPUARCHDEF)  -Wa,-mregnames
20 LDFLAGS1        = -nostdlib -e__start -Tstage2.lds -N -Ttext=0x100
21
22
23 STG1OBJ          = startup.o version.o boot_abort.o romfs.o io_generic.o board_io.o 
24 STG1OBJ          += stage2_head.o stage2.o comlib.o romfs_wrap.o nvramlog.o
25
26 .PHONY: version.S
27
28 all: stage1.bin Cboot.o
29
30 stage1.bin:     $(STG1OBJ) $(LIBCMNDIR)/libelf.a $(LIBCMNDIR)/libc.a \
31                 $(LIBCMNDIR)/libhvcall.a
32                 $(LD) $(LDFLAGS1) -o stage1.elf $^
33                 $(OBJCOPY) -O binary stage1.elf $@
34
35 romfs.o:        ../../llfw/romfs.S
36                 $(CC) $(CFLAGS) -c ../../llfw/romfs.S
37
38 boot_abort.o:   ../../llfw/boot_abort.S
39                 $(CC) $(CFLAGS) -c ../../llfw/boot_abort.S
40
41 nvramlog.o:     ../../llfw/nvramlog.S
42                 $(CC) $(CFLAGS) -c ../../llfw/nvramlog.S
43
44 include $(LLFWCMNDIR)/clib/Makefile.inc
45
46 include $(LLFWCMNDIR)/io_generic/Makefile.inc
47
48 romfs_wrap.o:   ../../llfw/romfs_wrap.c
49                 $(CC) $(CFLAGS) -c ../../llfw/romfs_wrap.c
50
51 Cboot.o: Cboot.S
52                 $(CC) $(CFLAGS) -c $^
53                 $(OBJCOPY) -O binary Cboot.o Cboot.bin
54
55 %.o: %.S
56                 $(CC) $(CFLAGS) -c $^
57
58 clean:
59                 rm -f *.o *.bin *.elf