patch-2.4.0-prerelease linux/arch/sh/kernel/Makefile

Next file: linux/arch/sh/kernel/ptrace.c
Previous file: linux/arch/sh/boot/compressed/head.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test12/linux/arch/sh/kernel/Makefile linux/arch/sh/kernel/Makefile
@@ -6,73 +6,46 @@
 # unless it's something special (ie not a .c file).
 #
 
-.S.o:
-	$(CC) $(AFLAGS) -traditional -c $< -o $*.o
-
-O_TARGET := kernel.o
-O_OBJS   := process.o signal.o entry.o traps.o irq.o irq_ipr.o \
-            ptrace.o setup.o time.o sys_sh.o semaphore.o \
-            irq_imask.o io.o
-OX_OBJS  := sh_ksyms.o
-MX_OBJS  :=
-
-ifdef CONFIG_CF_ENABLER
-O_OBJS += cf-enabler.o
-endif
-
-ifdef CONFIG_SH_GENERIC
+all: kernel.o head.o init_task.o
 
-O_OBJS += mach_se.o setup_se.o setup_cqreek.o io_se.o led_se.o \
-	  mach_hp600.o io_hd64461.o \
-	  mach_unknown.o io_unknown.o \
-	  io_generic.o
+clean:
 
-else
+O_TARGET := kernel.o
 
-ifdef CONFIG_SH_HP600
-O_OBJS += mach_hp600.o io_hd64461.o io_generic.o
-endif
+export-objs	:= io.o io_generic.o io_hd64461.o setup_hd64461.o sh_ksyms.o
 
-ifdef CONFIG_SH_OVERDRIVE
-O_OBJS += io_generic.o
-endif
+obj-y	:= process.o signal.o entry.o traps.o irq.o irq_ipr.o \
+	ptrace.o setup.o time.o sys_sh.o semaphore.o \
+	irq_imask.o io.o io_generic.o sh_ksyms.o
 
-ifdef CONFIG_SH_SOLUTION_ENGINE
-O_OBJS += mach_se.o setup_se.o io_se.o io_generic.o led_se.o
-endif
+obj-$(CONFIG_CF_ENABLER)	+= cf-enabler.o
+obj-$(CONFIG_CPU_SH4)		+= fpu.o
+obj-$(CONFIG_PCI)		+= pci-sh.o 
+obj-$(CONFIG_SH_STANDARD_BIOS)	+= sh_bios.o
 
-ifdef CONFIG_SH_CQREEK
-O_OBJS += setup_cqreek.o
-endif
+obj-$(CONFIG_SH_HP600)		+= mach_hp600.o
+machine-specific-objs		+= mach_hp600.o
 
-ifdef CONFIG_SH_UNKNOWN
-O_OBJS += mach_unknown.o io_unknown.o io_generic.o
-endif
+obj-$(CONFIG_SH_SOLUTION_ENGINE)+= mach_se.o setup_se.o io_se.o led_se.o
+machine-specific-objs		+= mach_se.o setup_se.o io_se.o led_se.o
 
-endif
+obj-$(CONFIG_SH_CQREEK)		+= setup_cqreek.o
+machine-specific-objs		+= setup_cqreek.o
 
-ifdef CONFIG_CPU_SH4
-O_OBJS += fpu.o
-endif
+obj-$(CONFIG_SH_UNKNOWN)	+= mach_unknown.o io_unknown.o
+machine-specific-objs		+= mach_unknown.o io_unknown.o
 
-ifdef CONFIG_PCI
-O_OBJS += pci-sh.o 
-endif
+obj-$(CONFIG_HD64461)		+= setup_hd64461.o io_hd64461.o
+machine-specific-objs		+= setup_hd64461.o io_hd64461.o
 
-ifneq ($(CONFIG_SH_GENERIC)$(CONFIG_HD64461),)
-O_OBJS += setup_hd64461.o
-endif
+# Doesn't compile well, so don't include in machine-specific-objs
+obj-$(CONFIG_HD64465)		+= setup_hd64465.o io_hd64465.o
+obj-$(CONFIG_SH_FOOBAR)		+= mach_foobar.o
 
-ifdef CONFIG_SH_STANDARD_BIOS
-O_OBJS += sh_bios.o
+ifeq ($(CONFIG_SH_GENERIC),y)
+obj-y		+= $(machine-specific-objs)
 endif
 
-all: kernel.o head.o init_task.o
-
-entry.o: entry.S
-
-head.o: head.S
-
-clean:
+USE_STANDARD_AS_RULE := true
 
 include $(TOPDIR)/Rules.make

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