Makefile
author Florian Pose <fp@igh-essen.com>
Fri, 07 Apr 2006 10:38:47 +0000
changeset 169 b3ecbec2c487
parent 167 37c65411b411
child 180 786d4cba38fb
permissions -rw-r--r--
Better installer and startup scripts.
#------------------------------------------------------------------------------
#
#  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:
	$(MAKE) -C $(KERNELDIR) M=`pwd` clean

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

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

endif