mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
build OPAL AsyncIP only if libOpal libraries area available
This commit is contained in:
parent
792cf1853a
commit
4a063b36b6
4 changed files with 54 additions and 20 deletions
2
Makefile
2
Makefile
|
@ -139,7 +139,7 @@ endif
|
|||
CFLAGS += $(shell $(PKGCONFIG) --cflags ${PKGS})
|
||||
LDLIBS += $(shell $(PKGCONFIG) --libs ${PKGS})
|
||||
|
||||
all: src plugins tools
|
||||
all: src plugins tools tests clients
|
||||
src plugins tools tests: lib
|
||||
|
||||
# Build all variants: debug, coverage, ...
|
||||
|
|
|
@ -20,23 +20,15 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
ASYNCIP_PATH = $(SRCDIR)/clients/opal/models/send_receive
|
||||
CLIENTS =
|
||||
|
||||
ifneq ($(wildcard $(SRCDIR)/thirdparty/libopal/include/opal/AsyncApi.h),)
|
||||
-include $(SRCDIR)/clients/Makefile.opal.inc
|
||||
endif
|
||||
|
||||
ASYNCIP_OPTS = RTLAB_INTEL_COMPILER=0 \
|
||||
PROTOCOL=GTNET_SKT \
|
||||
OPAL_LIBS="-lSystem -luuid" \
|
||||
OPAL_LIBPATH=-L$(SRCDIR)/thirdparty/libopal/ \
|
||||
OPAL_INCPATH=-I$(SRCDIR)/thirdparty/libopal/include/opal
|
||||
clients: $(addprefix clients-,$(CLIENTS))
|
||||
|
||||
clients: clients-opal
|
||||
|
||||
clients-opal:
|
||||
$(MAKE) -C $(ASYNCIP_PATH) -f Makefile.mk AsyncIP $(ASYNCIP_OPTS)
|
||||
|
||||
clean-clients:
|
||||
$(MAKE) -C $(ASYNCIP_PATH) -f Makefile.mk clean $(ASYNCIP_OPTS)
|
||||
|
||||
install-clients:
|
||||
$(MAKE) -C $(ASYNCIP_PATH) -f Makefile.mk install $(ASYNCIP_OPTS)
|
||||
clean-clients: $(addprefix clean-clients-,$(CLIENTS))
|
||||
install-clients: $(addprefix install-clients-,$(CLIENTS))
|
||||
|
||||
.PHONY: clients clean-clients install-clients
|
||||
|
|
42
clients/Makefile.opal.inc
Normal file
42
clients/Makefile.opal.inc
Normal file
|
@ -0,0 +1,42 @@
|
|||
# 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/>.
|
||||
###################################################################################
|
||||
|
||||
CLIENTS += opal
|
||||
|
||||
ASYNCIP_PATH = $(SRCDIR)/clients/opal/models/send_receive
|
||||
|
||||
ASYNCIP_OPTS = RTLAB_INTEL_COMPILER=0 \
|
||||
PROTOCOL=GTNET_SKT \
|
||||
OPAL_LIBS="-lSystem -luuid" \
|
||||
OPAL_LIBPATH=-L$(SRCDIR)/thirdparty/libopal/ \
|
||||
OPAL_INCPATH=-I$(SRCDIR)/thirdparty/libopal/include/opal
|
||||
|
||||
clients-opal:
|
||||
$(MAKE) -C $(ASYNCIP_PATH) -f Makefile.mk AsyncIP $(ASYNCIP_OPTS)
|
||||
|
||||
clean-clients-opal:
|
||||
$(MAKE) -C $(ASYNCIP_PATH) -f Makefile.mk clean $(ASYNCIP_OPTS)
|
||||
|
||||
install-clients-opal:
|
||||
$(MAKE) -C $(ASYNCIP_PATH) -f Makefile.mk install $(ASYNCIP_OPTS)
|
||||
|
||||
.PHONY: clients-opal clean-clients-opal install-clients-opal
|
|
@ -101,11 +101,11 @@ endif
|
|||
|
||||
# Enable OPAL-RT Asynchronous Process support (will result in 32bit binary!!!)
|
||||
ifeq ($(WITH_OPAL),1)
|
||||
ifneq ($(wildcard thirdparty/libopal/include/opal/AsyncApi.h),)
|
||||
ifneq ($(wildcard $(SRCDIR)/thirdparty/libopal/include/opal/AsyncApi.h),)
|
||||
LIB_OBJS += opal.o
|
||||
|
||||
LIB_CFLAGS += -I thirdparty/libopal/include/opal/ -DWITH_OPAL
|
||||
LIB_LDFLAGS += -L/lib/i386-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -Lthirdparty/libopal/
|
||||
LIB_CFLAGS += -I $(SRCDIR)/thirdparty/libopal/include/opal/ -DWITH_OPAL
|
||||
LIB_LDFLAGS += -L/lib/i386-linux-gnu/ -L/usr/lib/i386-linux-gnu/ -L$(SRCDIR)/thirdparty/libopal/
|
||||
LIB_LDLIBS += -lOpalAsyncApiCore -lOpalCore -lOpalUtils -lirc
|
||||
|
||||
# libOpalAsyncApi is a 32bit library. So we need to build everything in 32bit
|
||||
|
|
Loading…
Add table
Reference in a new issue