aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/ia64/Makefile
blob: d2be0994ab461821f41c64c0a1a2cffaa8ec8c54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
include $(BASEDIR)/Rules.mk

# libs-y	+= arch/ia64/lib/lib.a

OBJS = xensetup.o setup.o time.o irq.o ia64_ksyms.o process.o smp.o \
	xenmisc.o pdb-stub.o acpi.o hypercall.o \
	machvec.o dom0_ops.o domain.o hpsimserial.o pcdp.o \
	idle0_task.o pal.o hpsim.o efi.o efi_stub.o ivt.o mm_contig.o \
	xenmem.o sal.o cmdline.o mm_init.o tlb.o smpboot.o \
	extable.o linuxextable.o xenirq.o xentime.o \
	regionreg.o entry.o unaligned.o privop.o vcpu.o \
	irq_ia64.o irq_lsapic.o vhpt.o xenasm.o hyperprivop.o dom_fw.o \
	grant_table.o sn_console.o

ifeq ($(CONFIG_VTI),y)
OBJS += vmx_init.o vmx_virt.o vmx_vcpu.o vmx_process.o vmx_vsa.o vmx_ivt.o \
	vmx_phy_mode.o vmx_utility.o vmx_interrupt.o vmx_entry.o vmmu.o \
	vtlb.o mmio.o vlsapic.o vmx_hypercall.o mm.o
endif
# perfmon.o
# unwind.o needed for kernel unwinding (rare)

OBJS := $(subst $(TARGET_ARCH)/asm-offsets.o,,$(OBJS))

# remove following line if not privifying in memory
# OBJS += privify.o

default: $(OBJS) head.o ia64lib.o xen.lds.s
	$(LD) -r -o arch.o $(OBJS) ia64lib.o
	$(LD) $(LDFLAGS) -T $(BASEDIR)/arch/$(TARGET_ARCH)/xen.lds.s -N \
		-Map map.out head.o $(ALL_OBJS) -o $(TARGET)-syms
	$(OBJCOPY) -R .note -R .comment -S $(TARGET)-syms $(TARGET)
	$(NM) -n $(TARGET)-syms | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)'\
		 > $(BASEDIR)/System.map


asm-offsets.s: asm-offsets.c $(BASEDIR)/include/asm-ia64/.offsets.h.stamp
	$(CC) $(CFLAGS) -S -o $@ $<

$(BASEDIR)/include/asm-ia64/.offsets.h.stamp:
# Need such symbol link to make linux headers available
	[ -e $(BASEDIR)/include/linux ] \
	 || ln -s $(BASEDIR)/include/xen $(BASEDIR)/include/linux
	[ -e $(BASEDIR)/include/asm-ia64/xen ] \
	 || ln -s $(BASEDIR)/include/asm-ia64/linux $(BASEDIR)/include/asm-ia64/xen
# Solve circular reference on asm-offsets.h
	[ -f $(BASEDIR)/include/asm-ia64/asm-offsets.h ] \
	 || echo "#define IA64_TASK_SIZE 0" > $(BASEDIR)/include/asm-ia64/asm-offsets.h
#Bad hack. Force asm-offsets.h out-of-date
	 sleep 1
	 touch $@

# I'm sure a Makefile wizard would know a better way to do this
xen.lds.s: xen.lds.S
	$(CC) -E $(CPPFLAGS) -P -DXEN -D__ASSEMBLY__ \
		-o xen.lds.s xen.lds.S

ia64lib.o:
	$(MAKE) -C lib && cp lib/ia64lib.o .

clean:
	rm -f *.o *~ core  xen.lds.s $(BASEDIR)/include/asm-ia64/.offsets.h.stamp asm-offsets.s
	rm -f lib/*.o

# setup.o contains bits of compile.h so it must be blown away
delete-unfresh-files:
	echo any unfresh-files to delete for ia64\?
#	rm -f setup.o

.PHONY: default clean delete-unfresh-files