diff options
Diffstat (limited to 'arch/ia64/kernel/Makefile')
-rw-r--r-- | arch/ia64/kernel/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 13fd10e8699e..87fea11aecb7 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -36,6 +36,8 @@ obj-$(CONFIG_PCI_MSI) += msi_ia64.o | |||
36 | mca_recovery-y += mca_drv.o mca_drv_asm.o | 36 | mca_recovery-y += mca_drv.o mca_drv_asm.o |
37 | obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o | 37 | obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o |
38 | 38 | ||
39 | obj-$(CONFIG_PARAVIRT) += paravirt.o paravirtentry.o | ||
40 | |||
39 | obj-$(CONFIG_IA64_ESI) += esi.o | 41 | obj-$(CONFIG_IA64_ESI) += esi.o |
40 | ifneq ($(CONFIG_IA64_ESI),) | 42 | ifneq ($(CONFIG_IA64_ESI),) |
41 | obj-y += esi_stub.o # must be in kernel proper | 43 | obj-y += esi_stub.o # must be in kernel proper |
@@ -70,3 +72,45 @@ $(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE | |||
70 | # We must build gate.so before we can assemble it. | 72 | # We must build gate.so before we can assemble it. |
71 | # Note: kbuild does not track this dependency due to usage of .incbin | 73 | # Note: kbuild does not track this dependency due to usage of .incbin |
72 | $(obj)/gate-data.o: $(obj)/gate.so | 74 | $(obj)/gate-data.o: $(obj)/gate.so |
75 | |||
76 | # Calculate NR_IRQ = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...) based on config | ||
77 | define sed-y | ||
78 | "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" | ||
79 | endef | ||
80 | quiet_cmd_nr_irqs = GEN $@ | ||
81 | define cmd_nr_irqs | ||
82 | (set -e; \ | ||
83 | echo "#ifndef __ASM_NR_IRQS_H__"; \ | ||
84 | echo "#define __ASM_NR_IRQS_H__"; \ | ||
85 | echo "/*"; \ | ||
86 | echo " * DO NOT MODIFY."; \ | ||
87 | echo " *"; \ | ||
88 | echo " * This file was generated by Kbuild"; \ | ||
89 | echo " *"; \ | ||
90 | echo " */"; \ | ||
91 | echo ""; \ | ||
92 | sed -ne $(sed-y) $<; \ | ||
93 | echo ""; \ | ||
94 | echo "#endif" ) > $@ | ||
95 | endef | ||
96 | |||
97 | # We use internal kbuild rules to avoid the "is up to date" message from make | ||
98 | arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \ | ||
99 | $(wildcard $(srctree)/include/asm-ia64/*/irq.h) | ||
100 | $(Q)mkdir -p $(dir $@) | ||
101 | $(call if_changed_dep,cc_s_c) | ||
102 | |||
103 | include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s | ||
104 | $(Q)mkdir -p $(dir $@) | ||
105 | $(call cmd,nr_irqs) | ||
106 | |||
107 | clean-files += $(objtree)/include/asm-ia64/nr-irqs.h | ||
108 | |||
109 | # | ||
110 | # native ivt.S and entry.S | ||
111 | # | ||
112 | ASM_PARAVIRT_OBJS = ivt.o entry.o | ||
113 | define paravirtualized_native | ||
114 | AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE | ||
115 | endef | ||
116 | $(foreach obj,$(ASM_PARAVIRT_OBJS),$(eval $(call paravirtualized_native,$(obj)))) | ||