devices/Makefile
author Florian Pose <fp@igh-essen.com>
Tue, 11 Apr 2006 14:39:17 +0000
changeset 190 4e32bcc6b361
parent 180 786d4cba38fb
child 191 ca805255a935
permissions -rw-r--r--
Now fetching port physical layer from EEPROM
#------------------------------------------------------------------------------
#
#  kbuild Makefile
#
#  IgH EtherCAT master device modules
#
#  $Id$
#
#------------------------------------------------------------------------------

ifneq ($(KERNELRELEASE),)

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

obj-m := ec_8139too.o

ec_8139too-objs := 8139too.o

REV = `svnversion $(src)`
DATE = `date`

EXTRA_CFLAGS = -DEC_REV="$(REV)" -DEC_USER="$(USER)" -DEC_DATE="$(DATE)"

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

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