aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@shortfin.cabal.ca>2007-10-18 16:54:51 -0400
committerKyle McMartin <kyle@shortfin.cabal.ca>2007-10-18 16:54:51 -0400
commit991b7d6e6ffe9373dca7269a5d0213c1545dee1f (patch)
treedb93c49b04ac7190400e8a9b98becab76057bb6a /arch/parisc
parent9611f61eb5baf22b6b6ed46c2c196c10e1fade6a (diff)
[PARISC] Attempt to clean up parisc/Makefile
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/Makefile62
1 files changed, 24 insertions, 38 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 20d327f63d57..3ea7ce3a8c57 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -19,26 +19,27 @@
19NM = sh $(srctree)/arch/parisc/nm 19NM = sh $(srctree)/arch/parisc/nm
20CHECKFLAGS += -D__hppa__=1 20CHECKFLAGS += -D__hppa__=1
21 21
22MACHINE := $(shell uname -m)
23ifeq ($(MACHINE),parisc*)
24NATIVE := 1
25endif
26
22ifdef CONFIG_64BIT 27ifdef CONFIG_64BIT
23CROSS_COMPILE := $(shell if [ -x /usr/bin/hppa64-linux-gnu-gcc ]; then \
24 echo hppa64-linux-gnu-; else echo hppa64-linux-; fi)
25UTS_MACHINE := parisc64 28UTS_MACHINE := parisc64
26CHECKFLAGS += -D__LP64__=1 -m64 29CHECKFLAGS += -D__LP64__=1 -m64
27else 30WIDTH := 64
28MACHINE := $(subst 64,,$(shell uname -m)) 31CROSS_COMPILE := hppa64-linux-gnu-
29ifneq ($(MACHINE),parisc) 32else # 32-bit
30CROSS_COMPILE := hppa-linux- 33WIDTH :=
31endif
32endif 34endif
33 35
34FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 36# attempt to help out folks who are cross-compiling
37ifeq ($(NATIVE),1)
38CROSS_COMPILE := hppa$(WIDTH)-linux-
39endif
35 40
36OBJCOPY_FLAGS =-O binary -R .note -R .comment -S 41OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
37 42
38ifneq ($(call cc-ifversion, -lt, 0303, "bad"),)
39$(error Sorry, GCC v3.3 or above is required.)
40endif
41
42cflags-y := -pipe 43cflags-y := -pipe
43 44
44# These flags should be implied by an hppa-linux configuration, but they 45# These flags should be implied by an hppa-linux configuration, but they
@@ -73,31 +74,8 @@ libs-y += arch/parisc/lib/
73 74
74drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/ 75drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/
75 76
76PALO := $(shell if which palo; then : ; \ 77# Shorthands for known targets not supported by parisc, use vmlinux as default
77 elif [ -x /sbin/palo ]; then echo /sbin/palo; \ 78Image zImage bzImage: vmlinux
78 fi)
79
80palo: vmlinux
81 @if [ -x $PALO ]; then \
82 echo 'ERROR: Please install palo first (apt-get install palo)';\
83 echo 'or build it from source and install it somewhere in your $$PATH';\
84 false; \
85 fi
86 @if [ ! -f ./palo.conf ]; then \
87 cp arch/parisc/defpalo.conf palo.conf; \
88 echo 'A generic palo config file (./palo.conf) has been created for you.'; \
89 echo 'You should check it and re-run "make palo".'; \
90 echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
91 false; \
92 fi
93 $(PALO) -f ./palo.conf
94
95oldpalo: vmlinux
96 export TOPDIR=`pwd`; \
97 unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
98
99# Shorthands for known targets not supported by parisc, use palo as default
100Image zImage bzImage: palo
101 79
102kernel_install: vmlinux 80kernel_install: vmlinux
103 sh $(src)/arch/parisc/install.sh \ 81 sh $(src)/arch/parisc/install.sh \
@@ -110,9 +88,17 @@ MRPROPER_FILES += palo.conf
110 88
111define archhelp 89define archhelp
112 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' 90 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)'
113 @echo ' palo - Bootable image (./lifimage)'
114 @echo ' install - Install kernel using' 91 @echo ' install - Install kernel using'
115 @echo ' (your) ~/bin/installkernel or' 92 @echo ' (your) ~/bin/installkernel or'
116 @echo ' (distribution) /sbin/installkernel or' 93 @echo ' (distribution) /sbin/installkernel or'
117 @echo ' copy to $$(INSTALL_PATH)' 94 @echo ' copy to $$(INSTALL_PATH)'
118endef 95endef
96
97# we require gcc 3.3 or above to compile the kernel
98archprepare: checkbin
99checkbin:
100 @if test "$(call cc-version)" -lt "0303"; then \
101 echo -n "Sorry, GCC v3.3 or above is required to build " ; \
102 echo "the kernel." ; \
103 false ; \
104 fi