Commit 66b8dbf4 authored by Kai Germaschewski's avatar Kai Germaschewski

drivers/net: Simplify linking of subdirs

Use the just introduced Rules.make extension to clean up 
drivers/net/*/Makefile.
parent aa2ac864
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Makefile for the Acorn ethercard network device drivers # Makefile for the Acorn ethercard network device drivers
# #
O_TARGET := acorn-net.o O_TARGET := built-in.o
obj-y := obj-y :=
obj-m := obj-m :=
......
...@@ -25,18 +25,8 @@ ifeq ($(CONFIG_ISDN_PPP),y) ...@@ -25,18 +25,8 @@ ifeq ($(CONFIG_ISDN_PPP),y)
obj-$(CONFIG_ISDN) += slhc.o obj-$(CONFIG_ISDN) += slhc.o
endif endif
subdir-$(CONFIG_NET_PCMCIA) += pcmcia obj-$(CONFIG_E100) += e100/
subdir-$(CONFIG_NET_WIRELESS) += wireless obj-$(CONFIG_E1000) += e1000/
subdir-$(CONFIG_E100) += e100
ifeq ($(CONFIG_E100),y)
obj-y += e100/e100.o
endif
subdir-$(CONFIG_E1000) += e1000
ifeq ($(CONFIG_E1000),y)
obj-y += e1000/e1000.o
endif
# #
# link order important here # link order important here
...@@ -75,17 +65,8 @@ obj-$(CONFIG_STNIC) += stnic.o 8390.o ...@@ -75,17 +65,8 @@ obj-$(CONFIG_STNIC) += stnic.o 8390.o
obj-$(CONFIG_FEALNX) += fealnx.o mii.o obj-$(CONFIG_FEALNX) += fealnx.o mii.o
obj-$(CONFIG_TIGON3) += tg3.o obj-$(CONFIG_TIGON3) += tg3.o
obj-$(CONFIG_TC35815) += tc35815.o obj-$(CONFIG_TC35815) += tc35815.o
obj-$(CONFIG_SK98LIN) += sk98lin/
subdir-$(CONFIG_SK98LIN) += sk98lin obj-$(CONFIG_SKFP) += skfp/
ifeq ($(CONFIG_SK98LIN),y)
obj-y += sk98lin/sk98lin.o
endif
subdir-$(CONFIG_SKFP) += skfp
ifeq ($(CONFIG_SKFP),y)
obj-y += skfp/skfp.o
endif
obj-$(CONFIG_VIA_RHINE) += via-rhine.o mii.o obj-$(CONFIG_VIA_RHINE) += via-rhine.o mii.o
obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o
...@@ -210,60 +191,17 @@ obj-$(CONFIG_MAC89x0) += mac89x0.o ...@@ -210,60 +191,17 @@ obj-$(CONFIG_MAC89x0) += mac89x0.o
obj-$(CONFIG_TUN) += tun.o obj-$(CONFIG_TUN) += tun.o
obj-$(CONFIG_DL2K) += dl2k.o obj-$(CONFIG_DL2K) += dl2k.o
subdir-$(CONFIG_ARCH_ACORN) += ../acorn/net obj-$(CONFIG_ARCH_ACORN) += ../acorn/net/
ifeq ($(CONFIG_ARCH_ACORN),y) obj-$(CONFIG_NET_FC) += fc/
obj-y += ../acorn/net/acorn-net.o obj-$(CONFIG_DEV_APPLETALK) += appletalk/
endif obj-$(CONFIG_TR) += tokenring/
obj-$(CONFIG_WAN) += wan/
subdir-$(CONFIG_NET_FC) += fc obj-$(CONFIG_ARCNET) += arcnet/
ifeq ($(CONFIG_NET_FC),y) obj-$(CONFIG_NET_PCMCIA) += pcmcia/
obj-y += fc/fc.o obj-$(CONFIG_NET_WIRELESS) += wireless/
endif obj-$(CONFIG_NET_TULIP) += tulip/
obj-$(CONFIG_HAMRADIO) += hamradio/
subdir-$(CONFIG_DEV_APPLETALK) += appletalk obj-$(CONFIG_IRDA) += irda/
ifeq ($(CONFIG_DEV_APPLETALK),y)
obj-y += appletalk/appletalk.o
endif
subdir-$(CONFIG_TR) += tokenring
ifeq ($(CONFIG_TR),y)
obj-y += tokenring/tr.o
endif
subdir-$(CONFIG_WAN) += wan
ifeq ($(CONFIG_WAN),y)
obj-y += wan/wan.o
endif
subdir-$(CONFIG_ARCNET) += arcnet
ifeq ($(CONFIG_ARCNET),y)
obj-y += arcnet/arcnetdrv.o
endif
subdir-$(CONFIG_NET_PCMCIA) += pcmcia
ifeq ($(CONFIG_NET_PCMCIA),y)
obj-y += pcmcia/pcmcia_net.o
endif
subdir-$(CONFIG_NET_WIRELESS) += wireless
ifeq ($(CONFIG_NET_WIRELESS),y)
obj-y += wireless/wireless_net.o
endif
subdir-$(CONFIG_NET_TULIP) += tulip
ifeq ($(CONFIG_NET_TULIP),y)
obj-y += tulip/tulip_net.o
endif
subdir-$(CONFIG_HAMRADIO) += hamradio
ifeq ($(CONFIG_HAMRADIO),y)
obj-y += hamradio/hamradio.o
endif
subdir-$(CONFIG_IRDA) += irda
ifeq ($(CONFIG_IRDA),y)
obj-y += irda/irda.o
endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
O_TARGET := built-in.o
obj-y := obj-y :=
obj-n := obj-n :=
obj-m := obj-m :=
...@@ -16,7 +18,5 @@ obj-$(CONFIG_IPDDP) += ipddp.o ...@@ -16,7 +18,5 @@ obj-$(CONFIG_IPDDP) += ipddp.o
obj-$(CONFIG_COPS) += cops.o obj-$(CONFIG_COPS) += cops.o
obj-$(CONFIG_LTPC) += ltpc.o obj-$(CONFIG_LTPC) += ltpc.o
O_TARGET := appletalk.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
O_TARGET := built-in.o
obj-y := obj-y :=
obj-n := obj-n :=
obj-m := obj-m :=
...@@ -22,6 +24,4 @@ obj-$(CONFIG_ARCNET_COM20020) += com20020.o ...@@ -22,6 +24,4 @@ obj-$(CONFIG_ARCNET_COM20020) += com20020.o
obj-$(CONFIG_ARCNET_COM20020_ISA) += com20020-isa.o obj-$(CONFIG_ARCNET_COM20020_ISA) += com20020-isa.o
obj-$(CONFIG_ARCNET_COM20020_PCI) += com20020-pci.o obj-$(CONFIG_ARCNET_COM20020_PCI) += com20020-pci.o
O_TARGET := arcnetdrv.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := e100.o O_TARGET := built-in.o
obj-y := e100_main.o e100_config.o e100_proc.o e100_phy.o \ obj-$(CONFIG_E100) += e100.o
e100_eeprom.o e100_test.o
obj-m := $(O_TARGET) e100-objs := e100_main.o e100_config.o e100_proc.o e100_phy.o \
e100_eeprom.o e100_test.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -7,9 +7,11 @@ ...@@ -7,9 +7,11 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := e1000.o O_TARGET := built-in.o
obj-y := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o e1000_proc.o obj-$(CONFIG_E1000) += e1000.o
obj-m := $(O_TARGET)
e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o \
e1000_proc.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Rewritten to use lists instead of if-statements. # Rewritten to use lists instead of if-statements.
# #
O_TARGET := fc.o O_TARGET := built-in.o
obj-$(CONFIG_IPHASE5526) += iph5526.o obj-$(CONFIG_IPHASE5526) += iph5526.o
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
O_TARGET := hamradio.o O_TARGET := built-in.o
export-objs = hdlcdrv.o export-objs = hdlcdrv.o
...@@ -26,12 +26,6 @@ obj-$(CONFIG_BAYCOM_SER_FDX) += baycom_ser_fdx.o hdlcdrv.o ...@@ -26,12 +26,6 @@ obj-$(CONFIG_BAYCOM_SER_FDX) += baycom_ser_fdx.o hdlcdrv.o
obj-$(CONFIG_BAYCOM_SER_HDX) += baycom_ser_hdx.o hdlcdrv.o obj-$(CONFIG_BAYCOM_SER_HDX) += baycom_ser_hdx.o hdlcdrv.o
obj-$(CONFIG_BAYCOM_PAR) += baycom_par.o hdlcdrv.o obj-$(CONFIG_BAYCOM_PAR) += baycom_par.o hdlcdrv.o
obj-$(CONFIG_BAYCOM_EPP) += baycom_epp.o hdlcdrv.o obj-$(CONFIG_BAYCOM_EPP) += baycom_epp.o hdlcdrv.o
obj-$(CONFIG_SOUNDMODEM) += hdlcdrv.o obj-$(CONFIG_SOUNDMODEM) += soundmodem/ hdlcdrv.o
subdir-$(CONFIG_SOUNDMODEM) += soundmodem
ifeq ($(CONFIG_SOUNDMODEM),y)
obj-y += soundmodem/soundmodem.o
endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -9,20 +9,21 @@ ...@@ -9,20 +9,21 @@
# parent makes.. # parent makes..
# #
O_TARGET := soundmodem.o O_TARGET := built-in.o
obj-y := sm.o obj-$(CONFIG_SOUNDMODEM) += soundmodem.o
obj-$(CONFIG_SOUNDMODEM_SBC) += sm_sbc.o
obj-$(CONFIG_SOUNDMODEM_WSS) += sm_wss.o soundmodem-y := sm.o
obj-$(CONFIG_SOUNDMODEM_AFSK1200) += sm_afsk1200.o soundmodem-$(CONFIG_SOUNDMODEM_SBC) += sm_sbc.o
obj-$(CONFIG_SOUNDMODEM_AFSK2400_7) += sm_afsk2400_7.o soundmodem-$(CONFIG_SOUNDMODEM_WSS) += sm_wss.o
obj-$(CONFIG_SOUNDMODEM_AFSK2400_8) += sm_afsk2400_8.o soundmodem-$(CONFIG_SOUNDMODEM_AFSK1200) += sm_afsk1200.o
obj-$(CONFIG_SOUNDMODEM_AFSK2666) += sm_afsk2666.o soundmodem-$(CONFIG_SOUNDMODEM_AFSK2400_7) += sm_afsk2400_7.o
obj-$(CONFIG_SOUNDMODEM_HAPN4800) += sm_hapn4800.o soundmodem-$(CONFIG_SOUNDMODEM_AFSK2400_8) += sm_afsk2400_8.o
obj-$(CONFIG_SOUNDMODEM_PSK4800) += sm_psk4800.o soundmodem-$(CONFIG_SOUNDMODEM_AFSK2666) += sm_afsk2666.o
obj-$(CONFIG_SOUNDMODEM_FSK9600) += sm_fsk9600.o soundmodem-$(CONFIG_SOUNDMODEM_HAPN4800) += sm_hapn4800.o
soundmodem-$(CONFIG_SOUNDMODEM_PSK4800) += sm_psk4800.o
obj-m := $(O_TARGET) soundmodem-$(CONFIG_SOUNDMODEM_FSK9600) += sm_fsk9600.o
soundmodem-objs := $(soundmodem-y)
all: all_targets all: all_targets
.PHONY: all .PHONY: all
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Rewritten to use lists instead of if-statements. # Rewritten to use lists instead of if-statements.
# #
O_TARGET := irda.o O_TARGET := built-in.o
export-objs = irport.o export-objs = irport.o
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the Linux PCMCIA network device drivers. # Makefile for the Linux PCMCIA network device drivers.
# #
O_TARGET := pcmcia_net.o O_TARGET := built-in.o
obj-y := obj-y :=
obj-m := obj-m :=
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
# Makefile for the SysKonnect SK-98xx device driver. # Makefile for the SysKonnect SK-98xx device driver.
# #
O_TARGET := sk98lin.o O_TARGET := built-in.o
obj-y := skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \ obj-$(CONFIG_SK98LIN) += sk98lin.o
ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \
skxmac2.o skproc.o skcsum.o sk98lin-objs := skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \
obj-m := $(O_TARGET) ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \
skxmac2.o skproc.o skcsum.o
# DBGDEF = \ # DBGDEF = \
# -DDEBUG # -DDEBUG
......
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
# Makefile for the SysKonnect FDDI PCI adapter driver # Makefile for the SysKonnect FDDI PCI adapter driver
# #
O_TARGET := skfp.o O_TARGET := built-in.o
obj-y := skfddi.o hwmtm.o fplustm.o smt.o cfm.o \
obj-$(CONFIG_SKFP) += skfp.o
skfp-objs := skfddi.o hwmtm.o fplustm.o smt.o cfm.o \
ecm.o pcmplc.o pmf.o queue.o rmt.o \ ecm.o pcmplc.o pmf.o queue.o rmt.o \
smtdef.o smtinit.o smttimer.o srf.o lnkstat.o \ smtdef.o smtinit.o smttimer.o srf.o lnkstat.o \
smtparse.o hwt.o drvfbi.o ess.o smtparse.o hwt.o drvfbi.o ess.o
obj-m := skfp.o
# NOTE: # NOTE:
# Compiling this driver produces some warnings (and some more are # Compiling this driver produces some warnings (and some more are
...@@ -16,7 +18,7 @@ obj-m := skfp.o ...@@ -16,7 +18,7 @@ obj-m := skfp.o
# drivers, and fixing it for Linux might bring problems on other # drivers, and fixing it for Linux might bring problems on other
# projects. To keep the source common for all those drivers (and # projects. To keep the source common for all those drivers (and
# thus simplify fixes to it), please do not clean it up! # thus simplify fixes to it), please do not clean it up!
EXTRA_CFLAGS += -I. -DPCI -DMEM_MAPPED_IO -Wno-strict-prototypes EXTRA_CFLAGS += -I. -DPCI -DMEM_MAPPED_IO -Wno-strict-prototypes
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
O_TARGET := built-in.o
obj-y := obj-y :=
obj-n := obj-n :=
obj-m := obj-m :=
...@@ -23,6 +25,4 @@ obj-$(CONFIG_TMSISA) += tmsisa.o ...@@ -23,6 +25,4 @@ obj-$(CONFIG_TMSISA) += tmsisa.o
obj-$(CONFIG_SMCTR) += smctr.o obj-$(CONFIG_SMCTR) += smctr.o
obj-$(CONFIG_3C359) += 3c359.o obj-$(CONFIG_3C359) += 3c359.o
O_TARGET := tr.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the Linux "Tulip" family network device drivers. # Makefile for the Linux "Tulip" family network device drivers.
# #
O_TARGET := tulip_net.o O_TARGET := built-in.o
obj-y := obj-y :=
obj-m := obj-m :=
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Rewritten to use lists instead of if-statements. # Rewritten to use lists instead of if-statements.
# #
O_TARGET := wan.o O_TARGET := built-in.o
export-objs := z85230.o syncppp.o comx.o sdladrv.o cycx_drv.o hdlc_generic.o \ export-objs := z85230.o syncppp.o comx.o sdladrv.o cycx_drv.o hdlc_generic.o \
dlci.o pc300_drv.o dlci.o pc300_drv.o
...@@ -51,12 +51,8 @@ obj-$(CONFIG_LANMEDIA) += syncppp.o ...@@ -51,12 +51,8 @@ obj-$(CONFIG_LANMEDIA) += syncppp.o
obj-$(CONFIG_SYNCLINK_SYNCPPP) += syncppp.o obj-$(CONFIG_SYNCLINK_SYNCPPP) += syncppp.o
obj-$(CONFIG_X25_ASY) += x25_asy.o obj-$(CONFIG_X25_ASY) += x25_asy.o
subdir-$(CONFIG_LANMEDIA) += lmc obj-$(CONFIG_LANMEDIA) += lmc/
ifeq ($(CONFIG_LANMEDIA),y)
obj-y += lmc/lmc.o
endif
obj-$(CONFIG_DLCI) += dlci.o obj-$(CONFIG_DLCI) += dlci.o
obj-$(CONFIG_SDLA) += sdla.o obj-$(CONFIG_SDLA) += sdla.o
ifeq ($(CONFIG_WANPIPE_MULTPPP),y) ifeq ($(CONFIG_WANPIPE_MULTPPP),y)
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
# Specifically the 1000,1200,5200,5245 # Specifically the 1000,1200,5200,5245
# #
O_TARGET := lmc.o O_TARGET := built-in.o
obj-y := lmc_debug.o lmc_media.o lmc_main.o lmc_proto.o obj-$(CONFIG_LANMEDIA) += lmc.o
obj-m := lmc.o
lmc-objs := lmc_debug.o lmc_media.o lmc_main.o lmc_proto.o
# Like above except every packet gets echoed to KERN_DEBUG # Like above except every packet gets echoed to KERN_DEBUG
# in hex # in hex
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the Linux Wireless network device drivers. # Makefile for the Linux Wireless network device drivers.
# #
O_TARGET := wireless_net.o O_TARGET := built-in.o
obj-y := obj-y :=
obj-m := obj-m :=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment