[parisc-linux-cvs] Makefile tweek

bame@riverrock.org bame@riverrock.org
Wed, 20 Jun 2001 11:57:22 -0600


Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile	2001/03/16 22:51:08	1.24
+++ Makefile	2001/06/20 17:55:13
@@ -17,18 +17,26 @@
 # Mike Shaver, Helge Deller and Martin K. Petersen
 #
 
+ifdef CONFIG_PARISC64
+LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux64.lds $(LDFLAGS)
+CROSS_COMPILE := hppa64-linux-
+#CFLAGS += -b hppa64-linux
+
+else
+LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux.lds $(LDFLAGS)
+MACHINE	:= $(subst 64,,$(shell uname -m))
+ifneq (${MACHINE},parisc)
+# cross compilation
 CROSS_COMPILE := hppa-linux-
+endif
+endif
 
 FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 
 
 CPP=$(CC) -E
 OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
 LDFLAGS =
-ifdef CONFIG_PARISC64
-LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux64.lds $(LDFLAGS)
-else
-LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux.lds $(LDFLAGS)
-endif
+
 
 CFLAGS_PIPE := -pipe
 CFLAGS_NSR  := -fno-strength-reduce
@@ -69,8 +77,6 @@
 CLEAN_FILES := $(CLEAN_FILES) arch/parisc/tools/offset.[hs] include/asm-parisc/offset.h*
 
 ifdef CONFIG_PARISC64
-CROSS_COMPILE := hppa64-linux-
-#CFLAGS += -b hppa64-linux
 HEAD := arch/parisc/kernel/head64.o
 endif