devices/Kbuild
changeset 581 99623f8a8493
parent 580 ba7e9b82ab3a
child 582 39f1704b0c99
equal deleted inserted replaced
580:ba7e9b82ab3a 581:99623f8a8493
    33 
    33 
    34 include $(src)/../config.kbuild
    34 include $(src)/../config.kbuild
    35 
    35 
    36 EC_8139TOO_OBJ = 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
    36 EC_8139TOO_OBJ = 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
    37 EC_E100_OBJ = e100-$(EC_E100_KERNEL)-ethercat.o
    37 EC_E100_OBJ = e100-$(EC_E100_KERNEL)-ethercat.o
       
    38 EC_FORCEDETH_OBJ = forcedeth-$(EC_FORCEDETH_KERNEL)-ethercat.o
    38 
    39 
    39 obj-m := ec_8139too.o
    40 obj-m := ec_8139too.o
    40 ifeq ($(ENABLE_E100),1)
    41 ifeq ($(ENABLE_E100),1)
    41 	obj-m += ec_e100.o
    42 	obj-m += ec_e100.o
    42 endif
    43 endif
       
    44 ifeq ($(ENABLE_FORCEDETH),1)
       
    45 	obj-m += ec_forcedeth.o
       
    46 endif
    43 
    47 
    44 ec_8139too-objs := $(EC_8139TOO_OBJ)
    48 ec_8139too-objs := $(EC_8139TOO_OBJ)
    45 ec_e100-objs := $(EC_E100_OBJ)
    49 ec_e100-objs := $(EC_E100_OBJ)
       
    50 ec_forcedeth-objs := $(EC_FORCEDETH_OBJ)
    46 
    51 
    47 REV := $(shell if test -s $(src)/../svnrevision; then \
    52 REV := $(shell if test -s $(src)/../svnrevision; then \
    48 		cat $(src)/../svnrevision; \
    53 		cat $(src)/../svnrevision; \
    49 	else \
    54 	else \
    50 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
    55 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
    51 	fi)
    56 	fi)
    52 
    57 
    53 CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
    58 CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
    54 CFLAGS_$(EC_E100_OBJ) = -DSVNREV=$(REV)
    59 CFLAGS_$(EC_E100_OBJ) = -DSVNREV=$(REV)
       
    60 CFLAGS_$(EC_FORCEDETH_OBJ) = -DSVNREV=$(REV)
    55 
    61 
    56 #------------------------------------------------------------------------------
    62 #------------------------------------------------------------------------------