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

Added install script

parent 8e2d6e7d
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ ifneq ($(wildcard ethercat.conf),) ...@@ -26,6 +26,7 @@ ifneq ($(wildcard ethercat.conf),)
include ethercat.conf include ethercat.conf
else else
KERNELDIR := /usr/src/linux KERNELDIR := /usr/src/linux
INSTALLDIR := /opt/ethercat
endif endif
modules: modules:
...@@ -34,6 +35,9 @@ modules: ...@@ -34,6 +35,9 @@ modules:
clean: clean:
$(MAKE) -C $(KERNELDIR) M=`pwd` clean $(MAKE) -C $(KERNELDIR) M=`pwd` clean
install:
@./install.sh $(INSTALLDIR)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
endif endif
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# EtherCAT Konfigurationsdatei Kernel 2.6 # EtherCAT configuration file
# #
# $Id$ # $Id$
# #
...@@ -9,5 +9,10 @@ ...@@ -9,5 +9,10 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# The kernel to compile the EtherCAT sources against
KERNELDIR = /usr/src/linux KERNELDIR = /usr/src/linux
# Install directory used by "make install"
INSTALLDIR := /opt/ethercat
#------------------------------------------------------------------------------
#!/bin/sh
#------------------------------------------------------------------------------
#
# EtherCAT install script
#
# $Id$
#
#------------------------------------------------------------------------------
# Fetch parameter
if [ $# -eq 0 ]; then
echo "Usage: $0 <INSTALLDIR>"
exit 1
fi
INSTALLDIR=$1
# Create install directory
if [ ! -d $INSTALLDIR ]; then
echo "Creating directory $INSTALLDIR..."
if ! mkdir $INSTALLDIR; then exit 1; fi
fi
# Copy files
if ! cp master/ec_master.ko $INSTALLDIR; then exit -1; fi
if ! cp devices/ec_8139too.ko $INSTALLDIR; then exit -1; fi
# Finished
exit 0
#------------------------------------------------------------------------------
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