devices/Makefile
author Florian Pose <fp@igh-essen.com>
Tue, 18 Apr 2006 13:41:17 +0000
changeset 193 1053a25af575
parent 192 8d7bd5082ed5
child 196 f8a1e9f364a3
permissions -rw-r--r--
README: Requirements and realtime.
#------------------------------------------------------------------------------
#
#  kbuild Makefile
#
#  IgH EtherCAT master device modules
#
#  $Id$
#
#------------------------------------------------------------------------------

ifneq ($(KERNELRELEASE),)

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

obj-m := ec_8139too.o

ec_8139too-objs := 8139too.o

EXTRA_CFLAGS = -DEC_REV="$(shell svnversion $(src))" -DEC_USER="$(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