devices/Kbuild
changeset 582 39f1704b0c99
parent 581 99623f8a8493
child 584 150c8a1caf25
--- a/devices/Kbuild	Wed Feb 21 10:26:19 2007 +0000
+++ b/devices/Kbuild	Wed Feb 21 10:41:54 2007 +0000
@@ -33,30 +33,28 @@
 
 include $(src)/../config.kbuild
 
-EC_8139TOO_OBJ = 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
-EC_E100_OBJ = e100-$(EC_E100_KERNEL)-ethercat.o
-EC_FORCEDETH_OBJ = forcedeth-$(EC_FORCEDETH_KERNEL)-ethercat.o
-
-obj-m := ec_8139too.o
-ifeq ($(ENABLE_E100),1)
-	obj-m += ec_e100.o
-endif
-ifeq ($(ENABLE_FORCEDETH),1)
-	obj-m += ec_forcedeth.o
-endif
-
-ec_8139too-objs := $(EC_8139TOO_OBJ)
-ec_e100-objs := $(EC_E100_OBJ)
-ec_forcedeth-objs := $(EC_FORCEDETH_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)
-CFLAGS_$(EC_E100_OBJ) = -DSVNREV=$(REV)
-CFLAGS_$(EC_FORCEDETH_OBJ) = -DSVNREV=$(REV)
+ifeq ($(EC_ENABLE_8139TOO),1)
+	obj-m += ec_8139too.o
+	ec_8139too-objs := 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
+	CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
+endif
+
+ifeq ($(EC_ENABLE_E100),1)
+	obj-m += ec_e100.o
+	ec_e100-objs := e100-$(EC_E100_KERNEL)-ethercat.o
+	CFLAGS_$(EC_E100_OBJ) = -DSVNREV=$(REV)
+endif
+
+ifeq ($(EC_ENABLE_FORCEDETH),1)
+	obj-m += ec_forcedeth.o
+	ec_forcedeth-objs := forcedeth-$(EC_FORCEDETH_KERNEL)-ethercat.o
+	CFLAGS_$(EC_FORCEDETH_OBJ) = -DSVNREV=$(REV)
+endif
 
 #------------------------------------------------------------------------------