From c2ea415d7060ac768cd2a8f7728815cc6a7388dd Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 27 Sep 2016 19:26:35 -0400 Subject: [PATCH] reworked Makefile to build dependencies --- thirdparty/Makefile | 62 ++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/thirdparty/Makefile b/thirdparty/Makefile index 8417d10b3..06b445bd9 100644 --- a/thirdparty/Makefile +++ b/thirdparty/Makefile @@ -1,6 +1,6 @@ -DEPS = libconfig-1.5 libnl-3.2.25 doxygen-1.8.10 pciutils-3.4.1 libwebsockets-1.7.5 +DEPS = libxil libconfig libnl libwebsockets pciutils criterion -.PHONY: $(DEPS) all +.PHONY: $(DEPS) all clean TMPDIR ?= $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) PREFIX ?= /usr/local @@ -8,28 +8,50 @@ PREFIX ?= /usr/local # Install all dependencies all: $(DEPS) -# Download latest doxygen -doxygen-1.8.10: - wget -O- http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.linux.bin.tar.gz | tar xzC $(TMPDIR) - # Install & compile libconfig dependency -libconfig-1.5: - wget -O- http://www.hyperrealm.com/libconfig/libconfig-1.5.tar.gz | tar -xzC $(TMPDIR) - cd $@ && ./configure --prefix=$(PREFIX) --disable-examples && make install +libconfig: + cd $@ && \ + rm -f lib/scanner.[ch] && \ + autoreconf && \ + ./configure --prefix=$(PREFIX) --disable-examples && \ + make install # Install & compile libnl3 dependency -libnl-3.2.25: - wget -O- http://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz | tar -xzC $(TMPDIR) - cd $@ && ./configure --prefix=$(PREFIX) --disable-cli && make install +libnl: + cd $@ && \ + ./autogen.sh && \ + ./configure --prefix=$(PREFIX) --disable-cli && \ + make install # Install & compile libpci dependency -pciutils-3.4.1: - wget -O- ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-3.4.1.tar.gz | tar -xzC $(TMPDIR) - cd $@ && make clean && make SHARED=yes && make install-lib PREFIX=$(PREFIX) - ln -s $(PREFIX)/lib/libpci.so.3.4.1 $(PREFIX)/lib/libpci.so +pciutils: + cd $@ && \ + make clean && \ + make SHARED=yes && \ + make install-lib PREFIX=$(PREFIX) && \ + ln -s $(PREFIX)/lib/libpci.so.* $(PREFIX)/lib/libpci.so # Install & compile libwebsockets dependency -libwebsockets-2.0.2: - mkdir -p $@/build - wget -O- https://github.com/warmcat/libwebsockets/archive/v2.0.2.tar.gz | tar -xzC $(TMPDIR) - cd $@/build && cmake -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) .. && make install \ No newline at end of file +libwebsockets: + mkdir $@/build && cd $@/build && \ + cmake -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) .. && \ + make install + +# Install & compile Criterion unittest framework +criterion: + mkdir $@/build && cd $@/build && \ + cmake -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) .. && \ + make install + +# Install & compile Xilinx standalone drivers +libxil: + cd $@ && \ + make install + +clean: + for DEP in ${DEPS}; do \ + pushd $$DEP; \ + git checkout . ; \ + git clean -dxf $$DEP . ; \ + popd; \ + done