direct-io.hg

view tools/misc/mbootpack/Makefile @ 7477:5a7baecb1c70

Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 23 16:51:47 2005 +0100 (2005-10-23)
parents 06d84bf87159
children 7e68bc2745af
line source
1 #
2 # Makefile for mbootpack
3 #
4 INSTALL = install
5 INSTALL_PROG = $(INSTALL) -m0755
6 INSTALL_DIR = $(INSTALL) -d -m0755
8 XEN_ROOT=../../..
9 include $(XEN_ROOT)/tools/Rules.mk
11 all: build
12 build: mbootpack
14 install: build
15 $(INSTALL_PROG) mbootpack $(DESTDIR)/usr/bin
17 # Tools etc.
18 RM := rm -f
19 GDB := gdb
20 INCS := -I. -I-
21 DEFS :=
22 LDFLAGS :=
23 CFLAGS := -Wall -Wpointer-arith -Wcast-qual -Wno-unused -Wno-format
24 CFLAGS += -Wmissing-prototypes
25 #CFLAGS += -pipe -g -O0 -Wcast-align
26 CFLAGS += -pipe -O3
28 # What object files need building for the program
29 OBJS := mbootpack.o buildimage.o
31 # Get gcc to generate the dependencies for us.
32 DEPFLAGS = -Wp,-MD,.$(@F).d
33 DEPS = .*.d
35 mbootpack: $(OBJS)
36 $(HOSTCC) -o $@ $(filter-out %.a, $^) $(LDFLAGS)
38 clean:
39 $(RM) mbootpack *.o $(DEPS) bootsect setup bzimage_header.c bin2c
41 bootsect: bootsect.S
42 $(CC) $(CFLAGS) $(INCS) $(DEFS) -D__MB_ASM -c bootsect.S -o bootsect.o
43 $(LD) -m elf_i386 -Ttext 0x0 -s --oformat binary bootsect.o -o $@
45 setup: setup.S
46 $(CC) $(CFLAGS) $(INCS) $(DEFS) -D__MB_ASM -c setup.S -o setup.o
47 $(LD) -m elf_i386 -Ttext 0x0 -s --oformat binary setup.o -o $@
49 bin2c: bin2c.o
50 $(HOSTCC) -o $@ $^
52 bzimage_header.c: bootsect setup bin2c
53 ./bin2c -n 8 -b1 -a bzimage_bootsect bootsect > bzimage_header.c
54 ./bin2c -n 8 -b1 -a bzimage_setup setup >> bzimage_header.c
56 buildimage.c: bzimage_header.c
57 @
59 %.o: %.S
60 $(HOSTCC) $(DEPFLAGS) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
62 %.o: %.c
63 $(HOSTCC) $(DEPFLAGS) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
65 .PHONY: all clean gdb
66 .PRECIOUS: $(OBJS) $(OBJS:.o=.c) $(DEPS)
67 .SUFFIXES:
69 -include $(DEPS)
71 #
72 # EOF
73 #