master/Makefile
changeset 54 7506e67dd122
parent 50 458e704afc6e
child 58 21b7342e2a90
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 := ec_master.o
       
    17 
       
    18 ec_master-objs := module.o master.o device.o slave.o command.o types.o domain.o
       
    19 
       
    20 REV = `svnversion $(src)`
       
    21 DATE = `date`
       
    22 
       
    23 EXTRA_CFLAGS = -DEC_REV="$(REV)" -DEC_USER="$(USER)" -DEC_DATE="$(DATE)"
       
    24 
       
    25 #------------------------------------------------------------------------------
       
    26 
       
    27 else
       
    28 
       
    29 #------------------------------------------------------------------------------
       
    30 # Default-Abschnitt
       
    31 
       
    32 ifneq ($(wildcard ethercat.conf),)
       
    33 include ethercat.conf
       
    34 else
       
    35 KERNELDIR = /lib/modules/`uname -r`/build
       
    36 endif
       
    37 
       
    38 modules:
       
    39 	$(MAKE) -C $(KERNELDIR) M=`pwd` modules
       
    40 
       
    41 clean:
       
    42 	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
       
    43 
       
    44 #------------------------------------------------------------------------------
       
    45 
       
    46 endif