patch-2.4.0-test7 linux/drivers/net/hamradio/Makefile
Next file: linux/drivers/net/hamradio/scc.c
Previous file: linux/drivers/net/fc/Makefile
Back to the patch index
Back to the overall index
- Lines: 182
- Date:
Sat Aug 12 12:13:10 2000
- Orig file:
v2.4.0-test6/linux/drivers/net/hamradio/Makefile
- Orig date:
Wed Aug 9 19:19:50 2000
diff -u --recursive --new-file v2.4.0-test6/linux/drivers/net/hamradio/Makefile linux/drivers/net/hamradio/Makefile
@@ -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
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)