hmm...

--
Bartlomiej Zolnierkiewicz
<[EMAIL PROTECTED]>
--- linux-240t9/drivers/sbus/audio/Makefile     Fri Nov 20 17:58:21 1998
+++ linux/drivers/sbus/audio/Makefile   Sat Oct  7 22:39:48 2000
@@ -1,76 +1,23 @@
 #
-# Makefile for the linux kernel.
+# Makefile for the kernel SPARC audio drivers.
 #
-# 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).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-#
-# sbus audio drivers
+# 7 October 2000, Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
+# Rewritten to use lists instead of if-statements.
 #
 
 O_TARGET := sparcaudio.o
-O_OBJS   :=
-M_OBJS   :=
-M :=
-MM :=
-
-ifeq ($(CONFIG_SPARCAUDIO),y)
-M=y
-else
-  ifeq ($(CONFIG_SPARCAUDIO),m)
-  MM=y
-  endif
-endif
-
-ifeq ($(CONFIG_SPARCAUDIO_AMD7930),y)
-M=y
-OX_OBJS += amd7930.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_AMD7930),m)
-  MM=y
-  MX_OBJS += amd7930.o
-  endif
-endif
-
-ifeq ($(CONFIG_SPARCAUDIO_CS4231),y)
-M=y
-O_OBJS += cs4231.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_CS4231),m)
-  MM=y
-  M_OBJS += cs4231.o
-  endif
-endif
-
-ifeq ($(CONFIG_SPARCAUDIO_DBRI),y)
-M=y
-OX_OBJS += dbri.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_DBRI),m)
-  MM=y
-  MX_OBJS += dbri.o
-  endif
-endif
 
-ifeq ($(CONFIG_SPARCAUDIO_DUMMY),y)
-M=y
-O_OBJS += dmy.o
-else
-  ifeq ($(CONFIG_SPARCAUDIO_DUMMY),m)
-  MM=y
-  M_OBJS += dmy.o
-  endif
-endif
+export-objs    := audio.o amd7930.o dbri.o
 
-ifdef M
-OX_OBJS += audio.o
-else
-  ifdef MM
-  MX_OBJS += audio.o
-  endif
-endif
+obj-$(CONFIG_SPARCAUDIO)               += audio.o
+obj-$(CONFIG_SPARCAUDIO_AMD7930)       += amd7930.o
+obj-$(CONFIG_SPARCAUDIO_CS4231)                += cs4231.o
+obj-$(CONFIG_SPARCAUDIO_DBRI)          += dbri.o
+obj-$(CONFIG_SPARCAUDIO_DUMMY)         += dmy.o
+
+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)))
 
 include $(TOPDIR)/Rules.make
--- linux-240t9/drivers/sbus/char/Makefile      Tue Oct  3 00:18:24 2000
+++ linux/drivers/sbus/char/Makefile    Sat Oct  7 22:33:28 2000
@@ -1,128 +1,47 @@
 #
-# Makefile for the linux kernel.
+# Makefile for the kernel miscellaneous SPARC device drivers.
 #
-# 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).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
 # Dave Redman Frame Buffer tuning support.
-# OK this is kind of ugly but it does allow drivers to be added fairly
-# easily. and you can even choose what sort of support you want.
+#
+# 7 October 2000, Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
+# Rewritten to use lists instead of if-statements.
+#
 
 O_TARGET := sunchar.o
 O_OBJS   := ${O_OBJ} sunkbd.o sunkbdmap.o sunmouse.o sunserial.o zs.o
-M_OBJS   :=
 
-ifeq ($(ARCH),sparc64)
+vfc-objs := vfc_dev.o vfc_i2c.o
 
 ifeq ($(CONFIG_PCI),y)
