forked from fzi-forschungszentrum-informatik/fzi_icl_can
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.tarball
35 lines (30 loc) · 1011 Bytes
/
Makefile.tarball
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
all: install
PKG_NAME = peak-linux-driver
PKG_VER = 7.15.2
TARBALL = $(PKG_NAME)-$(PKG_VER).tar.gz
TARBALL_URL = http://www.peak-system.com/fileadmin/media/linux/files/$(TARBALL)
SOURCE_DIR = build/$(PKG_NAME)-$(PKG_VER)
install:
# get sources
mkdir -p build
mkdir -p $(SOURCE_DIR)
cd build && wget $(TARBALL_URL) && tar xfz $(TARBALL)
# build
cd $(SOURCE_DIR)/lib && make NET=NO_NETDEV_SUPPORT
# copy to common
mkdir -p common
mkdir -p common/lib
mkdir -p common/include
mkdir -p common/include/libpcan
cp $(SOURCE_DIR)/lib/*.so* common/lib
cp common/lib/libpcan.so common/lib/libpcan.so.0
cp $(SOURCE_DIR)/lib/*.h common/include/libpcan
cp $(SOURCE_DIR)/driver/*.h common/include/libpcan
#sed -i '/#include <pcan.h>/c\#include <libpcan/pcan.h>' common/include/libpcan/libpcan.h
clean:
rm -rf common/lib/* common/include/libpcan/* $(SOURCE_DIR) build/$(TARBALL)
# create dummy files again
touch common/include/libpcan/libpcan.h
touch common/lib/libpcan.so
wipe: clean
-rm -rf build