mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-27 20:44:00 +08:00
Added install script
This commit is contained in:
@@ -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:
|
|||||||
clean:
|
clean:
|
||||||
$(MAKE) -C $(KERNELDIR) M=`pwd` clean
|
$(MAKE) -C $(KERNELDIR) M=`pwd` clean
|
||||||
|
|
||||||
|
install:
|
||||||
|
@./install.sh $(INSTALLDIR)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
+6
-1
@@ -1,6 +1,6 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# EtherCAT Konfigurationsdatei Kernel 2.6
|
# EtherCAT configuration file
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
@@ -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
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Executable
+36
@@ -0,0 +1,36 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user