Makefile
changeset 169 b3ecbec2c487
parent 167 37c65411b411
child 180 786d4cba38fb
--- a/Makefile	Fri Apr 07 08:29:19 2006 +0000
+++ b/Makefile	Fri Apr 07 10:38:47 2006 +0000
@@ -1,8 +1,6 @@
 #------------------------------------------------------------------------------
 #
-#  Globales Makefile
-#
-#  IgH EtherCAT-Treiber
+#  EtherCAT Makefile
 #
 #  $Id$
 #
@@ -11,7 +9,7 @@
 ifneq ($(KERNELRELEASE),)
 
 #------------------------------------------------------------------------------
-# Kbuild-Abschnitt
+# kbuild section
 
 obj-m := master/ devices/
 
@@ -20,15 +18,17 @@
 else
 
 #------------------------------------------------------------------------------
-# Default-Abschnitt
+# default section
 
 ifneq ($(wildcard ethercat.conf),)
 include ethercat.conf
 else
-KERNELDIR := /usr/src/linux
-INSTALLDIR := /opt/ethercat
+KERNEL := `uname -r`
+DEVICEINDEX := 99
 endif
 
+KERNELDIR := /lib/modules/$(KERNEL)/build
+
 modules:
 	$(MAKE) -C $(KERNELDIR) M=`pwd`
 
@@ -36,7 +36,7 @@
 	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
 
 install:
-	@./install.sh $(INSTALLDIR)
+	@./install.sh $(KERNEL) $(DEVICEINDEX)
 
 #------------------------------------------------------------------------------