devices/Makefile
changeset 180 786d4cba38fb
parent 54 7506e67dd122
child 191 ca805255a935
equal deleted inserted replaced
179:fb4c9dd11ca0 180:786d4cba38fb
     1 #------------------------------------------------------------------------------
     1 #------------------------------------------------------------------------------
     2 #
     2 #
     3 #  Makefile
     3 #  kbuild Makefile
     4 #
     4 #
     5 #  IgH EtherCAT-Treiber - EtherCAT Geraete
     5 #  IgH EtherCAT master device modules
     6 #
     6 #
     7 #  $Id$
     7 #  $Id$
     8 #
     8 #
     9 #------------------------------------------------------------------------------
     9 #------------------------------------------------------------------------------
    10 
    10 
    11 ifneq ($(KERNELRELEASE),)
    11 ifneq ($(KERNELRELEASE),)
    12 
    12 
    13 #------------------------------------------------------------------------------
    13 #------------------------------------------------------------------------------
    14 # Kbuild-Abschnitt
    14 #  kbuild section
    15 
    15 
    16 obj-m := ec_8139too.o
    16 obj-m := ec_8139too.o
    17 
    17 
    18 ec_8139too-objs := 8139too.o
    18 ec_8139too-objs := 8139too.o
    19 
    19 
    25 #------------------------------------------------------------------------------
    25 #------------------------------------------------------------------------------
    26 
    26 
    27 else
    27 else
    28 
    28 
    29 #------------------------------------------------------------------------------
    29 #------------------------------------------------------------------------------
    30 # Default-Abschnitt
    30 #  default section
    31 
    31 
    32 ifneq ($(wildcard ethercat.conf),)
    32 ifneq ($(wildcard ../ethercat.conf),)
    33 include ethercat.conf
    33 include ../ethercat.conf
    34 else
    34 else
    35 KERNELDIR = /lib/modules/`uname -r`/build
    35 KERNEL := $(shell uname -r)
    36 endif
    36 endif
    37 
    37 
       
    38 KERNELDIR := /lib/modules/$(KERNEL)/build
       
    39 
    38 modules:
    40 modules:
    39 	$(MAKE) -C $(KERNELDIR) M=`pwd` modules
    41 	$(MAKE) -C $(KERNELDIR) M=`pwd`
    40 
    42 
    41 clean:
    43 clean:
    42 	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
    44 	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
    43 
    45 
    44 #------------------------------------------------------------------------------
    46 #------------------------------------------------------------------------------