patch-2.3.50 linux/drivers/net/tokenring/Makefile

Next file: linux/drivers/net/via-rhine.c
Previous file: linux/drivers/net/tokenring/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.49/linux/drivers/net/tokenring/Makefile linux/drivers/net/tokenring/Makefile
@@ -5,73 +5,29 @@
 # removes any old dependencies. DON'T put your own dependencies here
 # unless it's something special (ie not a .c file).
 #
-# Note 2! The CFLAGS definition is now inherited from the
-# parent makefile.
-#
 
-#
-# Note : at this point, these files are compiled on all systems.
-# In the future, some of these should be built conditionally.
-#
-
-SUB_DIRS     := 
+SUB_DIRS     :=
 MOD_SUB_DIRS := $(SUB_DIRS)
 ALL_SUB_DIRS := $(SUB_DIRS)
 
+obj-y   :=
+obj-n   :=
+obj-m   :=
+obj-    :=
+export-objs :=
+
+obj-$(CONFIG_IBMTR) 	+= ibmtr.o
+obj-$(CONFIG_IBMOL) 	+= olympic.o
+obj-$(CONFIG_TMS380TR) 	+= tms380tr.o
+obj-$(CONFIG_ABYSS) 	+= abyss.o
+obj-$(CONFIG_MADGEMC) 	+= madgemc.o
+obj-$(CONFIG_TMSPCI) 	+= tmspci.o
+obj-$(CONFIG_SMCTR) 	+= smctr.o
 
 L_TARGET := tr.a
-L_OBJS   := 
-M_OBJS   :=
-
-ifeq ($(CONFIG_IBMTR),y)
-  L_OBJS += ibmtr.o
-else
-  ifeq ($(CONFIG_IBMTR),m)
-    M_OBJS += ibmtr.o
-  endif
-endif
-
-ifeq ($(CONFIG_IBMOL),y)
-  L_OBJS += olympic.o
-else
-  ifeq ($(CONFIG_IBMOL),m)
-    M_OBJS += olympic.o
-  endif
-endif
-
-ifeq ($(CONFIG_TMS380TR),y)
-  L_OBJS += tms380tr.o
-  ifeq ($(CONFIG_ABYSS),y)
-    L_OBJS += abyss.o
-  endif
- ifeq ($(CONFIG_MADGEMC),y)
-    L_OBJS += madgemc.o
-  endif
-  ifeq ($(CONFIG_TMSPCI),y)
-    L_OBJS += tmspci.o
-  endif
-else
-  ifeq ($(CONFIG_TMS380TR),m)
-    M_OBJS += tms380tr.o
-    ifeq ($(CONFIG_ABYSS),m)
-      M_OBJS += abyss.o
-    endif
-    ifeq ($(CONFIG_MADGEMC),m)
-      M_OBJS += madgemc.o
-    endif
-    ifeq ($(CONFIG_TMSPCI),m)
-      M_OBJS += tmspci.o
-    endif
-  endif
-endif
-
-ifeq ($(CONFIG_SMCTR),y)
-  L_OBJS += smctr.o
-else
-  ifeq ($(CONFIG_SMCTR),m)
-    M_OBJS += smctr.o
-  endif
-endif
+L_OBJS   := $(filter-out $(export-objs), $(obj-y))
+LX_OBJS  := $(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
-

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