]> git.hungrycats.org Git - linux/commitdiff
[ARM] Update ARM makefiles
authorRussell King <rmk@flint.arm.linux.org.uk>
Fri, 2 Apr 2004 13:17:43 +0000 (14:17 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Fri, 2 Apr 2004 13:17:43 +0000 (14:17 +0100)
- Use -march=armv6 where available.
- CFLAGS_BOOT isn't needed - the decompressor uses CFLAGS, remove it.
- PROCESSOR is never used, remove it.
- LDFLAGS_BLOB is never used, remove it.
- Remove MACHINE macro.
- Correct comments for include/asm-arm/.arch target.
- Copy format of include/asm symlink rule.
- Arrange for configuration to be split before making
  include/asm-arm/arch symlink.
- This means that asm-offsets.s no longer depends on
  include/config/MARKER.

arch/arm/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/kernel/Makefile
arch/arm/lib/Makefile
drivers/acorn/char/Makefile

index e7725262c312db07f8951527a9adf9791821ba83..d1f12399158308d4578666f9905ae2fa00c77f1a 100644 (file)
@@ -36,7 +36,7 @@ comma = ,
 # Note that GCC does not numerically define an architecture version
 # macro, but instead defines a whole series of macros which makes
 # testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v6)                :=-D__LINUX_ARM_ARCH__=6 -march=armv5t -Wa,-march=armv6
+arch-$(CONFIG_CPU_32v6)                :=-D__LINUX_ARM_ARCH__=6 $(call check_gcc,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
 arch-$(CONFIG_CPU_32v5)                :=-D__LINUX_ARM_ARCH__=5 $(call check_gcc,-march=armv5te,-march=armv4)
 arch-$(CONFIG_CPU_32v4)                :=-D__LINUX_ARM_ARCH__=4 -march=armv4
 arch-$(CONFIG_CPU_32v3)                :=-D__LINUX_ARM_ARCH__=3 -march=armv3
@@ -54,20 +54,13 @@ tune-$(CONFIG_CPU_XSCALE)   :=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
 tune-$(CONFIG_CPU_V6)          :=-mtune=strongarm
 
 # Need -Uarm for gcc < 3.x
-CFLAGS_BOOT    :=-mapcs-32 $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
 CFLAGS         +=-mapcs-32 $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
 AFLAGS         +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
 
 #Default value
 DATAADDR       := .
 
-PROCESSOR      := armv
 head-y         := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
-ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
-  LDFLAGS_BLOB += --oformat elf32-bigarm
-else
-  LDFLAGS_BLOB += --oformat elf32-littlearm
-endif
 textaddr-y     := 0xC0008000
 
  machine-$(CONFIG_ARCH_ARCA5K)    := arc
@@ -99,14 +92,13 @@ textaddr-$(CONFIG_ARCH_FORTUNET)   := 0xc0008000
  machine-$(CONFIG_ARCH_IOP3XX)    := iop3xx
  machine-$(CONFIG_ARCH_ADIFCC)    := adifcc
 
-MACHINE  := $(machine-y)
 TEXTADDR := $(textaddr-y)
 ifeq ($(incdir-y),)
-incdir-y := $(MACHINE)
+incdir-y := $(machine-y)
 endif
 INCDIR   := $(incdir-y)
   
-export MACHINE PROCESSOR TEXTADDR GZFLAGS CFLAGS_BOOT
+export TEXTADDR GZFLAGS
 
 # Do we have FASTFPE?
 FASTFPE                :=arch/arm/fastfpe
@@ -116,8 +108,8 @@ endif
 
 # If we have a machine-specific directory, then include it in the build.
 core-y                         += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
-ifneq ($(MACHINE),)
-core-y                         += arch/arm/mach-$(MACHINE)/
+ifneq ($(machine-y),)
+core-y                         += arch/arm/mach-$(machine-y)/
 endif
 core-$(CONFIG_FPE_NWFPE)       += arch/arm/nwfpe/
 core-$(CONFIG_FPE_FASTFPE)     += $(FASTFPE_OBJ)
@@ -134,20 +126,18 @@ all: zImage
 boot := arch/arm/boot
 
 #      Update machine arch and proc symlinks if something which affects
-#      them changed.  We use .arch and .proc to indicate when they were
-#      updated last, otherwise make uses the target directory mtime.
+#      them changed.  We use .arch to indicate when they were updated
+#      last, otherwise make uses the target directory mtime.
 
-include/asm-arm/.arch: $(wildcard include/config/arch/*.h)
-       @echo '  Making asm-arm/arch -> asm-arm/arch-$(INCDIR) symlink'
-       @rm -f include/asm-arm/arch
-       @ln -sf arch-$(INCDIR) include/asm-arm/arch
+include/asm-arm/.arch: $(wildcard include/config/arch/*.h) include/config/MARKER
+       @echo '  SYMLINK include/asm-arm/arch -> include/asm-arm/arch-$(INCDIR)'
+       @ln -fsn arch-$(INCDIR) include/asm-arm/arch
        @touch $@
 
-prepare: maketools
+prepare: maketools include/asm-arm/.arch
 
 .PHONY: maketools FORCE
-maketools: include/asm-arm/.arch \
-          include/asm-arm/constants.h include/linux/version.h FORCE
+maketools: include/asm-arm/constants.h include/linux/version.h FORCE
        $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
 
 # Convert bzImage to zImage
@@ -160,8 +150,8 @@ zImage Image bootpImage uImage: vmlinux
 zinstall install: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
 
-CLEAN_FILES += include/asm-arm/constants.h* include/asm-arm/mach-types.h
-MRPROPER_FILES += include/asm-arm/arch include/asm-arm/.arch
+CLEAN_FILES += include/asm-arm/constants.h* include/asm-arm/mach-types.h \
+              include/asm-arm/arch include/asm-arm/.arch
 
 # We use MRPROPER_FILES and CLEAN_FILES now
 archclean:
@@ -175,8 +165,7 @@ i:; $(Q)$(MAKE) $(build)=$(boot) install
 zi:;   $(Q)$(MAKE) $(build)=$(boot) zinstall
 
 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/asm-arm/.arch \
-                                  include/config/MARKER
+                                  include/asm-arm/.arch
 
 include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
        $(call filechk,gen-asm-offsets)
index 892e71f99c3ececac4639ac7b5bdc5f489d1fa50..03a57542a2e476cb9ae4f4ef92c52da0cb26a8af 100644 (file)
@@ -59,7 +59,7 @@ SEDFLAGS      = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBS
 
 targets       := vmlinux vmlinux.lds piggy piggy.gz piggy.o \
                  font.o head.o $(OBJS)
-EXTRA_CFLAGS  := $(CFLAGS_BOOT) -fpic
+EXTRA_CFLAGS  := -fpic
 EXTRA_AFLAGS  := -traditional
 
 LDFLAGS_vmlinux := -p -X \
index 570c03687fe48f5d53672ca664f0a586179edee9..991c219b347c0e6b609a6586df3cf93ed5687960 100644 (file)
@@ -20,7 +20,7 @@ obj-$(CONFIG_ARTHUR)          += arthur.o
 obj-$(CONFIG_ISA_DMA)          += dma-isa.o
 obj-$(CONFIG_PCI)              += bios32.o
 
-ifneq ($(MACHINE),ebsa110)
+ifneq ($(CONFIG_ARCH_EBSA110),y)
   obj-y                += io.o
 endif
 
index 297946de0954de76e4700b2885afcd57e89c58ca..b419d0b5f0b07560ea3cf01e1bc954726c18c33e 100644 (file)
@@ -11,30 +11,20 @@ lib-y               := backtrace.o changebit.o csumipv6.o csumpartial.o   \
                   strnlen_user.o strchr.o strrchr.o testchangebit.o  \
                   testclearbit.o testsetbit.o uaccess.o getuser.o    \
                   putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o   \
-                  ucmpdi2.o udivdi3.o lib1funcs.o div64.o
-
-lib-arc                := ecard.o io-acorn.o floppydma.o
-lib-rpc                := ecard.o io-acorn.o floppydma.o
-lib-clps7500   := io-acorn.o
-lib-l7200      := io-acorn.o
-lib-shark      := io-shark.o
-lib-edb7211    := io-acorn.o
-
-lib-y          += $(lib-$(MACHINE))
+                  ucmpdi2.o udivdi3.o lib1funcs.o div64.o            \
+                  io-readsb.o io-writesb.o io-writesl.o
 
 ifeq ($(CONFIG_CPU_32v3),y)
-  v3           := y
-  v4           := n
+  lib-y        += io-readsw-armv3.o io-writesw-armv3.o io-readsl-armv3.o
 else
-  v3           := n
-  v4           := y
+  lib-y        += io-readsw-armv4.o io-writesw-armv4.o io-readsl-armv4.o
 endif
 
-lib-y          += io-readsb.o io-writesb.o
-lib-$(v3)      += io-readsw-armv3.o io-writesw-armv3.o io-readsl-armv3.o
-lib-$(v4)      += io-readsw-armv4.o io-writesw-armv4.o io-readsl-armv4.o
-lib-y          += io-writesl.o
+lib-$(CONFIG_ARCH_RPC)         += ecard.o io-acorn.o floppydma.o
+lib-$(CONFIG_ARCH_CLPS7500)    += io-acorn.o
+lib-$(CONFIG_ARCH_L7200)       += io-acorn.o
+lib-$(CONFIG_ARCH_SHARK)       += io-shark.o
+lib-$(CONFIG_ARCH_CLPS711X)    += io-acorn.o
 
 $(obj)/csumpartialcopy.o:      $(obj)/csumpartialcopygeneric.S
 $(obj)/csumpartialcopyuser.o:  $(obj)/csumpartialcopygeneric.S
-
index a2bcc38b387711fd5eaf284300f03fb916be2f83..2fa9a8bf48a0adaf5a3255e7b085201803de3688 100644 (file)
@@ -4,4 +4,3 @@
 
 obj-$(CONFIG_ARCH_ACORN)       += i2c.o pcf8583.o
 obj-$(CONFIG_L7200_KEYB)       += defkeymap-l7200.o keyb_l7200.o
-obj-y                          += $(obj-$(MACHINE))