Makefile
author Florian Pose <fp@igh-essen.com>
Thu, 20 Apr 2006 14:34:58 +0000
changeset 196 f8a1e9f364a3
parent 195 674071846ee3
child 197 b9a6e2c22745
permissions -rw-r--r--
Introduced version number define.
#------------------------------------------------------------------------------
#
#  EtherCAT Makefile
#
#  $Id$
#
#------------------------------------------------------------------------------

ifneq ($(KERNELRELEASE),)

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

obj-m := master/ devices/

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

else

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

ifneq ($(wildcard ethercat.conf),)
include ethercat.conf
else
KERNEL := `uname -r`
DEVICEINDEX := 99
endif

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

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

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

doc:
	doxygen Doxyfile

cleandoc:
	@rm -rf doc


install:
	@./install.sh $(KERNEL) $(DEVICEINDEX)

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

endif