devices/Kbuild
changeset 473 e34754cd973e
parent 445 3b7eec329112
child 485 8354ddf38481
equal deleted inserted replaced
472:bd2e0f220289 473:e34754cd973e
    29 #  standard) as the (only) precondition to have the right to use EtherCAT
    29 #  standard) as the (only) precondition to have the right to use EtherCAT
    30 #  Technology, IP and trade marks.
    30 #  Technology, IP and trade marks.
    31 #
    31 #
    32 #------------------------------------------------------------------------------
    32 #------------------------------------------------------------------------------
    33 
    33 
       
    34 EC_MOD_KERNEL := $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
       
    35 
    34 obj-m := ec_8139too.o
    36 obj-m := ec_8139too.o
    35 
    37 
    36 ec_8139too-objs := 8139too.o
    38 ec_8139too-objs := 8139too-$(EC_MOD_KERNEL)-ethercat.o
    37 
    39 
    38 REV := $(shell if test -s $(src)/../svnrevision; then \
    40 REV := $(shell if test -s $(src)/../svnrevision; then \
    39 		cat $(src)/../svnrevision; \
    41 		cat $(src)/../svnrevision; \
    40 	else \
    42 	else \
    41 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
    43 		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
    42 	fi)
    44 	fi)
    43 
    45 
    44 CFLAGS_8139too.o = -DSVNREV=$(REV)
    46 CFLAGS_8139too-$(EC_MOD_KERNEL)-ethercat.o = -DSVNREV=$(REV)
    45 
    47 
    46 #------------------------------------------------------------------------------
    48 #------------------------------------------------------------------------------