ia64/xen-unstable

view xen/arch/ia64/Makefile @ 6538:84ee014ebd41

Merge xen-vtx-unstable.hg
author adsharma@los-vmm.sc.intel.com
date Wed Aug 17 12:34:38 2005 -0800 (2005-08-17)
parents 23979fb12c49 f294acb25858
children 99914b54f7bf
line source
1 include $(BASEDIR)/Rules.mk
3 VPATH = linux linux-xen
5 # libs-y += arch/ia64/lib/lib.a
7 OBJS = xensetup.o setup.o time.o irq.o ia64_ksyms.o process.o smp.o \
8 xenmisc.o pdb-stub.o acpi.o hypercall.o \
9 machvec.o dom0_ops.o domain.o hpsimserial.o pcdp.o \
10 idle0_task.o pal.o hpsim.o efi.o efi_stub.o ivt.o mm_contig.o \
11 xenmem.o sal.o cmdline.o mm_init.o tlb.o smpboot.o \
12 extable.o linuxextable.o xenirq.o xentime.o \
13 regionreg.o entry.o unaligned.o privop.o vcpu.o \
14 irq_ia64.o irq_lsapic.o vhpt.o xenasm.o hyperprivop.o dom_fw.o \
15 grant_table.o sn_console.o
17 ifeq ($(CONFIG_VTI),y)
18 OBJS += vmx_init.o vmx_virt.o vmx_vcpu.o vmx_process.o vmx_vsa.o vmx_ivt.o \
19 vmx_phy_mode.o vmx_utility.o vmx_interrupt.o vmx_entry.o vmmu.o \
20 vtlb.o mmio.o vlsapic.o vmx_hypercall.o mm.o vmx_support.o pal_emul.o
21 endif
22 # perfmon.o
23 # unwind.o needed for kernel unwinding (rare)
25 OBJS := $(subst $(TARGET_ARCH)/asm-offsets.o,,$(OBJS))
27 # remove following line if not privifying in memory
28 # OBJS += privify.o
30 default: $(OBJS) head.o ia64lib.o xen.lds.s
31 $(LD) -r -o arch.o $(OBJS) ia64lib.o
32 $(LD) $(LDFLAGS) -T $(BASEDIR)/arch/$(TARGET_ARCH)/xen.lds.s -N \
33 -Map map.out head.o $(ALL_OBJS) -o $(TARGET)-syms
34 $(OBJCOPY) -R .note -R .comment -S $(TARGET)-syms $(TARGET)
35 $(NM) -n $(TARGET)-syms | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)'\
36 > $(BASEDIR)/System.map
39 asm-offsets.s: asm-offsets.c $(BASEDIR)/include/asm-ia64/.offsets.h.stamp $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h
40 $(CC) $(CFLAGS) -S -o $@ $<
42 asm-xsi-offsets.s: asm-xsi-offsets.c
43 $(CC) $(CFLAGS) -S -o $@ $<
45 $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h: asm-xsi-offsets.s
46 @(set -e; \
47 echo "/*"; \
48 echo " * DO NOT MODIFY."; \
49 echo " *"; \
50 echo " * This file was auto-generated from $<"; \
51 echo " *"; \
52 echo " */"; \
53 echo ""; \
54 echo "#ifndef __ASM_XSI_OFFSETS_H__"; \
55 echo "#define __ASM_XSI_OFFSETS_H__"; \
56 echo ""; \
57 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
58 echo ""; \
59 echo "#endif") <$< >$@
61 $(BASEDIR)/include/asm-ia64/.offsets.h.stamp:
62 # Need such symbol link to make linux headers available
63 [ -e $(BASEDIR)/include/linux ] \
64 || ln -s $(BASEDIR)/include/xen $(BASEDIR)/include/linux
65 [ -e $(BASEDIR)/include/asm-ia64/xen ] \
66 || ln -s $(BASEDIR)/include/asm-ia64/linux $(BASEDIR)/include/asm-ia64/xen
67 # Solve circular reference on asm-offsets.h
68 [ -f $(BASEDIR)/include/asm-ia64/asm-offsets.h ] \
69 || echo "#define IA64_TASK_SIZE 0" > $(BASEDIR)/include/asm-ia64/asm-offsets.h
70 #Bad hack. Force asm-offsets.h out-of-date
71 sleep 1
72 touch $@
74 # I'm sure a Makefile wizard would know a better way to do this
75 xen.lds.s: xen.lds.S
76 $(CC) -E $(CPPFLAGS) -P -DXEN -D__ASSEMBLY__ \
77 -o xen.lds.s xen.lds.S
79 ia64lib.o:
80 $(MAKE) -C linux/lib && cp linux/lib/ia64lib.o .
82 clean:
83 rm -f *.o *~ core xen.lds.s $(BASEDIR)/include/asm-ia64/.offsets.h.stamp asm-offsets.s
84 rm -f asm-xsi-offsets.s $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h
85 rm -f lib/*.o
87 .PHONY: default clean