# HG changeset patch # User Florian Pose # Date 1144398168 0 # Node ID 37c65411b411d5963dc9921300767c9b0074870b # Parent 29b19a90ff3fffa646a83f53b049e90c8fe50ccb Added install script diff -r 29b19a90ff3f -r 37c65411b411 Makefile --- a/Makefile Thu Apr 06 09:32:30 2006 +0000 +++ b/Makefile Fri Apr 07 08:22:48 2006 +0000 @@ -26,6 +26,7 @@ include ethercat.conf else KERNELDIR := /usr/src/linux +INSTALLDIR := /opt/ethercat endif modules: @@ -34,6 +35,9 @@ clean: $(MAKE) -C $(KERNELDIR) M=`pwd` clean +install: + @./install.sh $(INSTALLDIR) + #------------------------------------------------------------------------------ endif diff -r 29b19a90ff3f -r 37c65411b411 ethercat.conf.tmpl --- a/ethercat.conf.tmpl Thu Apr 06 09:32:30 2006 +0000 +++ b/ethercat.conf.tmpl Fri Apr 07 08:22:48 2006 +0000 @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ # -# EtherCAT Konfigurationsdatei Kernel 2.6 +# EtherCAT configuration file # # $Id$ # @@ -9,5 +9,10 @@ # #------------------------------------------------------------------------------ +# The kernel to compile the EtherCAT sources against KERNELDIR = /usr/src/linux +# Install directory used by "make install" +INSTALLDIR := /opt/ethercat + +#------------------------------------------------------------------------------ diff -r 29b19a90ff3f -r 37c65411b411 install.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install.sh Fri Apr 07 08:22:48 2006 +0000 @@ -0,0 +1,36 @@ +#!/bin/sh + +#------------------------------------------------------------------------------ +# +# EtherCAT install script +# +# $Id$ +# +#------------------------------------------------------------------------------ + +# Fetch parameter + +if [ $# -eq 0 ]; then + echo "Usage: $0 " + 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 + +#------------------------------------------------------------------------------