drivers/Makefile
changeset 54 7506e67dd122
parent 53 6b3b8acb71b5
child 55 059a9e712aa7
equal deleted inserted replaced
53:6b3b8acb71b5 54:7506e67dd122
     1 #------------------------------------------------------------------------------
       
     2 #
       
     3 #  Makefile
       
     4 #
       
     5 #  IgH EtherCAT-Treiber
       
     6 #
       
     7 #  $Id$
       
     8 #
       
     9 #------------------------------------------------------------------------------
       
    10 
       
    11 ifneq ($(KERNELRELEASE),)
       
    12 
       
    13 #------------------------------------------------------------------------------
       
    14 # Kbuild-Abschnitt
       
    15 
       
    16 obj-m := 8139too-ecat.o ecat-master.o
       
    17 
       
    18 8139too-ecat-objs := 8139too.o
       
    19 
       
    20 ecat-master-objs := ec_module.o ec_master.o ec_device.o ec_slave.o \
       
    21 			ec_command.o ec_types.o ec_domain.o
       
    22 
       
    23 REV = `svnversion $(src)`
       
    24 DATE = `date`
       
    25 
       
    26 EXTRA_CFLAGS = -DEC_REV="$(REV)" -DEC_USER="$(USER)" -DEC_DATE="$(DATE)"
       
    27 
       
    28 #------------------------------------------------------------------------------
       
    29 
       
    30 else
       
    31 
       
    32 #------------------------------------------------------------------------------
       
    33 # Default-Abschnitt
       
    34 
       
    35 ifneq ($(wildcard ethercat.conf),)
       
    36 include ethercat.conf
       
    37 else
       
    38 KERNELDIR = /lib/modules/`uname -r`/build
       
    39 endif
       
    40 
       
    41 modules:
       
    42 	$(MAKE) -C $(KERNELDIR) M=`pwd` modules
       
    43 
       
    44 clean:
       
    45 	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
       
    46 
       
    47 #------------------------------------------------------------------------------
       
    48 
       
    49 endif