summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/dec/Makefile4
-rw-r--r--arch/mips/dec/rtc-dec.c1
-rw-r--r--drivers/tc/Makefile27
3 files changed, 29 insertions, 3 deletions
diff --git a/arch/mips/dec/Makefile b/arch/mips/dec/Makefile
index f402951bc..1d4f09910 100644
--- a/arch/mips/dec/Makefile
+++ b/arch/mips/dec/Makefile
@@ -13,7 +13,9 @@
O_TARGET := dec.o
-export-objs = wbflush.o
+all: dec.o
+
+export-objs := wbflush.o
obj-y := int-handler.o setup.o irq.o time.o reset.o rtc-dec.o wbflush.o
obj-$(CONFIG_PROM_CONSOLE) += promcon.o
diff --git a/arch/mips/dec/rtc-dec.c b/arch/mips/dec/rtc-dec.c
index f54bc89e2..af6022ba2 100644
--- a/arch/mips/dec/rtc-dec.c
+++ b/arch/mips/dec/rtc-dec.c
@@ -9,6 +9,7 @@
*
* Copyright (C) 1998 by Ralf Baechle, Harald Koerfgen
*/
+#include <asm/spinlock.h>
#include <linux/mc146818rtc.h>
extern char *dec_rtc_base;
diff --git a/drivers/tc/Makefile b/drivers/tc/Makefile
index 39a1236d6..40c43ad72 100644
--- a/drivers/tc/Makefile
+++ b/drivers/tc/Makefile
@@ -7,13 +7,36 @@
#
# Note 2! The CFLAGS definitions are now in the main makefile...
+# All of the (potential) objects that export symbols.
+# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
+
export-objs := tc.o
+# Object file lists.
+
+obj-y :=
+obj-m :=
+obj-n :=
+obj- :=
+
obj-$(CONFIG_TC) += tc.o
obj-$(CONFIG_ZS) += zs.o
obj-$(CONFIG_VT) += lk201.o lk201-map.o lk201-remap.o
-lk201-map.c: lk201-map.map
- loadkeys --mktable lk201-map.map > lk201-map.c
+# Files that are both resident and modular: remove from modular.
+
+obj-m := $(filter-out $(obj-y), $(obj-m))
+
+# Translate to Rules.make lists.
+
+L_TARGET := tc.a
+
+L_OBJS := $(sort $(filter-out $(export-objs), $(obj-y)))
+LX_OBJS := $(sort $(filter $(export-objs), $(obj-y)))
+M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
+MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
include $(TOPDIR)/Rules.make
+
+lk201-map.c: lk201-map.map
+ loadkeys --mktable lk201-map.map > lk201-map.c