devices/Kbuild
branchstable-1.3
changeset 1744 7bc131b92039
parent 1732 1cc865ba17c2
equal deleted inserted replaced
1743:1a7067207637 1744:7bc131b92039
    31 #
    31 #
    32 #------------------------------------------------------------------------------
    32 #------------------------------------------------------------------------------
    33 
    33 
    34 include $(src)/../config.kbuild
    34 include $(src)/../config.kbuild
    35 
    35 
    36 EC_8139TOO_OBJ = 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
       
    37 
       
    38 obj-m := ec_8139too.o
       
    39 
       
    40 ec_8139too-objs := $(EC_8139TOO_OBJ)
       
    41 
       
    42 REV := $(shell if test -s $(src)/../svnrevision; then \
    36 REV := $(shell if test -s $(src)/../svnrevision; then \
    43 		cat $(src)/../svnrevision; \
    37 		cat $(src)/../svnrevision; \
    44 	else \
    38 	else \
    45 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
    39 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
    46 	fi)
    40 	fi)
    47 
    41 
    48 CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
    42 ifeq ($(ENABLE_8139TOO),1)
       
    43 	EC_8139TOO_OBJ := 8139too-$(KERNEL_8139TOO)-ethercat.o
       
    44 	obj-m += ec_8139too.o
       
    45 	ec_8139too-objs := $(EC_8139TOO_OBJ)
       
    46 	CFLAGS_$(EC_8139TOO_OBJ) = -DSVNREV=$(REV)
       
    47 endif
       
    48 
       
    49 ifeq ($(ENABLE_E100),1)
       
    50 	EC_E100_OBJ := e100-$(KERNEL_E100)-ethercat.o
       
    51 	obj-m += ec_e100.o
       
    52 	ec_e100-objs := $(EC_E100_OBJ)
       
    53 	CFLAGS_$(EC_E100_OBJ) = -DSVNREV=$(REV)
       
    54 endif
       
    55 
       
    56 ifeq ($(ENABLE_FORCEDETH),1)
       
    57 	EC_FORCEDETH_OBJ := forcedeth-$(KERNEL_FORCEDETH)-ethercat.o
       
    58 	obj-m += ec_forcedeth.o
       
    59 	ec_forcedeth-objs := $(EC_FORCEDETH_OBJ)
       
    60 	CFLAGS_$(EC_FORCEDETH_OBJ) = -DSVNREV=$(REV)
       
    61 endif
       
    62 
       
    63 ifeq ($(ENABLE_E1000),1)
       
    64     obj-m += e1000/
       
    65 endif
    49 
    66 
    50 #------------------------------------------------------------------------------
    67 #------------------------------------------------------------------------------