devices/Kbuild
branchstable-1.3
changeset 1744 7bc131b92039
parent 1732 1cc865ba17c2
--- a/devices/Kbuild	Fri Aug 10 15:08:44 2007 +0000
+++ b/devices/Kbuild	Fri Aug 10 15:27:08 2007 +0000
@@ -33,18 +33,35 @@
 
 include $(src)/../config.kbuild
 
-EC_8139TOO_OBJ = 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
-
-obj-m := ec_8139too.o
-
-ec_8139too-objs := $(EC_8139TOO_OBJ)
-
 REV := $(shell if test -s $(src)/../svnrevision; then \
 		cat $(src)/../svnrevision; \
 	else \
 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
 	fi)
 
-CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
+ifeq ($(ENABLE_8139TOO),1)
+	EC_8139TOO_OBJ := 8139too-$(KERNEL_8139TOO)-ethercat.o
+	obj-m += ec_8139too.o
+	ec_8139too-objs := $(EC_8139TOO_OBJ)
+	CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
+endif
+
+ifeq ($(ENABLE_E100),1)
+	EC_E100_OBJ := e100-$(KERNEL_E100)-ethercat.o
+	obj-m += ec_e100.o
+	ec_e100-objs := $(EC_E100_OBJ)
+	CFLAGS_$(EC_E100_OBJ) = -DSVNREV=$(REV)
+endif
+
+ifeq ($(ENABLE_FORCEDETH),1)
+	EC_FORCEDETH_OBJ := forcedeth-$(KERNEL_FORCEDETH)-ethercat.o
+	obj-m += ec_forcedeth.o
+	ec_forcedeth-objs := $(EC_FORCEDETH_OBJ)
+	CFLAGS_$(EC_FORCEDETH_OBJ) = -DSVNREV=$(REV)
+endif
+
+ifeq ($(ENABLE_E1000),1)
+    obj-m += e1000/
+endif
 
 #------------------------------------------------------------------------------