-
-OX_OBJS += su.o
-O_OBJS += pcikbd.o
-
-ifeq ($(CONFIG_SAB82532),y)
-O_OBJS += sab82532.o
-else
-  ifeq ($(CONFIG_SAB82532),m)
-  M_OBJS += sab82532.o
-  endif
-endif
-
-ifeq ($(CONFIG_ENVCTRL),y)
-O_OBJS += envctrl.o
-else
-  ifeq ($(CONFIG_ENVCTRL),m)
-  M_OBJS += envctrl.o
-  endif
-endif
-
-ifeq ($(CONFIG_DISPLAY7SEG),y)
-O_OBJS += display7seg.o
-else
-  ifeq ($(CONFIG_DISPLAY7SEG),m)
-  M_OBJS += display7seg.o
-  endif
-endif
-
-endif # eq($(CONFIG_PCI,y)
-
-ifeq ($(CONFIG_OBP_FLASH),y)
-O_OBJS += flash.o
-else
-  ifeq ($(CONFIG_OBP_FLASH),m)
-  M_OBJS += flash.o
-  endif
+OX_OBJS        += su.o
+O_OBJS += pcikbd.o
 endif
 
-else # !eq($(ARCH),sparc64)
+ifeq ($(ARCH),sparc64)
 
 ifeq ($(CONFIG_PCI),y)
-OX_OBJS += su.o
-O_OBJS += pcikbd.o
-endif
-
-endif # !eq($(ARCH),sparc64)
-
-ifeq ($(CONFIG_SUN_OPENPROMIO),y)
-O_OBJS += openprom.o
-else
-  ifeq ($(CONFIG_SUN_OPENPROMIO),m)
-  M_OBJS += openprom.o
-  endif
+obj-$(CONFIG_SAB82532)                 += sab82532.o
+obj-$(CONFIG_ENVCTRL)                  += envctrl.o
+obj-$(CONFIG_DISPLAY7SEG)              += display7seg.o
 endif
 
-ifeq ($(CONFIG_SUN_MOSTEK_RTC),y)
-O_OBJS += rtc.o
-else
-  ifeq ($(CONFIG_SUN_MOSTEK_RTC),m)
-  M_OBJS += rtc.o
-  endif
+obj-$(CONFIG_OBP_FLASH)                        += flash.o
 endif
 
-ifeq ($(CONFIG_SUN_BPP),y)
-O_OBJS += bpp.o
-else
-  ifeq ($(CONFIG_SUN_BPP),m)
-  M_OBJS += bpp.o
-  endif
-endif
-
-ifeq ($(CONFIG_SUN_VIDEOPIX),y)
-O_OBJS += vfc.o
-else
-  ifeq ($(CONFIG_SUN_VIDEOPIX),m)
-  M_OBJS += vfc.o
-  endif
-endif
+obj-$(CONFIG_SUN_OPENPROMIO)           += openprom.o
+obj-$(CONFIG_SUN_MOSTEK_RTC)           += rtc.o
+obj-$(CONFIG_SUN_BPP)                  += bpp.o
+obj-$(CONFIG_SUN_VIDEOPIX)             += vfc.o
+obj-$(CONFIG_SUN_AURORA)               += aurora.o
+obj-$(CONFIG_TADPOLE_TS102_UCTRL)      += uctrl.o
+obj-$(CONFIG_SUN_JSFLASH)              += jsflash.o
 
-ifeq ($(CONFIG_SUN_AURORA),y)
-O_OBJS += aurora.o
-else
-  ifeq ($(CONFIG_SUN_AURORA),m)
-  M_OBJS += aurora.o
-  endif
-endif
-
-ifeq ($(CONFIG_TADPOLE_TS102_UCTRL),y)
-O_OBJS += uctrl.o
-else
-  ifeq ($(CONFIG_TADPOLE_TS102_UCTRL),m)
-  M_OBJS += uctrl.o
-  endif
-endif
-
-ifeq ($(CONFIG_SUN_JSFLASH),y)
-O_OBJS += jsflash.o
-endif
-ifeq ($(CONFIG_SUN_JSFLASH),m)
-M_OBJS += jsflash.o
-endif
+O_OBJS := $(obj-y)
+M_OBJS := $(obj-m)
 
 include $(TOPDIR)/Rules.make
 
 sunkbdmap.o: sunkeymap.c
 
-vfc.o: vfc_dev.o vfc_i2c.o
-       $(LD) -r -o vfc.o vfc_dev.o vfc_i2c.o
+vfc.o: $(vfc-objs)
+       $(LD) -r -o $@ $(vfc-objs)

Reply via email to