patch-2.3.99-pre1 linux/arch/arm/kernel/Makefile

Next file: linux/arch/arm/kernel/arch.c
Previous file: linux/arch/arm/defconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.51/linux/arch/arm/kernel/Makefile linux/arch/arm/kernel/Makefile
@@ -8,71 +8,55 @@
 HEAD_OBJ  = head-$(PROCESSOR).o
 ENTRY_OBJ = entry-$(PROCESSOR).o
 
-O_TARGET := kernel.o
-O_OBJS   := $(ENTRY_OBJ) ioport.o irq.o process.o ptrace.o \
-	    semaphore.o setup.o signal.o sys_arm.o time.o traps.o
-
 ifeq ($(CONFIG_ISA_DMA),y)
   ISA_DMA_OBJS += dma-isa.o
 endif
 
-O_OBJS_arc        = dma-arc.o iic.o fiq.o time-acorn.o oldlatches.o
-O_OBJS_a5k        = dma-a5k.o iic.o fiq.o time-acorn.o
-O_OBJS_rpc        = dma-rpc.o iic.o fiq.o time-acorn.o
+O_OBJS_arc        = dma-arc.o oldlatches.o
+O_OBJS_a5k        = dma-a5k.o
+O_OBJS_rpc        = dma-rpc.o
 O_OBJS_ebsa110    = dma-dummy.o
-O_OBJS_footbridge = dma-footbridge.o $(ISA_DMA_OBJS) isa.o
+O_OBJS_footbridge = dma.o dma-footbridge.o $(ISA_DMA_OBJS) hw-footbridge.o isa.o
 O_OBJS_nexuspci   = dma-dummy.o
 O_OBJS_sa1100     = dma-dummy.o fiq.o
 
-OX_OBJS_arc	  = dma.o
-OX_OBJS_a5k	  = dma.o
-OX_OBJS_rpc	  = dma.o
-OX_OBJS_ebsa110	  = 
-OX_OBJS_footbridge= dma.o hw-footbridge.o
-OX_OBJS_nexuspci  =
-OX_OBJS_sa1100    =
+O_TARGET := kernel.o
 
-all: kernel.o $(HEAD_OBJ) init_task.o
+# Object file lists.
 
-O_OBJS += $(O_OBJS_$(MACHINE))
+obj-y			:= arch.o $(ENTRY_OBJ) ioport.o irq.o process.o ptrace.o \
+			   semaphore.o setup.o signal.o sys_arm.o time.o traps.o \
+			   $(O_OBJS_$(MACHINE))
+obj-m			:=
+obj-n			:=
+obj-			:=
+
+export-objs		:= armksyms.o dma.o ecard.o hw-footbridge.o leds-$(MACHINE).o
+
+obj-$(CONFIG_ARCH_ACORN) += dma.o ecard.o iic.o fiq.o time-acorn.o
+obj-$(CONFIG_DEBUG_LL)	+= debug-$(PROCESSOR).o
+obj-$(CONFIG_MODULES)	+= armksyms.o
+obj-$(CONFIG_LEDS)	+= leds-$(MACHINE).o
+obj-$(CONFIG_ARTHUR)	+= arthur.o
 
-ifeq ($(CONFIG_DEBUG_LL),y)
-  O_OBJS += debug-$(PROCESSOR).o
+ifeq ($(MACHINE),nexuspci)
+  obj-$(CONFIG_PCI)	+= plx9080.o
+else
+  obj-$(CONFIG_PCI)	+= bios32.o dec21285.o
 endif
 
-ifeq ($(CONFIG_MODULES),y)
-  OX_OBJS = armksyms.o
-endif
+# Files that are both resident and modular; remove from modular.
 
-ifeq ($(CONFIG_ARCH_ACORN),y)
-  OX_OBJS += ecard.o
-endif
+obj-m		:= $(filter-out $(obj-y), $(obj-m))
 
-ifeq ($(CONFIG_PCI),y)
-  ifeq ($(MACHINE),nexuspci)
-    O_OBJS += plx9080.o
-  else
-    O_OBJS += bios32.o dec21285.o
-  endif
-endif
+# Translate to Rules.make lists.
 
-ifeq ($(CONFIG_LEDS),y)
-  OX_OBJS += leds-$(MACHINE).o
-endif
-
-ifeq ($(CONFIG_MODULES),y)
-  OX_OBJS += $(OX_OBJS_$(MACHINE))
-else
-  O_OBJS += $(OX_OBJS_$(MACHINE))
-endif
+O_OBJS		:= $(filter-out $(export-objs), $(obj-y))
+OX_OBJS 	:= $(filter	$(export-objs), $(obj-y))
+M_OBJS		:= $(sort $(filter-out $(export-objs), $(obj-m)))
+MX_OBJS 	:= $(sort $(filter     $(export-objs), $(obj-m)))
 
-ifeq ($(CONFIG_ARTHUR),y)
-  O_OBJS += arthur.o
-else
-  ifeq ($(CONFIG_ARTHUR),m)
-    M_OBJS += arthur.o
-  endif
-endif
+all: kernel.o $(HEAD_OBJ) init_task.o
 
 $(HEAD_OBJ): $(HEAD_OBJ:.o=.S)
 	$(CC) -D__ASSEMBLY__ $(AFLAGS) -DTEXTADDR=$(TEXTADDR) -traditional -c $(HEAD_OBJ:.o=.S) -o $@

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)