EtherCAT master with Autotools.
This commit is contained in:
parent
b662560ff2
commit
c58df7a0dd
|
|
@ -0,0 +1,91 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile.am
|
||||
#
|
||||
# IgH EtherCAT master
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
# The IgH EtherCAT Master is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# The IgH EtherCAT Master is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with the IgH EtherCAT Master; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# The right to use EtherCAT Technology is granted and comes free of
|
||||
# charge under condition of compatibility of product made by
|
||||
# Licensee. People intending to distribute/sell products based on the
|
||||
# code, have to sign an agreement to guarantee that products using
|
||||
# software based on IgH EtherCAT master stay compatible with the actual
|
||||
# EtherCAT specification (which are released themselves as an open
|
||||
# standard) as the (only) precondition to have the right to use EtherCAT
|
||||
# Technology, IP and trade marks.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS = master/ devices/
|
||||
|
||||
initdir = $(sysconfdir)/init.d
|
||||
sysdir = $(sysconfdir)/sysconfig
|
||||
|
||||
include_HEADERS = include/ecdb.h include/ecrt.h
|
||||
noinst_SCRIPTS = script/lsec.pl script/ethercat.sh script/sysconfig
|
||||
|
||||
MINI_FILES = \
|
||||
examples/mini/Kbuild \
|
||||
examples/mini/Makefile.am \
|
||||
examples/mini/Makefile.in \
|
||||
examples/mini/mini.c
|
||||
|
||||
RTAI_FILES = \
|
||||
examples/rtai/Kbuild \
|
||||
examples/rtai/Makefile.am \
|
||||
examples/rtai/Makefile.in \
|
||||
examples/rtai/rtai_sample.c
|
||||
|
||||
MSR_FILES = \
|
||||
examples/msr/Kbuild \
|
||||
examples/msr/libm.o_shipped \
|
||||
examples/msr/Makefile.am \
|
||||
examples/msr/Makefile.in \
|
||||
examples/msr/msr_load \
|
||||
examples/msr/msr_param.h \
|
||||
examples/msr/msr_sample.c \
|
||||
examples/msr/msrserv.pl \
|
||||
examples/msr/msr_unload
|
||||
|
||||
EXTRA_DIST = $(noinst_SCRIPTS) $(MINI_FILES) $(RTAI_FILES) $(MSR_FILES)
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(bindir)
|
||||
$(mkinstalldirs) $(initdir)
|
||||
$(mkinstalldirs) $(sysdir)
|
||||
$(INSTALL_SCRIPT) $(srcdir)/script/lsec.pl $(bindir)/lsec
|
||||
$(INSTALL_SCRIPT) $(srcdir)/script/ethercat.sh $(initdir)/ethercat
|
||||
$(INSTALL_DATA) $(srcdir)/script/sysconfig $(sysdir)/ethercat
|
||||
|
||||
uninstall-local:
|
||||
rm -rf $(LINUX_MODULES_DIR)/ethercat
|
||||
rm $(bindir)/lsec
|
||||
rm $(initdir)/ethercat
|
||||
rm $(sysdir)/ethercat
|
||||
|
||||
doc:
|
||||
doxygen Doxyfile
|
||||
|
||||
cleandoc:
|
||||
@rm -rf documentation
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile
|
||||
# Kbuild
|
||||
#
|
||||
# IgH EtherCAT master device modules
|
||||
#
|
||||
|
|
@ -35,11 +35,6 @@
|
|||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# kbuild section
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
obj-m := ec_8139too.o
|
||||
|
||||
ec_8139too-objs := 8139too.o
|
||||
|
|
@ -49,33 +44,3 @@ REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown")
|
|||
EXTRA_CFLAGS = -DEC_REV=$(REV) -DEC_USER=$(USER)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# default section
|
||||
|
||||
else
|
||||
|
||||
ifneq ($(wildcard ../ethercat.conf),)
|
||||
include ../ethercat.conf
|
||||
else
|
||||
KERNEL := $(shell uname -r)
|
||||
endif
|
||||
|
||||
KERNEL_DIR := /lib/modules/$(KERNEL)/build
|
||||
CURRENT_DIR := $(shell pwd)
|
||||
INSTALL_MOD_DIR := ethercat/devices
|
||||
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
|
||||
|
||||
install: modules_install
|
||||
|
||||
modules_install:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \
|
||||
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
|
||||
@rm -f Modules.symvers
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
endif
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile.am
|
||||
#
|
||||
# IgH EtherCAT master module
|
||||
#
|
||||
# $Id: Makefile 545 2006-09-19 13:28:40Z fp $
|
||||
#
|
||||
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
# The IgH EtherCAT Master is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# The IgH EtherCAT Master is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with the IgH EtherCAT Master; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# The right to use EtherCAT Technology is granted and comes free of
|
||||
# charge under condition of compatibility of product made by
|
||||
# Licensee. People intending to distribute/sell products based on the
|
||||
# code, have to sign an agreement to guarantee that products using
|
||||
# software based on IgH EtherCAT master stay compatible with the actual
|
||||
# EtherCAT specification (which are released themselves as an open
|
||||
# standard) as the (only) precondition to have the right to use EtherCAT
|
||||
# Technology, IP and trade marks.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
EXTRA_DIST = \
|
||||
Kbuild \
|
||||
ecdev.h \
|
||||
8139too.c \
|
||||
original_8139too.c
|
||||
|
||||
ABSSRCDIR = `cd $(srcdir) && pwd -P`
|
||||
|
||||
all:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules
|
||||
|
||||
clean-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean
|
||||
|
||||
install-data-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \
|
||||
INSTALL_MOD_DIR="ethercat" modules_install
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# EtherCAT configuration file
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is a versioned template configuration. Copy it to "ethercat.conf"
|
||||
# (which is ignored by Subversion) and adjust it to your needs.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# The kernel to compile the EtherCAT sources against
|
||||
#
|
||||
KERNEL := $(shell uname -r)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
#----------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# Minimal EtherCAT module.
|
||||
# Kbuild
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
|
@ -33,40 +31,10 @@
|
|||
# standard) as the (only) precondition to have the right to use EtherCAT
|
||||
# Technology, IP and trade marks.
|
||||
#
|
||||
#----------------------------------------------------------------
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# kbuild section
|
||||
#----------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
obj-m := ec_mini.o
|
||||
|
||||
ec_mini-objs := mini.o
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
else
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# default section
|
||||
#----------------------------------------------------------------
|
||||
|
||||
ifneq ($(wildcard kernel.conf),)
|
||||
include kernel.conf
|
||||
else
|
||||
KERNEL_DIR := /lib/modules/$(shell uname -r)/build
|
||||
endif
|
||||
|
||||
CURRENT_DIR := $(shell pwd)
|
||||
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
endif
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile.am
|
||||
#
|
||||
# IgH EtherCAT master module
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
# The IgH EtherCAT Master is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# The IgH EtherCAT Master is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with the IgH EtherCAT Master; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# The right to use EtherCAT Technology is granted and comes free of
|
||||
# charge under condition of compatibility of product made by
|
||||
# Licensee. People intending to distribute/sell products based on the
|
||||
# code, have to sign an agreement to guarantee that products using
|
||||
# software based on IgH EtherCAT master stay compatible with the actual
|
||||
# EtherCAT specification (which are released themselves as an open
|
||||
# standard) as the (only) precondition to have the right to use EtherCAT
|
||||
# Technology, IP and trade marks.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ABSSRCDIR = `cd $(srcdir) && pwd -P`
|
||||
|
||||
all:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules
|
||||
|
||||
clean-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean
|
||||
|
||||
install-data-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \
|
||||
INSTALL_MOD_DIR="ethercat" modules_install
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Kernel configuration file for EtherCAT mini sample
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is a versioned template configuration. Copy it to "kernel.conf"
|
||||
# (which is ignored by Subversion) and adjust it to your needs.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
KERNELDIR := /lib/modules/$(shell uname -r)/build
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Kbuild
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
# The IgH EtherCAT Master is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# The IgH EtherCAT Master is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with the IgH EtherCAT Master; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# The right to use EtherCAT Technology is granted and comes free of
|
||||
# charge under condition of compatibility of product made by
|
||||
# Licensee. People intending to distribute/sell products based on the
|
||||
# code, have to sign an agreement to guarantee that products using
|
||||
# software based on IgH EtherCAT master stay compatible with the actual
|
||||
# EtherCAT specification (which are released themselves as an open
|
||||
# standard) as the (only) precondition to have the right to use EtherCAT
|
||||
# Technology, IP and trade marks.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
MODULE := ec_msr_sample
|
||||
|
||||
obj-m := $(MODULE).o
|
||||
|
||||
$(MODULE)-objs := msr_sample.o \
|
||||
rt_lib/msr-core/msr_lists.o \
|
||||
rt_lib/msr-core/msr_main.o \
|
||||
rt_lib/msr-core/msr_charbuf.o \
|
||||
rt_lib/msr-core/msr_reg.o \
|
||||
rt_lib/msr-core/msr_interpreter.o \
|
||||
rt_lib/msr-core/msr_messages.o \
|
||||
rt_lib/msr-core/msr_proc.o \
|
||||
rt_lib/msr-core/msr_error_reg.o \
|
||||
rt_lib/msr-utils/msr_utils.o \
|
||||
rt_lib/msr-utils/msr_time.o \
|
||||
rt_lib/msr-math/msr_base64.o \
|
||||
rt_lib/msr-math/msr_hex_bin.o \
|
||||
libm.o
|
||||
|
||||
EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \
|
||||
-D_SIMULATION -mhard-float
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# Sample module for use with IgH MSR library.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
# The IgH EtherCAT Master is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# The IgH EtherCAT Master is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with the IgH EtherCAT Master; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# The right to use EtherCAT Technology is granted and comes free of
|
||||
# charge under condition of compatibility of product made by
|
||||
# Licensee. People intending to distribute/sell products based on the
|
||||
# code, have to sign an agreement to guarantee that products using
|
||||
# software based on IgH EtherCAT master stay compatible with the actual
|
||||
# EtherCAT specification (which are released themselves as an open
|
||||
# standard) as the (only) precondition to have the right to use EtherCAT
|
||||
# Technology, IP and trade marks.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
MODULE := ec_msr_sample
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# kbuild section
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
obj-m := $(MODULE).o
|
||||
|
||||
$(MODULE)-objs := msr_sample.o \
|
||||
rt_lib/msr-core/msr_lists.o \
|
||||
rt_lib/msr-core/msr_main.o \
|
||||
rt_lib/msr-core/msr_charbuf.o \
|
||||
rt_lib/msr-core/msr_reg.o \
|
||||
rt_lib/msr-core/msr_interpreter.o \
|
||||
rt_lib/msr-core/msr_messages.o \
|
||||
rt_lib/msr-core/msr_proc.o \
|
||||
rt_lib/msr-core/msr_error_reg.o \
|
||||
rt_lib/msr-utils/msr_utils.o \
|
||||
rt_lib/msr-utils/msr_time.o \
|
||||
rt_lib/msr-math/msr_base64.o \
|
||||
rt_lib/msr-math/msr_hex_bin.o \
|
||||
libm.o
|
||||
|
||||
EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \
|
||||
-D_SIMULATION -mhard-float
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# default section
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
else
|
||||
|
||||
ifneq ($(wildcard kernel.conf),)
|
||||
include kernel.conf
|
||||
else
|
||||
KERNEL := $(shell uname -r)
|
||||
endif
|
||||
|
||||
KERNEL_DIR := /lib/modules/$(KERNEL)/build
|
||||
CURRENT_DIR := $(shell pwd)
|
||||
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
|
||||
|
||||
install:
|
||||
@./install.sh $(MODULE) $(KERNEL)
|
||||
|
||||
endif
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Realtime module install script
|
||||
# Makefile.am
|
||||
#
|
||||
# IgH EtherCAT master module
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
|
@ -35,42 +35,23 @@
|
|||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Fetch parameters
|
||||
EXTRA_DIST = \
|
||||
Kbuild \
|
||||
msr_sample.c msr_param.h \
|
||||
libm.o_shipped \
|
||||
msr_load msr_unload \
|
||||
msrserv.pl
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: $0 <MODULENAME> <KERNEL>"
|
||||
exit 1
|
||||
fi
|
||||
ABSSRCDIR = `cd $(srcdir) && pwd -P`
|
||||
|
||||
MODULENAME=$1
|
||||
KERNEL=$2
|
||||
all:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules
|
||||
|
||||
MODULESDIR=/lib/modules/$KERNEL/kernel/drivers/rt
|
||||
clean-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean
|
||||
|
||||
echo "Realtime installer"
|
||||
echo " target: $MODULENAME"
|
||||
echo " kernel: $KERNEL"
|
||||
|
||||
# Create target directory
|
||||
|
||||
if [ ! -d $MODULESDIR ]; then
|
||||
echo " creating $MODULESDIR..."
|
||||
mkdir $MODULESDIR || exit 1
|
||||
fi
|
||||
|
||||
# Install files
|
||||
|
||||
echo " installing $MODULENAME..."
|
||||
if ! cp $MODULENAME.ko $MODULESDIR/$MODULENAME.ko; then exit 1; fi
|
||||
|
||||
# Calculate dependencies
|
||||
|
||||
echo " building module dependencies..."
|
||||
depmod
|
||||
|
||||
# Finish
|
||||
|
||||
echo "done."
|
||||
exit 0
|
||||
install-data-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \
|
||||
INSTALL_MOD_DIR="ethercat" modules_install
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Configuration file for MSR realtime modules
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is a versioned template configuration. Copy it to "kernel.conf"
|
||||
# (which is ignored by Subversion) and adjust it to your needs.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Kernel sources for module compilation
|
||||
KERNEL := $(shell uname -r)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# RTAI sample module for the IgH EtherCAT master.
|
||||
# Kbuild
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
|
@ -35,40 +33,8 @@
|
|||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# kbuild section
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
obj-m := ec_rtai_sample.o
|
||||
|
||||
ec_rtai_sample-objs := rtai_sample.o
|
||||
|
||||
EXTRA_CFLAGS := -I/usr/realtime/include -mhard-float
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
else
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# default section
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ifneq ($(wildcard kernel.conf),)
|
||||
include kernel.conf
|
||||
else
|
||||
KERNEL_DIR := /lib/modules/$(shell uname -r)/build
|
||||
endif
|
||||
|
||||
CURRENT_DIR := $(shell pwd)
|
||||
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
endif
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile
|
||||
# Makefile.am
|
||||
#
|
||||
# IgH EtherCAT master
|
||||
# IgH EtherCAT master module
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
|
@ -35,48 +35,18 @@
|
|||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# kbuild section
|
||||
EXTRA_DIST = Kbuild rtai_sample.c
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
ABSSRCDIR = `cd $(srcdir) && pwd -P`
|
||||
|
||||
obj-m := master/ devices/
|
||||
all:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules
|
||||
|
||||
clean-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean
|
||||
|
||||
install-data-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \
|
||||
INSTALL_MOD_DIR="ethercat" modules_install
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# default section
|
||||
|
||||
else
|
||||
|
||||
ifneq ($(wildcard ethercat.conf),)
|
||||
include ethercat.conf
|
||||
else
|
||||
KERNEL := $(shell uname -r)
|
||||
endif
|
||||
|
||||
KERNEL_DIR := /lib/modules/$(KERNEL)/build
|
||||
CURRENT_DIR := $(shell pwd)
|
||||
INSTALL_MOD_DIR := ethercat
|
||||
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
|
||||
|
||||
install: modules_install
|
||||
@script/install.sh $(KERNEL)
|
||||
|
||||
modules_install:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \
|
||||
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install
|
||||
|
||||
clean: cleandoc
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
|
||||
@rm -f Modules.symvers
|
||||
|
||||
doc:
|
||||
doxygen Doxyfile
|
||||
|
||||
cleandoc:
|
||||
@rm -rf doc
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
endif
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Kernel configuration file for RTAI sample.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is a versioned template configuration. Copy it to "kernel.conf"
|
||||
# (which is ignored by Subversion) and adjust it to your needs.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
KERNELDIR := /lib/modules/$(shell uname -r)/build
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile
|
||||
# Kbuild
|
||||
#
|
||||
# IgH EtherCAT master module
|
||||
#
|
||||
|
|
@ -35,11 +35,6 @@
|
|||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# kbuild section
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
obj-m := ec_master.o
|
||||
|
||||
ec_master-objs := module.o master.o device.o slave.o datagram.o \
|
||||
|
|
@ -50,33 +45,3 @@ REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown")
|
|||
EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# default section
|
||||
|
||||
else
|
||||
|
||||
ifneq ($(wildcard ../ethercat.conf),)
|
||||
include ../ethercat.conf
|
||||
else
|
||||
KERNEL := $(shell uname -r)
|
||||
endif
|
||||
|
||||
KERNEL_DIR := /lib/modules/$(KERNEL)/build
|
||||
CURRENT_DIR := $(shell pwd)
|
||||
INSTALL_MOD_DIR := ethercat/master
|
||||
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
|
||||
|
||||
install: modules_install
|
||||
|
||||
modules_install:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \
|
||||
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
|
||||
@rm -f Modules.symvers
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
endif
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile.am
|
||||
#
|
||||
# IgH EtherCAT master module
|
||||
#
|
||||
# $Id: Makefile 545 2006-09-19 13:28:40Z fp $
|
||||
#
|
||||
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
#
|
||||
# This file is part of the IgH EtherCAT Master.
|
||||
#
|
||||
# The IgH EtherCAT Master is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# The IgH EtherCAT Master is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with the IgH EtherCAT Master; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# The right to use EtherCAT Technology is granted and comes free of
|
||||
# charge under condition of compatibility of product made by
|
||||
# Licensee. People intending to distribute/sell products based on the
|
||||
# code, have to sign an agreement to guarantee that products using
|
||||
# software based on IgH EtherCAT master stay compatible with the actual
|
||||
# EtherCAT specification (which are released themselves as an open
|
||||
# standard) as the (only) precondition to have the right to use EtherCAT
|
||||
# Technology, IP and trade marks.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
EXTRA_DIST = \
|
||||
Kbuild \
|
||||
datagram.c datagram.h \
|
||||
debug.c debug.h \
|
||||
device.c device.h \
|
||||
domain.c domain.h \
|
||||
doxygen.c \
|
||||
ethernet.c ethernet.h \
|
||||
fsm.c fsm.h \
|
||||
globals.h \
|
||||
mailbox.c mailbox.h \
|
||||
master.c master.h \
|
||||
module.c \
|
||||
slave.c slave.h \
|
||||
xmldev.c xmldev.h
|
||||
|
||||
ABSSRCDIR = `cd $(srcdir) && pwd -P`
|
||||
|
||||
all:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules
|
||||
|
||||
clean-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean
|
||||
|
||||
install-data-local:
|
||||
$(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \
|
||||
INSTALL_MOD_DIR="ethercat" modules_install
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
Loading…
Reference in New Issue