master/Makefile
author Florian Pose <fp@igh-essen.com>
Tue, 11 Apr 2006 14:12:01 +0000
changeset 188 c0e49f4a1c07
parent 180 786d4cba38fb
child 191 ca805255a935
permissions -rw-r--r--
Better calc. of coupler address; coupler address in SysFS; better output of ec_list
#------------------------------------------------------------------------------
#
#  Makefile
#
#  IgH EtherCAT master module
#
#  $Id$
#
#------------------------------------------------------------------------------

ifneq ($(KERNELRELEASE),)

#------------------------------------------------------------------------------
#  kbuild section

obj-m := ec_master.o

ec_master-objs := module.o master.o device.o slave.o command.o types.o \
			domain.o mailbox.o canopen.o ethernet.o

EXTRA_CFLAGS := -DSVNREV=$(shell svnversion $(src)) -DUSER=$(USER)

#------------------------------------------------------------------------------

else

#------------------------------------------------------------------------------
#  default section

ifneq ($(wildcard ../ethercat.conf),)
include ../ethercat.conf
else
KERNEL := $(shell uname -r)
endif

KERNELDIR = /lib/modules/$(KERNEL)/build

modules:
	$(MAKE) -C $(KERNELDIR) M=`pwd`

clean:
	$(MAKE) -C $(KERNELDIR) M=`pwd` clean

#------------------------------------------------------------------------------

endif