ia64/xen-unstable

view xen/arch/powerpc/Makefile @ 12939:7a4330bd4c5c

[POWERPC][XEN] Fix up 'clean' target.
Signed-off-by: Maria Butrico <butrico@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Thu Oct 05 16:06:05 2006 -0500 (2006-10-05)
parents b58670602d35
children f7096a6728e6
line source
1 ifneq ($(DOM0_IMAGE),)
2 builtin_dom0 := y
3 endif
5 subdir-$(HAS_PPC64) += powerpc64
6 subdir-y += papr
8 obj-y += audit.o
9 obj-y += backtrace.o
10 obj-y += bitops.o
11 obj-y += boot_of.o
12 obj-y += cmdline.o
13 obj-y += dart.o
14 obj-y += dart_u3.o
15 obj-y += dart_u4.o
16 obj-y += domctl.o
17 obj-y += domain_build.o
18 obj-y += domain.o
19 obj-y += exceptions.o
20 obj-y += external.o
21 obj-y += float.o
22 obj-y += hcalls.o
23 obj-y += iommu.o
24 obj-y += irq.o
25 obj-y += mambo.o
26 obj-y += memory.o
27 obj-y += mm.o
28 obj-y += mpic.o
29 obj-y += mpic_init.o
30 obj-y += of-devtree.o
31 obj-y += of-devwalk.o
32 obj-y += ofd_fixup.o
33 obj-y += ofd_fixup_memory.o
34 obj-y += physdev.o
35 obj-y += rtas.o
36 obj-y += setup.o
37 obj-y += shadow.o
38 obj-y += smp.o
39 obj-y += smp-tbsync.o
40 obj-y += sysctl.o
41 obj-y += time.o
42 obj-y += usercopy.o
44 obj-$(debug) += 0opt.o
45 obj-$(crash_debug) += gdbstub.o
46 obj-$(builtin_dom0) += dom0.o
48 obj-y += firmware_image.o
50 obj-y += elf32.o
52 # These are extra warnings like for the arch/ppc directory but may not
53 # allow the rest of the tree to build.
54 PPC_C_WARNINGS += -Wundef -Wmissing-prototypes -Wmissing-declarations
55 PPC_C_WARNINGS += -Wshadow
56 CFLAGS += $(PPC_C_WARNINGS)
58 #
59 # The following flags are fed to gcc in order to link several
60 # objects into a single ELF segment and to not link in any additional
61 # objects that gcc would normally like to
62 #
63 OMAGIC = -N -nodefaultlibs -nostartfiles
65 firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
66 $(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x0 $^ -o $@
68 firmware_image.bin: firmware
69 $(CROSS_COMPILE)objcopy --output-target=binary $< $@
71 #
72 # Hacks for included C files
73 #
74 irq.o: ../x86/irq.c
75 physdev.o: ../x86/physdev.c
77 HDRS += $(wildcard *.h)
79 ifneq ($(CMDLINE),)
80 # The first token in the arguments will be silently dropped.
81 FULL_CMDLINE := xen $(CMDLINE)
82 endif
84 ifeq ($(wildcard cmdline.dep),)
85 cmdline.dep:
86 echo $(FULL_CMDLINE) > cmdline.dep
87 else
88 ifneq ($(FULL_CMDLINE),$(shell cat cmdline.dep))
89 cmdline.dep::
90 echo $(FULL_CMDLINE) > cmdline.dep
91 else
92 cmdline.dep:
93 endif
94 endif
96 cmdline.o: cmdline.dep
97 cmdline.o: CFLAGS += -DCMDLINE="\"$(FULL_CMDLINE)\""
99 TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x400000,-T,xen.lds
100 TARGET_OPTS += start.o $(ALL_OBJS)
102 .xen-syms: start.o $(ALL_OBJS) xen.lds
103 $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o
104 $(CC) $(CFLAGS) $(TARGET_OPTS) $(BASEDIR)/common/symbols-dummy.o -o $@
106 NM=$(CROSS_COMPILE)nm
107 new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
109 ifeq ($(new_nm),y)
110 NM := $(NM) --synthetic
111 endif
113 xen-syms.S: .xen-syms
114 $(NM) -n $^ | $(BASEDIR)/tools/symbols > $@
116 xen-syms.o: xen-syms.S
117 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
119 $(TARGET)-syms: start.o $(ALL_OBJS) xen-syms.o xen.lds
120 $(CC) $(CFLAGS) $(TARGET_OPTS) xen-syms.o -o $@
122 # our firmware only loads 32-bit ELF files
123 $(TARGET): $(TARGET)-syms
124 $(CROSS_COMPILE)objcopy \
125 --input-target=elf64-powerpc \
126 --output-target=elf32-powerpc \
127 $^ $@
129 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS)
130 $(CC) $(CFLAGS) -S -o $@ $<
132 xen.lds: xen.lds.S $(HDRS)
133 $(CC) -P -E $(AFLAGS) -o $@ $<
135 dom0.bin: $(DOM0_IMAGE)
136 cp $< $@
138 clean::
139 $(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean
140 rm -f firmware firmware_image.bin dom0.bin .xen-syms xen-syms.S \
141 xen.lds asm-offsets.s cmdline.dep