Skip to content
Snippets Groups Projects
Commit 2443476c authored by Florian Pose's avatar Florian Pose
Browse files

Applied patches by Maximilian Schwerin.

parent 20d30423
No related branches found
No related tags found
No related merge requests found
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# EtherCAT Makefile # Makefile
#
# IgH EtherCAT master
# #
# $Id$ # $Id$
# #
...@@ -55,7 +57,14 @@ KERNEL_DIR := /lib/modules/$(KERNEL)/build ...@@ -55,7 +57,14 @@ KERNEL_DIR := /lib/modules/$(KERNEL)/build
CURRENT_DIR := $(shell pwd) CURRENT_DIR := $(shell pwd)
modules: modules:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
install: modules_install
@script/install.sh $(KERNEL)
modules_install:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)/master modules_install
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)/devices modules_install
clean: cleandoc clean: cleandoc
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
...@@ -66,9 +75,6 @@ doc: ...@@ -66,9 +75,6 @@ doc:
cleandoc: cleandoc:
@rm -rf doc @rm -rf doc
install:
@script/install.sh $(KERNEL)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
endif endif
This diff is collapsed.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# kbuild Makefile # Makefile
# #
# IgH EtherCAT master device modules # IgH EtherCAT master device modules
# #
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
ifneq ($(KERNELRELEASE),)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# kbuild section # kbuild section
ifneq ($(KERNELRELEASE),)
obj-m := ec_8139too.o obj-m := ec_8139too.o
ec_8139too-objs := 8139too.o ec_8139too-objs := 8139too.o
...@@ -49,12 +49,10 @@ REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown") ...@@ -49,12 +49,10 @@ REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown")
EXTRA_CFLAGS = -DEC_REV=$(REV) -DEC_USER=$(USER) EXTRA_CFLAGS = -DEC_REV=$(REV) -DEC_USER=$(USER)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# default section
else else
#------------------------------------------------------------------------------
# default section
ifneq ($(wildcard ../ethercat.conf),) ifneq ($(wildcard ../ethercat.conf),)
include ../ethercat.conf include ../ethercat.conf
else else
...@@ -65,7 +63,12 @@ KERNEL_DIR := /lib/modules/$(KERNEL)/build ...@@ -65,7 +63,12 @@ KERNEL_DIR := /lib/modules/$(KERNEL)/build
CURRENT_DIR := $(shell pwd) CURRENT_DIR := $(shell pwd)
modules: modules:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
install: modules_install
modules_install:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules_install
clean: clean:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
......
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
ifneq ($(KERNELRELEASE),)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# kbuild section # kbuild section
ifneq ($(KERNELRELEASE),)
obj-m := ec_master.o obj-m := ec_master.o
ec_master-objs := module.o master.o device.o slave.o command.o types.o \ ec_master-objs := module.o master.o device.o slave.o command.o types.o \
...@@ -50,12 +50,10 @@ REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown") ...@@ -50,12 +50,10 @@ REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown")
EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER) EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# default section
else else
#------------------------------------------------------------------------------
# default section
ifneq ($(wildcard ../ethercat.conf),) ifneq ($(wildcard ../ethercat.conf),)
include ../ethercat.conf include ../ethercat.conf
else else
...@@ -66,7 +64,12 @@ KERNEL_DIR := /lib/modules/$(KERNEL)/build ...@@ -66,7 +64,12 @@ KERNEL_DIR := /lib/modules/$(KERNEL)/build
CURRENT_DIR := $(shell pwd) CURRENT_DIR := $(shell pwd)
modules: modules:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
install: modules_install
modules_install:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules_install
clean: clean:
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
......
...@@ -49,24 +49,11 @@ if [ ! -d /lib/modules/$KERNEL ]; then ...@@ -49,24 +49,11 @@ if [ ! -d /lib/modules/$KERNEL ]; then
exit 1 exit 1
fi fi
#------------------------------------------------------------------------------
# Copy files
INSTALLDIR=/lib/modules/$KERNEL/kernel/drivers/net
MODULES=(master/ec_master.ko devices/ec_8139too.ko)
echo "EtherCAT installer - Kernel: $KERNEL" echo "EtherCAT installer - Kernel: $KERNEL"
echo " Installing modules"
for mod in ${MODULES[*]}; do
echo " $mod"
cp $mod $INSTALLDIR || exit 1
done
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Update dependencies # Update module dependencies
echo " Building module dependencies" echo " Building module dependencies"
depmod depmod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment