Blame view
arch/parisc/Makefile
5.41 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# # parisc/Makefile # # This file is included by the global makefile so that you can add your own # architecture-specific flags and dependencies. Remember to do have actions # for "archclean" and "archdep" for cleaning up and making dependencies for # this architecture # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive # for more details. # # Copyright (C) 1994 by Linus Torvalds # Portions Copyright (C) 1999 The Puffin Group # # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, # Mike Shaver, Helge Deller and Martin K. Petersen # |
c04f7ae2d [PARISC] move def... |
19 |
|
594174d81 parisc: switch to... |
20 |
KBUILD_IMAGE := vmlinuz |
1da177e4c Linux-2.6.12-rc2 |
21 |
NM = sh $(srctree)/arch/parisc/nm |
145167650 kbuild: add endia... |
22 |
CHECKFLAGS += -D__hppa__=1 |
1da177e4c Linux-2.6.12-rc2 |
23 24 |
ifdef CONFIG_64BIT |
1da177e4c Linux-2.6.12-rc2 |
25 |
UTS_MACHINE := parisc64 |
1f2f01b12 kbuild: add machi... |
26 |
CHECKFLAGS += -D__LP64__=1 |
6880b0150 parisc: make defa... |
27 |
CC_ARCHES = hppa64 |
b6adc16e0 parisc: Wire up s... |
28 |
LD_BFD := elf64-hppa-linux |
991b7d6e6 [PARISC] Attempt ... |
29 |
else # 32-bit |
6880b0150 parisc: make defa... |
30 |
CC_ARCHES = hppa hppa2.0 hppa1.1 |
b6adc16e0 parisc: Wire up s... |
31 |
LD_BFD := elf32-hppa-linux |
1da177e4c Linux-2.6.12-rc2 |
32 |
endif |
ededa081e parisc: Fix defco... |
33 34 35 36 37 38 |
# select defconfig based on actual architecture ifeq ($(shell uname -m),parisc64) KBUILD_DEFCONFIG := generic-64bit_defconfig else KBUILD_DEFCONFIG := generic-32bit_defconfig endif |
b6adc16e0 parisc: Wire up s... |
39 |
export LD_BFD |
6880b0150 parisc: make defa... |
40 41 42 43 44 45 46 |
ifneq ($(SUBARCH),$(UTS_MACHINE)) ifeq ($(CROSS_COMPILE),) CC_SUFFIXES = linux linux-gnu unknown-linux-gnu CROSS_COMPILE := $(call cc-cross-prefix, \ $(foreach a,$(CC_ARCHES), \ $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-))) endif |
991b7d6e6 [PARISC] Attempt ... |
47 |
endif |
1da177e4c Linux-2.6.12-rc2 |
48 |
|
6ca636622 parisc: add dynam... |
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
ifdef CONFIG_DYNAMIC_FTRACE ifdef CONFIG_64BIT NOP_COUNT := 8 else NOP_COUNT := 5 endif export CC_USING_RECORD_MCOUNT:=1 export CC_USING_PATCHABLE_FUNCTION_ENTRY:=1 KBUILD_AFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY=1 KBUILD_CFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY=1 \ -DFTRACE_PATCHABLE_FUNCTION_SIZE=$(NOP_COUNT) CC_FLAGS_FTRACE := -fpatchable-function-entry=$(NOP_COUNT),$(shell echo $$(($(NOP_COUNT)-1))) |
6ca636622 parisc: add dynam... |
64 |
endif |
1da177e4c Linux-2.6.12-rc2 |
65 66 67 68 69 70 |
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S cflags-y := -pipe # These flags should be implied by an hppa-linux configuration, but they # are not in gcc 3.2. |
d26a7730b parisc: Only use ... |
71 72 73 74 75 76 |
cflags-y += -mno-space-regs # -mfast-indirect-calls is only relevant for 32-bit kernels. ifndef CONFIG_64BIT cflags-y += -mfast-indirect-calls endif |
1da177e4c Linux-2.6.12-rc2 |
77 78 79 80 |
# Currently we save and restore fpregs on all kernel entry/interruption paths. # If that gets optimized, we might need to disable the use of fpregs in the # kernel. |
fa681a180 [PARISC] Disable ... |
81 |
cflags-y += -mdisable-fpregs |
1da177e4c Linux-2.6.12-rc2 |
82 |
|
ec758f983 parisc: add CONFI... |
83 |
# Use long jumps instead of long branches (needed if your linker fails to |
cf71130d6 parisc: disable -... |
84 85 86 87 |
# link a too big vmlinux executable). Not enabled for building modules. ifdef CONFIG_MLONGCALLS KBUILD_CFLAGS_KERNEL += -mlong-calls endif |
ec758f983 parisc: add CONFI... |
88 |
|
1e8249b8a parisc: Enable -f... |
89 90 91 92 93 94 |
# Without this, "ld -r" results in .text sections that are too big (> 0x40000) # for branches to reach stubs. And multiple .text sections trigger a warning # when creating the sysfs module information section. ifndef CONFIG_64BIT KBUILD_CFLAGS_MODULE += -ffunction-sections endif |
1da177e4c Linux-2.6.12-rc2 |
95 |
# select which processor to optimise for |
766039022 parisc: rename "C... |
96 |
cflags-$(CONFIG_PA7000) += -march=1.1 -mschedule=7100 |
1da177e4c Linux-2.6.12-rc2 |
97 98 99 100 101 102 |
cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200 cflags-$(CONFIG_PA7100LC) += -march=1.1 -mschedule=7100LC cflags-$(CONFIG_PA7300LC) += -march=1.1 -mschedule=7300 cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000 head-y := arch/parisc/kernel/head.o |
a0f97e06a kbuild: enable 'm... |
103 |
KBUILD_CFLAGS += $(cflags-y) |
0d341e0dd parisc: suppress ... |
104 105 |
LIBGCC := $(shell $(CC) -print-libgcc-file-name) export LIBGCC |
1da177e4c Linux-2.6.12-rc2 |
106 |
|
481f93b67 parisc: Fix init_... |
107 |
kernel-y := mm/ kernel/ math-emu/ |
1da177e4c Linux-2.6.12-rc2 |
108 109 |
core-y += $(addprefix arch/parisc/, $(kernel-y)) |
4c01acc01 [PARISC] fix code... |
110 |
libs-y += arch/parisc/lib/ $(LIBGCC) |
1da177e4c Linux-2.6.12-rc2 |
111 112 |
drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/ |
b6adc16e0 parisc: Wire up s... |
113 |
boot := arch/parisc/boot |
6525ee55b parisc: quiet pal... |
114 |
PALO := $(shell if (which palo 2>&1); then : ; \ |
5feb4f39a [PARISC] Restore ... |
115 116 |
elif [ -x /sbin/palo ]; then echo /sbin/palo; \ fi) |
75dd47472 kbuild: remove sr... |
117 118 |
PALOCONF := $(shell if [ -f $(srctree)/palo.conf ]; then echo $(srctree)/palo.conf; \ else echo $(objtree)/palo.conf; \ |
f67d4033c [PARISC] Make pal... |
119 |
fi) |
b0756b5ad parisc: make "mak... |
120 |
palo lifimage: vmlinuz |
f67d4033c [PARISC] Make pal... |
121 |
@if test ! -x "$(PALO)"; then \ |
5feb4f39a [PARISC] Restore ... |
122 123 124 125 |
echo 'ERROR: Please install palo first (apt-get install palo)';\ echo 'or build it from source and install it somewhere in your $$PATH';\ false; \ fi |
f67d4033c [PARISC] Make pal... |
126 |
@if test ! -f "$(PALOCONF)"; then \ |
75dd47472 kbuild: remove sr... |
127 128 |
cp $(srctree)/arch/parisc/defpalo.conf $(objtree)/palo.conf; \ echo 'A generic palo config file ($(objree)/palo.conf) has been created for you.'; \ |
5feb4f39a [PARISC] Restore ... |
129 130 131 132 |
echo 'You should check it and re-run "make palo".'; \ echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \ false; \ fi |
f67d4033c [PARISC] Make pal... |
133 |
$(PALO) -f $(PALOCONF) |
5feb4f39a [PARISC] Restore ... |
134 |
|
b0756b5ad parisc: make "mak... |
135 136 137 138 |
BOOT_TARGETS = zImage Image palo lifimage INSTALL_TARGETS = zinstall install PHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS) |
89e050c87 parisc: Make bzIm... |
139 140 |
# Default kernel to build all: bzImage |
b6adc16e0 parisc: Wire up s... |
141 |
zImage: vmlinuz |
594174d81 parisc: switch to... |
142 |
Image: vmlinux |
594174d81 parisc: switch to... |
143 |
|
b6adc16e0 parisc: Wire up s... |
144 145 |
bzImage: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
af21b01d1 parisc: Reintrodu... |
146 |
ifdef CONFIG_PARISC_SELF_EXTRACT |
b6adc16e0 parisc: Wire up s... |
147 148 |
vmlinuz: bzImage $(OBJCOPY) $(boot)/bzImage $@ |
af21b01d1 parisc: Reintrodu... |
149 150 |
else vmlinuz: vmlinux |
e4a42c82e kbuild: fix broke... |
151 |
@$(KGZIP) -cf -9 $< > $@ |
af21b01d1 parisc: Reintrodu... |
152 |
endif |
1da177e4c Linux-2.6.12-rc2 |
153 |
|
b0756b5ad parisc: make "mak... |
154 |
install: |
75dd47472 kbuild: remove sr... |
155 |
$(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \ |
b0756b5ad parisc: make "mak... |
156 157 |
$(KERNELRELEASE) vmlinux System.map "$(INSTALL_PATH)" zinstall: |
75dd47472 kbuild: remove sr... |
158 |
$(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \ |
b0756b5ad parisc: make "mak... |
159 |
$(KERNELRELEASE) vmlinuz System.map "$(INSTALL_PATH)" |
1da177e4c Linux-2.6.12-rc2 |
160 |
|
0013a8545 kbuild: m68k,pari... |
161 |
CLEAN_FILES += lifimage |
1da177e4c Linux-2.6.12-rc2 |
162 163 164 165 |
MRPROPER_FILES += palo.conf define archhelp @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' |
594174d81 parisc: switch to... |
166 |
@echo ' vmlinuz - Compressed kernel image (./vmlinuz)' |
5feb4f39a [PARISC] Restore ... |
167 |
@echo ' palo - Bootable image (./lifimage)' |
b0756b5ad parisc: make "mak... |
168 |
@echo ' install - Install uncompressed vmlinux kernel using' |
caa27b66b kbuild: use INSTA... |
169 170 |
@echo ' (your) ~/bin/$(INSTALLKERNEL) or' @echo ' (distribution) /sbin/$(INSTALLKERNEL) or' |
1da177e4c Linux-2.6.12-rc2 |
171 |
@echo ' copy to $$(INSTALL_PATH)' |
b0756b5ad parisc: make "mak... |
172 |
@echo ' zinstall - Install compressed vmlinuz kernel' |
1da177e4c Linux-2.6.12-rc2 |
173 |
endef |
575afc4d7 parisc: generate ... |
174 |
|
f2c5ed0dd parisc: Add archc... |
175 176 |
archclean: $(Q)$(MAKE) $(clean)=$(boot) |
575afc4d7 parisc: generate ... |
177 178 |
archheaders: $(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all |