Linux-kernel mailing list archive 2000-32,: [PATCH] convert a bunch of Makefiles in driver/net to list-style syntax

# [PATCH] convert a bunch of Makefiles in driver/net to list-style syntax

Christoph Hellwig (hch@caldera.de)
Sat, 12 Aug 2000 19:01:42 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Arjan van de Ven: "Re: char.o undefined referances"
- Previous message: Kenneth J Baker: "char.o undefined referances"

Hi Linus,
this patch converts drivers/net/fc/Makefile, drivers/net/hamradio/Makefile,
drivers/net/irda/Makefile and drivers/net/wan/Makefile to the new list-style
syntax.

498 lines remove
124 lines added

Please apply.

Christoph

    --
    Always remember that you are unique.  Just like everyone else.

    diff -uNr --exclude-from=exclude linux.orig/drivers/net/fc/Makefile linux/drivers/net/fc/Makefile
    --- linux.orig/drivers/net/fc/Makefile	Sun Aug  6 20:23:40 2000
    +++ linux/drivers/net/fc/Makefile	Sat Aug 12 18:10:37 2000
    @@ -1,27 +1,15 @@
    -
    +#
     # Makefile for linux/drivers/net/fc
     #
    -# 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).
    +# 9 Aug 2000, Christoph Hellwig <hch@caldera.de>
    +# Rewritten to use lists instead of if-statements.
     #

    -L_TARGET := fc.a
    -L_OBJS   :=
    -M_OBJS   :=
    -MX_OBJS  :=
    -FC_SRCS = $(wildcard $(L_OBJS:%.o=%.c))
    +O_TARGET := fc.o

    -ifeq ($(CONFIG_IPHASE5526),y)
    -L_OBJS += iph5526.o
    -else
    -  ifeq ($(CONFIG_IPHASE5526),m)
    -    M_OBJS += iph5526.o
    -  endif
    -endif
    +obj-$(CONFIG_IPHASE5526)	+= iph5526.o

    -include $(TOPDIR)/Rules.make
    -
    -clean:
    -	rm *.o
    +O_OBJS	:= $(obj-y)
    +M_OBJS	:= $(obj-m)

    +include $(TOPDIR)/Rules.make
    diff -uNr --exclude-from=exclude linux.orig/drivers/net/hamradio/Makefile linux/drivers/net/hamradio/Makefile
    --- linux.orig/drivers/net/hamradio/Makefile	Sun Aug  6 20:23:40 2000
    +++ linux/drivers/net/hamradio/Makefile	Sat Aug 12 18:10:37 2000
    @@ -1,153 +1,55 @@
    -# File: drivers/hamradio/Makefile
     #
     # Makefile for the Linux AX.25 and HFMODEM device drivers.
     #
    +#
     # 19971130 	Moved the amateur radio related network drivers from
     #		drivers/net/ to drivers/hamradio for easier maintainance.
     #               Joerg Reuter DL1BKE <jreuter@poboxes.com>
    +#
    +# 20000806	Rewritten to use lists instead of if-statements.
    +#		Christoph Hellwig <hch@caldera.de>
    +#

     SUB_DIRS     :=
     MOD_SUB_DIRS := $(SUB_DIRS)
    -ALL_SUB_DIRS := $(SUB_DIRS)
    +ALL_SUB_DIRS := $(SUB_DIRS) soundmodem

     O_TARGET := hamradio.o
    -O_OBJS   :=
    -M_OBJS   :=
    -
    -# Need these to keep track of whether the hdlc module should
    -# really go in the kernel or a module.
    -CONFIG_HDLCDRV_BUILTIN :=
    -CONFIG_HDLCDRV_MODULE  :=
    -
    -ifeq ($(CONFIG_DMASCC),y)
    -O_OBJS += dmascc.o
    -else
    -  ifeq ($(CONFIG_DMASCC),m)
    -  M_OBJS += dmascc.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_SCC),y)
    -O_OBJS += scc.o
    -else
    -  ifeq ($(CONFIG_SCC),m)
    -  M_OBJS += scc.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_MKISS),y)
    -O_OBJS += mkiss.o
    -else
    -  ifeq ($(CONFIG_MKISS),m)
    -  M_OBJS += mkiss.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_6PACK),y)
    -O_OBJS += 6pack.o
    -else
    -  ifeq ($(CONFIG_6PACK),m)
    -  M_OBJS += 6pack.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_YAM),y)
    -O_OBJS += yam.o
    -else
    -  ifeq ($(CONFIG_YAM),m)
    -  M_OBJS += yam.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_PI),y)
    -O_OBJS += pi2.o
    -else
    -  ifeq ($(CONFIG_PI),m)
    -  M_OBJS += pi2.o
    -  endif
    -endif

    -ifeq ($(CONFIG_PT),y)
    -O_OBJS += pt.o
    -else
    -  ifeq ($(CONFIG_PT),m)
    -  M_OBJS += pt.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_BPQETHER),y)
    -O_OBJS += bpqether.o
    -else
    -  ifeq ($(CONFIG_BPQETHER),m)
    -  M_OBJS += bpqether.o
    -  endif
    -endif
    +export-objs	= hdlcdrv.o

    -ifeq ($(CONFIG_BAYCOM_SER_FDX),y)
    -O_OBJS += baycom_ser_fdx.o
    -CONFIG_HDLCDRV_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_BAYCOM_SER_FDX),m)
    -  CONFIG_HDLCDRV_MODULE = y
    -  M_OBJS += baycom_ser_fdx.o
    -  endif
    -endif

    -ifeq ($(CONFIG_BAYCOM_SER_HDX),y)
    -O_OBJS += baycom_ser_hdx.o
    -CONFIG_HDLCDRV_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_BAYCOM_SER_HDX),m)
    -  CONFIG_HDLCDRV_MODULE = y
    -  M_OBJS += baycom_ser_hdx.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_BAYCOM_PAR),y)
    -O_OBJS += baycom_par.o
    -CONFIG_HDLCDRV_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_BAYCOM_PAR),m)
    -  CONFIG_HDLCDRV_MODULE = y
    -  M_OBJS += baycom_par.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_BAYCOM_EPP),y)
    -O_OBJS += baycom_epp.o
    -CONFIG_HDLCDRV_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_BAYCOM_EPP),m)
    -  CONFIG_HDLCDRV_MODULE = y
    -  M_OBJS += baycom_epp.o
    -  endif
    -endif
    +obj-$(CONFIG_DMASCC)		+= dmascc.o
    +obj-$(CONFIG_SCC)		+= scc.o
    +obj-$(CONFIG_MKISS)		+= mkiss.o
    +obj-$(CONFIG_6PACK)		+= 6pack.o
    +obj-$(CONFIG_YAM)		+= yam.o
    +obj-$(CONFIG_PI)		+= pi2.o
    +obj-$(CONFIG_PT)		+= pt.o
    +obj-$(CONFIG_BPQETHER)		+= bpqether.o
    +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_PAR)	+= baycom_par.o		hdlcdrv.o
    +obj-$(CONFIG_BAYCOM_EPP)	+= baycom_epp.o		hdlcdrv.o
    +obj-$(CONFIG_SOUNDMODEM)	+= 			hdlcdrv.o

     ifeq ($(CONFIG_SOUNDMODEM),y)
    -ALL_SUB_DIRS += soundmodem
     SUB_DIRS += soundmodem
     O_OBJS += soundmodem/soundmodem.o
    -CONFIG_HDLCDRV_BUILTIN = y
     else
       ifeq ($(CONFIG_SOUNDMODEM),m)
    -  CONFIG_HDLCDRV_MODULE = y
    -  ALL_SUB_DIRS += soundmodem
       MOD_SUB_DIRS += soundmodem
       endif
     endif

    -# If anything built-in uses the hdlcdrv, then build it into the kernel also.
    -# If not, but a module uses it, build as a module.
    -ifdef CONFIG_HDLCDRV_BUILTIN
    -OX_OBJS += hdlcdrv.o
    -else
    -  ifdef CONFIG_HDLCDRV_MODULE
    -  MX_OBJS += hdlcdrv.o
    -  endif
    -endif
    +# Files that are both resident and modular: remove from modular.
    +obj-m		:= $(filter-out $(obj-y), $(obj-m))

    -include $(TOPDIR)/Rules.make
    +# Translate to Rules.make lists.
    +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)))

    -clean:
    -	rm -f core *.o *.a *.s
    +include $(TOPDIR)/Rules.make
    diff -uNr --exclude-from=exclude linux.orig/drivers/net/irda/Makefile linux/drivers/net/irda/Makefile
    --- linux.orig/drivers/net/irda/Makefile	Sun Aug  6 20:23:40 2000
    +++ linux/drivers/net/irda/Makefile	Sat Aug 12 18:10:37 2000
    @@ -1,121 +1,40 @@
    -# File: drivers/irda/Makefile
     #
     # Makefile for the Linux IrDA infrared port device drivers.
     #
    +# 9 Aug 2000, Christoph Hellwig <hch@caldera.de>
    +# Rewritten to use lists instead of if-statements.
    +#

     SUB_DIRS     :=
     MOD_SUB_DIRS := $(SUB_DIRS)
     ALL_SUB_DIRS := $(SUB_DIRS)

    -L_TARGET := irda_drivers.a
    -L_OBJS   :=
    -M_OBJS   :=
    -
    -ifeq ($(CONFIG_IRTTY_SIR),y)
    -L_OBJS += irtty.o
    -else
    -  ifeq ($(CONFIG_IRTTY_SIR),m)
    -  M_OBJS += irtty.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_IRPORT_SIR),y)
    -LX_OBJS += irport.o
    -else
    -  ifeq ($(CONFIG_IRPORT_SIR),m)
    -  MX_OBJS += irport.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_NSC_FIR),y)
    -L_OBJS += nsc-ircc.o
    -else
    -  ifeq ($(CONFIG_NSC_FIR),m)
    -  M_OBJS += nsc-ircc.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_WINBOND_FIR),y)
    -L_OBJS += w83977af_ir.o
    -else
    -  ifeq ($(CONFIG_WINBOND_FIR),m)
    -  M_OBJS += w83977af_ir.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_TOSHIBA_FIR),y)
    -L_OBJS += toshoboe.o
    -else
    -  ifeq ($(CONFIG_TOSHIBA_FIR),m)
    -  M_OBJS += toshoboe.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_SMC_IRCC_FIR),y)
    -L_OBJS += smc-ircc.o
    -LX_OBJS += irport.o
    -else
    -  ifeq ($(CONFIG_SMC_IRCC_FIR),m)
    -  M_OBJS += smc-ircc.o
    -  MX_OBJS += irport.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_ESI_DONGLE),y)
    -L_OBJS += esi.o
    -else
    -  ifeq ($(CONFIG_ESI_DONGLE),m)
    -  M_OBJS += esi.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_TEKRAM_DONGLE),y)
    -L_OBJS += tekram.o
    -else
    -  ifeq ($(CONFIG_TEKRAM_DONGLE),m)
    -  M_OBJS += tekram.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_ACTISYS_DONGLE),y)
    -L_OBJS += actisys.o
    -else
    -  ifeq ($(CONFIG_ACTISYS_DONGLE),m)
    -  M_OBJS += actisys.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_GIRBIL_DONGLE),y)
    -L_OBJS += girbil.o
    -else
    -  ifeq ($(CONFIG_GIRBIL_DONGLE),m)
    -  M_OBJS += girbil.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_LITELINK_DONGLE),y)
    -L_OBJS += litelink.o
    -else
    -  ifeq ($(CONFIG_LITELINK_DONGLE),m)
    -  M_OBJS += litelink.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_OLD_BELKIN_DONGLE),y)
    -L_OBJS += old_belkin.o
    -else
    -  ifeq ($(CONFIG_OLD_BELKIN_DONGLE),m)
    -  M_OBJS += old_belkin.o
    -  endif
    -endif
    -
    -include $(TOPDIR)/Rules.make
    -
    -clean:
    -	rm -f core *.o *.a *.s
    -
    -
    +O_TARGET := irda.o

    +export-objs	= irport.o

    +obj-$(CONFIG_IRTTY_SIR)		+= irtty.o
    +obj-$(CONFIG_IRPORT_SIR)	+= 		irport.o
    +obj-$(CONFIG_NSC_FIR)		+= nsc-ircc.o
    +obj-$(CONFIG_WINBOND_FIR)	+= w83977af_ir.o
    +obj-$(CONFIG_TOSHIBA_FIR)	+= toshoboe.o
    +obj-$(CONFIG_SMC_IRCC_FIR)	+= smc-ircc.o	irport.o
    +obj-$(CONFIG_ESI_DONGLE)	+= esi.o
    +obj-$(CONFIG_TEKRAM_DONGLE)	+= tekram.o
    +obj-$(CONFIG_ACTISYS_DONGLE)	+= actisys.o
    +obj-$(CONFIG_GIRBIL_DONGLE)	+= girbil.o
    +obj-$(CONFIG_LITELINK_DONGLE)	+= litelink.o
    +obj-$(CONFIG_OLD_BELKIN_DONGLE)	+= old_belkin.o
    +
    +
    +# Files that are both resident and modular: remove from modular.
    +obj-m		:= $(filter-out $(obj-y), $(obj-m))
    +
    +# Translate to Rules.make lists.
    +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
    diff -uNr --exclude-from=exclude linux.orig/drivers/net/wan/Makefile linux/drivers/net/wan/Makefile
    --- linux.orig/drivers/net/wan/Makefile	Mon Aug  7 07:20:09 2000
    +++ linux/drivers/net/wan/Makefile	Sat Aug 12 18:18:13 2000
    @@ -1,269 +1,86 @@
    -# File: drivers/net/wan/Makefile
     #
     # Makefile for the Linux network (wan) 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 definition is now inherited from the
    -# parent makefile.
    +# 3 Aug 2000, Christoph Hellwig <hch@caldera.de>
    +# Rewritten to use lists instead of if-statements.
     #

     SUB_DIRS     :=
     MOD_SUB_DIRS := $(SUB_DIRS)
     ALL_SUB_DIRS := $(SUB_DIRS) lmc

    -L_TARGET := wan.a
    -L_OBJS   :=
    -M_OBJS   :=
    -
    -# Need these to keep track of whether the 82530 or SYNCPPP
    -# modules should really go in the kernel or a module.
    -CONFIG_85230_BUILTIN :=
    -CONFIG_85230_MODULE  :=
    -CONFIG_SYNCPPP_BUILTIN :=
    -CONFIG_SYNCPPP_MODULE  :=
    -
    -ifeq ($(CONFIG_HOSTESS_SV11),y)
    -L_OBJS += hostess_sv11.o
    -CONFIG_85230_BUILTIN = y
    -CONFIG_SYNCPPP_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_HOSTESS_SV11),m)
    -  CONFIG_85230_MODULE = y
    -  CONFIG_SYNCPPP_MODULE = y
    -  M_OBJS += hostess_sv11.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_SEALEVEL_4021),y)
    -L_OBJS += sealevel.o
    -CONFIG_85230_BUILTIN = y
    -CONFIG_SYNCPPP_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_SEALEVEL_4021),m)
    -  CONFIG_85230_MODULE = y
    -  CONFIG_SYNCPPP_MODULE = y
    -  M_OBJS += sealevel.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_SYNCLINK_SYNCPPP),y)
    -CONFIG_SYNCPPP_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_SYNCLINK_SYNCPPP),m)
    -  CONFIG_SYNCPPP_MODULE = y
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_COMX),y)
    -LX_OBJS += comx.o
    -else
    -  ifeq ($(CONFIG_COMX),m)
    -  MX_OBJS += comx.o
    -  endif
    -endif
    +O_TARGET := wan.a

    -ifeq ($(CONFIG_COMX_HW_COMX),y)
    -L_OBJS += comx-hw-comx.o
    -else
    -  ifeq ($(CONFIG_COMX_HW_COMX),m)
    -  M_OBJS += comx-hw-comx.o
    -  endif
    -endif
    +export-objs =	z85230.o syncppp.o comx.o sdladrv.o cycx_drv.o
    +list-multi =	wanpipe.o cyclomx.o

    -ifeq ($(CONFIG_COMX_HW_LOCOMX),y)
    -L_OBJS += comx-hw-locomx.o
    -CONFIG_85230_BUILTIN=y
    -CONFIG_SYNCPPP_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_COMX_HW_LOCOMX),m)
    -  M_OBJS += comx-hw-locomx.o
    -  CONFIG_85230_MODULE=y
    -  CONFIG_SYNCPPP_MODULE = y
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_COMX_HW_MIXCOM),y)
    -L_OBJS += comx-hw-mixcom.o
    -else
    -  ifeq ($(CONFIG_COMX_HW_MIXCOM),m)
    -  M_OBJS += comx-hw-mixcom.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_COMX_PROTO_PPP),y)
    -L_OBJS += comx-proto-ppp.o
    -CONFIG_SYNCPPP_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_COMX_PROTO_PPP),m)
    -  M_OBJS += comx-proto-ppp.o
    -  CONFIG_SYNCPPP_MODULE = y
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_COMX_PROTO_LAPB),y)
    -L_OBJS += comx-proto-lapb.o
    -else
    -  ifeq ($(CONFIG_COMX_PROTO_LAPB),m)
    -  M_OBJS += comx-proto-lapb.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_COMX_PROTO_FR),y)
    -L_OBJS += comx-proto-fr.o
    -else
    -  ifeq ($(CONFIG_COMX_PROTO_FR),m)
    -  M_OBJS += comx-proto-fr.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_COSA),y)
    -L_OBJS += cosa.o
    -CONFIG_SYNCPPP_BUILTIN = y
    -else
    -  ifeq ($(CONFIG_COSA),m)
    -  CONFIG_SYNCPPP_MODULE = y
    -  M_OBJS += cosa.o
    -  endif
    -endif
    +wanpipe-objs = sdlamain.o $(wanpipe-y)
    +wanpipe-$(CONFIG_WANPIPE_X25)	+= sdla_x25.o
    +wanpipe-$(CONFIG_WANPIPE_FR)	+= sdla_fr.o
    +wanpipe-$(CONFIG_WANPIPE_CHDLC)	+= sdla_chdlc.o
    +wanpipe-$(CONFIG_WANPIPE_PPP)	+= sdla_ppp.o
    +
    +cyclomx-objs = cycx_main.o $(cyclomx-y)
    +cyclomx-$(CONFIG_CYCLOMX_X25)	+= cycx_x25.o
    +
    +
    +obj-$(CONFIG_HOSTESS_SV11)	+= z85230.o	syncppp.o	hostess_sv11.o
    +obj-$(CONFIG_SEALEVEL_4021)	+= z85230.o	syncppp.o	sealevel.o
    +obj-$(CONFIG_COMX)		+= 				comx.o
    +obj-$(CONFIG_COMX_HW_COMX)	+= 				comx-hw-comx.o
    +obj-$(CONFIG_COMX_HW_LOCOMX)	+= cz85230.o	syncppp.o	comx-hw-locomx.o
    +obj-$(CONFIG_COMX_HW_MIXCOM)	+=				comx-hw-mixcom.o
    +obj-$(CONFIG_COMX_PROTO_PPP)	+=		syncppp.o	comx-proto-ppp.o
    +obj-$(CONFIG_COMX_PROTO_LAPB)	+=				comx-proto-lapb.o
    +obj-$(CONFIG_COMX_PROTO_FR)	+=				comx-proto-fr.o
    +obj-$(CONFIG_COSA)		+=		syncppp.o	cosa.o
    +obj-$(CONFIG_LANMEDIA)		+=		syncppp.o

     ifeq ($(CONFIG_LANMEDIA),y)
       SUB_DIRS += lmc
       MOD_IN_SUB_DIRS += lmc
    -  L_OBJS += lmc/lmc.o
    -  CONFIG_SYNCPPP_BUILTIN = y
    +  obj-y += lmc/lmc.o
     else
       ifeq ($(CONFIG_LANMEDIA),m)
    -  CONFIG_SYNCPPP_MODULE = y
       MOD_IN_SUB_DIRS += lmc
       endif
     endif

    -
    -# If anything built-in uses syncppp, then build it into the kernel also.
    -# If not, but a module uses it, build as a module.
    -
    -ifdef CONFIG_SYNCPPP_BUILTIN
    -LX_OBJS += syncppp.o
    -else
    -  ifdef CONFIG_SYNCPPP_MODULE
    -  MX_OBJS += syncppp.o
    -  endif
    -endif
    -
    -# If anything built-in uses Z85230, then build it into the kernel also.
    -# If not, but a module uses it, build as a module.
    -
    -ifdef CONFIG_85230_BUILTIN
    -LX_OBJS += z85230.o
    -else
    -  ifdef CONFIG_85230_MODULE
    -  MX_OBJS += z85230.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_DLCI),y)
    -L_OBJS += dlci.o
    -else
    -  ifeq ($(CONFIG_DLCI),m)
    -  M_OBJS += dlci.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_SDLA),y)
    -  L_OBJS += sdla.o
    -else
    -  ifeq ($(CONFIG_SDLA),m)
    -  M_OBJS += sdla.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_VENDOR_SANGOMA),y)
    -  LX_OBJS += sdladrv.o
    -  L_OBJS += sdlamain.o
    -  ifeq ($(CONFIG_WANPIPE_X25),y)
    -    L_OBJS += sdla_x25.o
    -  endif
    -  ifeq ($(CONFIG_WANPIPE_CHDLC),y)
    -    L_OBJS += sdla_chdlc.o
    -  endif
    -  ifeq ($(CONFIG_WANPIPE_FR),y)
    -    L_OBJS += sdla_fr.o
    -  endif
    -  ifeq ($(CONFIG_WANPIPE_PPP),y)
    -    L_OBJS += sdla_ppp.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_VENDOR_SANGOMA),m)
    -  MX_OBJS += sdladrv.o
    -  M_OBJS += wanpipe.o
    -  WANPIPE_OBJS = sdlamain.o
    -  ifeq ($(CONFIG_WANPIPE_X25),y)
    -    WANPIPE_OBJS += sdla_x25.o
    -  endif
    -  ifeq ($(CONFIG_WANPIPE_FR),y)
    -    WANPIPE_OBJS += sdla_fr.o
    -  endif
    -  ifeq ($(CONFIG_WANPIPE_CHDLC),y)
    -    WANPIPE_OBJS += sdla_chdlc.o
    -  endif
    -  ifeq ($(CONFIG_WANPIPE_PPP),y)
    -    WANPIPE_OBJS += sdla_ppp.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_CYCLADES_SYNC),y)
    -  LX_OBJS += cycx_drv.o
    -  L_OBJS += cycx_main.o
    -  ifeq ($(CONFIG_CYCLOMX_X25),y)
    -    L_OBJS += cycx_x25.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_CYCLADES_SYNC),m)
    -  MX_OBJS += cycx_drv.o
    -  M_OBJS += cyclomx.o
    -  CYCLOMX_OBJS = cycx_main.o
    -  ifeq ($(CONFIG_CYCLOMX_X25),y)
    -    CYCLOMX_OBJS += cycx_x25.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_X25_ASY),y)
    -L_OBJS += x25_asy.o
    -else
    -  ifeq ($(CONFIG_X25_ASY),m)
    -  M_OBJS += x25_asy.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_LAPBETHER),y)
    -L_OBJS += lapbether.o
    -else
    -  ifeq ($(CONFIG_LAPBETHER),m)
    -  M_OBJS += lapbether.o
    -  endif
    -endif
    -
    -ifeq ($(CONFIG_SBNI),y)
    -L_OBJS += sbni.o
    -else
    -  ifeq ($(CONFIG_SBNI),m)
    -  M_OBJS += sbni.o
    -  endif
    -endif
    +obj-$(CONFIG_DLCI)		+= dlci.o
    +obj-$(CONFIG_SDLA)		+= sdla.o
    +obj-$(CONFIG_VENDOR_SANGOMA)	+= sdladrv.o wanpipe.o
    +obj-$(CONFIG_CYCLADES_SYNC)	+= cycx_drv.o cyclomx.o
    +obj-$(CONFIG_LAPBETHER)		+= lapbether.o
    +obj-$(CONFIG_SBNI)		+= sbni.o
    +
    +
    +# Extract lists of the multi-part drivers.
    +# The 'int-*' lists are the intermediate files used to build the multi's.
    +multi-y		:= $(filter $(list-multi), $(obj-y))
    +multi-m		:= $(filter $(list-multi), $(obj-m))
    +int-y		:= $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
    +int-m		:= $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
    +
    +# Files that are both resident and modular: remove from modular.
    +obj-m		:= $(filter-out $(obj-y), $(obj-m))
    +int-m		:= $(filter-out $(int-y), $(int-m))
    +
    +# Take multi-part drivers out of obj-y and put components in.
    +obj-y		:= $(filter-out $(list-multi), $(obj-y)) $(int-y)
    +
    +# Translate to Rules.make lists.
    +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)))
    +MI_OBJS		:= $(sort $(filter-out $(export-objs), $(int-m)))
    +MIX_OBJS	:= $(sort $(filter     $(export-objs), $(int-m)))

     include $(TOPDIR)/Rules.make

    -clean:
    -	rm -f core *.o *.a *.s
    -
    -wanpipe.o: $(WANPIPE_OBJS)
    -	$(LD) -r -o $@ $(WANPIPE_OBJS)
    +wanpipe.o: $(wanpipe-objs)
    +	$(LD) -r -o $@ $(wanpipe-objs)

    -cyclomx.o: $(CYCLOMX_OBJS)
    -	$(LD) -r -o $@ $(CYCLOMX_OBJS)
    +cyclomx.o: $(cyclomx-objs)
    +	$(LD) -r -o $@ $(cyclomx-objs)

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

- Next message: Arjan van de Ven: "Re: char.o undefined referances"
- Previous message: Kenneth J Baker: "char.o undefined referances"