Makefile
author Florian Pose <fp@igh-essen.com>
Tue, 11 Apr 2006 14:12:01 +0000
changeset 188 c0e49f4a1c07
parent 180 786d4cba38fb
child 195 674071846ee3
permissions -rw-r--r--
Better calc. of coupler address; coupler address in SysFS; better output of ec_list
#------------------------------------------------------------------------------
#
#  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