diff --git a/Makefile b/Makefile index f73b486408848f801d86bc0a761da2964cc70888..2b5449f8fd428fdf20301194dab2c88168f3f9a8 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ modules: clean: $(MAKE) -C $(KERNELDIR) M=`pwd` clean - rm -rvf */.tmp_versions + @rm -rf */.tmp_versions doc docs: doxygen Doxyfile diff --git a/drivers/Makefile b/drivers/Makefile index 0a796c1458dfedcc13754ae8205f5a085c951203..a3b2ee33793ed1c7b99d0d690b1ee8cc5be6516c 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -32,11 +32,17 @@ else #------------------------------------------------------------------------------ # Default-Abschnitt +ifneq ($(wildcard ethercat.conf),) +include ethercat.conf +else +KERNELDIR = /lib/modules/`uname -r`/build +endif + modules: - $(MAKE) -C .. + $(MAKE) -C $(KERNELDIR) M=`pwd` modules clean: - $(MAKE) -C .. clean + $(MAKE) -C $(KERNELDIR) M=`pwd` clean #------------------------------------------------------------------------------ diff --git a/mini/Makefile b/mini/Makefile index e84525ced4861b21d8589baec4d7c53ef743894b..6e4e2863fda7d0246cc10f945426b8011daaf834 100644 --- a/mini/Makefile +++ b/mini/Makefile @@ -24,11 +24,17 @@ else #---------------------------------------------------------------- # Default-Abschnitt +ifneq ($(wildcard ethercat.conf),) +include ethercat.conf +else +KERNELDIR = /lib/modules/`uname -r`/build +endif + modules: - $(MAKE) -C .. + $(MAKE) -C $(KERNELDIR) M=`pwd` modules clean: - $(MAKE) -C .. clean + $(MAKE) -C $(KERNELDIR) M=`pwd` clean #---------------------------------------------------------------- diff --git a/rt/Makefile b/rt/Makefile index e6f71336fb1e2a3ea4709973134bae0e491b9cdf..56d8139946a7a2e0af76c2559efa35e869d860f5 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -37,11 +37,17 @@ else #------------------------------------------------------------------------------ # Default-Abschnitt -default: - $(MAKE) -C .. +ifneq ($(wildcard ethercat.conf),) +include ethercat.conf +else +KERNELDIR = /lib/modules/`uname -r`/build +endif + +modules: + $(MAKE) -C $(KERNELDIR) M=`pwd` modules clean: - $(MAKE) -C .. clean + $(MAKE) -C $(KERNELDIR) M=`pwd` clean #------------------------------------------------------------------------------