summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/Makefile')
-rw-r--r--arch/mips/kernel/Makefile81
1 files changed, 19 insertions, 62 deletions
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 0086f60cf..b76c723b2 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -1,94 +1,51 @@
#
-# Makefile for the linux kernel.
+# Makefile for the Linux/MIPS kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
-.c.s:
- $(CC) $(CFLAGS) -S $<
-.s.o:
- $(AS) $(ASFLAGS) -o $*.o $<
-.c.o:
- $(CC) $(CFLAGS) -c $<
.S.s:
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
-OBJS = process.o signal.o entry.o traps.o irq.o ptrace.o vm86.o ioport.o \
- setup.o bios32.o tynedma.o
-
-include ../../../.config
+all: kernel.o head.o
+EXTRA_ASFLAGS = -mips3 -mcpu=r4000
+O_TARGET := kernel.o
+O_OBJS := branch.o process.o signal.o entry.o traps.o irq.o ptrace.o vm86.o \
+ ioport.o setup.o syscall.o sysmips.o time.o bios32.o ipc.o ksyms.o \
+ unaligned.o tags.o
#
# Kernel debugging
#
-
ifdef CONFIG_REMOTE_DEBUG
-OBJS += gdb-low.o gdb-stub.o
+O_OBJS += gdb-low.o gdb-stub.o
endif
#
-# Board specific code
+# Depending from some other kernel option
#
-
-ifdef CONFIG_MIPS_JAZZ
-OBJS += jazzdma.o
-endif
-
-ifdef CONFIG_ACER_PICA_61
-OBJS += pica.o
-endif
-
-ifdef CONFIG_DESKSTATION_TYNE
-OBJS += tyne.o
-endif
-
-ifdef CONFIG_MIPS_MAGNUM_4000
-OBJS += magnum4000.o
+ifdef CONFIG_PROC_FS
+O_OBJS += proc.o
endif
#
-# CPU model specific code
+# Since we add the same object files to O_OBJS for different configurations.
+# O_OBJS might contain duplicate files. We correct this by filtering out
+# duplicate files. Just to avoid users having to know about all the
+# compatibility stuff between various boards and boards.
#
-ifdef CONFIG_CPU_R4X00
-OBJS += r4xx0.o
-endif
-
-ifdef CONFIG_CPU_R4600
-OBJS += r4xx0.o
-endif
+O_OBJS := $(sort $(O_OBJS))
all: kernel.o head.o
entry.o: entry.S
-
+exception.o: exception.S
head.o: head.S
-magnum4000.o: magnum4000.S
-
-pica.o: pica.S
-
-r4xx0.o: r4xx0.S
-
-tyne.o: tyne.S
-
-kernel.o: $(OBJS)
- $(LD) -r -o kernel.o $(OBJS)
- sync
-
-dep:
- $(CPP) -M *.[cS] > .depend
+clean:
-modules:
-
-dummy:
-
-#
-# include a dependency file if one exists
-#
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+include $(TOPDIR)/Rules.make