mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
install third party libraries to /usr/local/lib64 instead of /usr/local/lib
This commit is contained in:
parent
d69b2167ab
commit
4f74107e91
8 changed files with 17 additions and 82 deletions
|
@ -70,15 +70,15 @@ RUN pip install \
|
|||
|
||||
# Build & Install libxil
|
||||
COPY thirdparty/libxil /tmp/libxil
|
||||
RUN mkdir -p /tmp/libxil/build && cd /tmp/libxil/build && cmake .. && make install
|
||||
RUN mkdir -p /tmp/libxil/build && cd /tmp/libxil/build && cmake -DLIB_SUFFIX=64 .. && make install
|
||||
|
||||
# Build & Install Criterion
|
||||
COPY thirdparty/criterion /tmp/criterion
|
||||
RUN mkdir -p /tmp/criterion/build && cd /tmp/criterion/build && cmake .. && make install
|
||||
RUN mkdir -p /tmp/criterion/build && cd /tmp/criterion/build && cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make install
|
||||
|
||||
# Build & Install libwebsockets
|
||||
COPY thirdparty/libwebsockets /tmp/libwebsockets
|
||||
RUN mkdir -p /tmp/libwebsockets/build && cd /tmp/libwebsockets/build && cmake -DLWS_IPV6=1 -DLWS_WITH_STATIC=0 -DLWS_WITHOUT_TESTAPPS=1 -DLWS_WITH_HTTP2=1 .. && make install
|
||||
RUN mkdir -p /tmp/libwebsockets/build && cd /tmp/libwebsockets/build && cmake -DLWS_IPV6=1 -DLWS_WITH_STATIC=0 -DLWS_WITHOUT_TESTAPPS=1 -DLWS_WITH_HTTP2=1 -DLIB_SUFFIX=64 .. && make install
|
||||
|
||||
# Cleanup intermediate files from builds
|
||||
RUN rm -rf /tmp/*
|
||||
|
@ -87,6 +87,9 @@ RUN rm -rf /tmp/*
|
|||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig
|
||||
ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64
|
||||
|
||||
#ADD https://villas.fein-aachen.org/packages/villas.repo /etc/yum.repos.d/
|
||||
|
||||
ENTRYPOINT villas
|
||||
|
|
10
Makefile
10
Makefile
|
@ -50,12 +50,8 @@ CFLAGS += -std=c11 -MMD -mcx16
|
|||
CFLAGS += -Wall -Werror -fdiagnostics-color=auto
|
||||
LDFLAGS += -L$(BUILDDIR)
|
||||
|
||||
# Some environment variables to increase compatability with Fedora and other distros
|
||||
export PKG_CONFIG_PATH := /usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)
|
||||
export LD_LIBRARY_PATH := /usr/local/lib:/usr/lib:$(LD_LIBRARY_PATH)
|
||||
|
||||
# Some tools
|
||||
PKGCONFIG := PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config
|
||||
PKGCONFIG := PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$(PKG_CONFIG_PATH) pkg-config
|
||||
|
||||
# We must compile without optimizations for gcov!
|
||||
ifdef DEBUG
|
||||
|
@ -111,8 +107,8 @@ PKGS = libconfig
|
|||
######## Targets ########
|
||||
|
||||
# Add flags by pkg-config
|
||||
CFLAGS += $(shell pkg-config --cflags ${PKGS})
|
||||
LDLIBS += $(shell pkg-config --libs ${PKGS})
|
||||
CFLAGS += $(shell $(PKGCONFIG) --cflags ${PKGS})
|
||||
LDLIBS += $(shell $(PKGCONFIG) --libs ${PKGS})
|
||||
|
||||
all: src plugins tools
|
||||
src plugins tools tests: lib
|
||||
|
|
|
@ -32,9 +32,6 @@ LIB_CFLAGS = $(CFLAGS) -fPIC
|
|||
|
||||
-include $(patsubst %, lib/Makefile.%.inc, $(SONAMES))
|
||||
|
||||
# Add flags by pkg-config
|
||||
LIB_CFLAGS += $(shell pkg-config --cflags ${LIB_PKGS})
|
||||
|
||||
# Compile
|
||||
$(BUILDDIR)/lib/%.o: lib/%.c $(BUILDDIR)/defines | $$(dir $$@)
|
||||
$(CC) $(LIB_CFLAGS) -c $< -o $@
|
||||
|
|
|
@ -39,11 +39,6 @@ LIB_LDLIBS = $(LDLIBS) -ldl -lrt -Wl,-soname,$(LIB_NAME).so.$(LIB_ABI_VERSION)
|
|||
|
||||
LIB_PKGS += libwebsockets openssl
|
||||
|
||||
ifneq ($(shell $(PKGCONFIG) --print-errors $(LIB_PKGS); echo $$?),0)
|
||||
$(error Please install missing dependencies: make install-thirdparty)
|
||||
endif
|
||||
|
||||
|
||||
######## Node types ########
|
||||
|
||||
# Enable Socket node type when libnl3 is available
|
||||
|
@ -59,11 +54,12 @@ endif
|
|||
# Enable VILLASfpga support when libxil is available
|
||||
ifndef WITHOUT_FPGA
|
||||
ifeq ($(shell $(PKGCONFIG) libxil; echo $$?),0)
|
||||
LIB_SRCS += $(addprefix lib/nodes/, fpga.c)
|
||||
LIB_SRCS += $(addprefix lib/kernel/, pci.c vfio.c)
|
||||
PKGS += libxil
|
||||
LIB_SRCS += $(addprefix lib/nodes/, fpga.c) \
|
||||
$(addprefix lib/kernel/, pci.c vfio.c) \
|
||||
$(wildcard lib/fpga/*.c) \
|
||||
$(wildcard lib/fpga/ips/*.c)
|
||||
|
||||
-include lib/fpga/Makefile.inc
|
||||
LIB_PKGS += libxil
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
# Makefile.
|
||||
#
|
||||
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
# @license GNU General Public License (version 3)
|
||||
#
|
||||
# VILLASnode
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
# Enable VILLASfpga support when libxil is available
|
||||
ifndef WITHOUT_FPGA
|
||||
ifeq ($(shell pkg-config libxil; echo $$?),0)
|
||||
LIB_SRCS += $(wildcard lib/fpga/*.c)
|
||||
endif
|
||||
endif
|
||||
|
||||
-include lib/fpga/ips/Makefile.inc
|
|
@ -1,28 +0,0 @@
|
|||
# Makefile.
|
||||
#
|
||||
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
# @license GNU General Public License (version 3)
|
||||
#
|
||||
# VILLASnode
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
# Enable VILLASfpga support when libxil is available
|
||||
ifndef WITHOUT_FPGA
|
||||
ifeq ($(shell pkg-config libxil; echo $$?),0)
|
||||
LIB_SRCS += $(wildcard lib/fpga/ips/*.c)
|
||||
endif
|
||||
endif
|
|
@ -34,7 +34,7 @@ SRC_CFLAGS = $(CFLAGS)
|
|||
SRC_LDFLAGS = $(LDFLAGS) -Wl,-rpath,'$$ORIGIN'
|
||||
|
||||
# Enable VILLASfpga support when libxil is available
|
||||
ifeq ($(shell pkg-config libxil; echo $$?),0)
|
||||
ifeq ($(shell $(PKGCONFIG) libxil; echo $$?),0)
|
||||
LIB_SRCS += $(addprefix lib/nodes/, fpga.c)
|
||||
LIB_SRCS += $(addprefix lib/kernel/, pci.c vfio.c)
|
||||
LIB_SRCS += $(wildcard lib/fpga/*.c)
|
||||
|
@ -42,7 +42,7 @@ ifeq ($(shell pkg-config libxil; echo $$?),0)
|
|||
PKGS += libxil
|
||||
|
||||
# Add support for LAPACK / BLAS benchmarks / solvers
|
||||
ifeq ($(shell pkg-config blas lapack; echo $$?),0)
|
||||
ifeq ($(shell $(PKGCONFIG) blas lapack; echo $$?),0)
|
||||
PKGS += blas lapack
|
||||
BENCH_OBJS += fpga-bench-overruns.o
|
||||
endif
|
||||
|
|
1
thirdparty/Makefile.inc
vendored
1
thirdparty/Makefile.inc
vendored
|
@ -44,6 +44,7 @@ $(DEPS_AUTOCONF): | $(BUILDDIR)/thirdparty/$$@/
|
|||
# Install & compile CMake based projects
|
||||
$(DEPS_CMAKE): | $(BUILDDIR)/thirdparty/$$@/
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) \
|
||||
-DCMAKE_INSTALL_LIBDIR=$(PREFIX)/lib64 -DLIB_SUFFIX=64 \
|
||||
-H$(SRCDIR)/thirdparty/$@ \
|
||||
-B$(BUILDDIR)/thirdparty/$@ $(CMAKE_OPTS)
|
||||
make -C$(BUILDDIR)/thirdparty/$@
|
||||
|
|
Loading…
Add table
Reference in a new issue