From cc02829def42e1c7620d47055331830716e9e159 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 25 Jul 2017 12:40:05 +0200 Subject: [PATCH] fixes for new build-system --- include/villas/list.h | 4 ++-- lib/nodes/Makefile.inc | 7 ------- src/Makefile.inc | 6 ++++++ src/pipe.c | 6 ++---- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/villas/list.h b/include/villas/list.h index a3afb062e..3be253561 100644 --- a/include/villas/list.h +++ b/include/villas/list.h @@ -30,11 +30,11 @@ } #define LIST_INIT_STATIC(l) \ -__attribute__((constructor(100))) static void UNIQUE(__ctor)() {\ +__attribute__((constructor(105))) static void UNIQUE(__ctor)() {\ if ((l)->state == STATE_DESTROYED) \ list_init(l); \ } \ -__attribute__((destructor(100))) static void UNIQUE(__dtor)() { \ +__attribute__((destructor(105))) static void UNIQUE(__dtor)() { \ list_destroy(l, NULL, false); \ } diff --git a/lib/nodes/Makefile.inc b/lib/nodes/Makefile.inc index 7bc542874..54c0ee57f 100644 --- a/lib/nodes/Makefile.inc +++ b/lib/nodes/Makefile.inc @@ -26,7 +26,6 @@ ifeq ($(PLATFORM),Linux) WITH_FILE ?= 1 WITH_SIGNAL ?= 1 WITH_NGSI ?= 1 - WITH_TEST_RTT ?= 1 WITH_FPGA ?= 1 endif @@ -54,12 +53,6 @@ ifeq ($(WITH_SIGNAL),1) LIB_CFLAGS += -DWITH_SIGNAL endif -# Enable RTT test node-type -ifeq ($(WITH_TEST_RTT),1) - LIB_SRCS += lib/nodes/test_rtt.c - LIB_CFLAGS += -DWITH_TEST_RTT -endif - # Enable VILLASfpga support when libxil is available ifeq ($(WITH_FPGA),1) ifeq ($(shell $(PKGCONFIG) libxil; echo $$?),0) diff --git a/src/Makefile.inc b/src/Makefile.inc index a071b53ad..fb9c06680 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -33,6 +33,12 @@ SRC_LDLIBS = $(LDLIBS) -pthread -lm -lvillas SRC_CFLAGS = $(CFLAGS) SRC_LDFLAGS = $(LDFLAGS) -Wl,-rpath,'$$ORIGIN' +ifeq ($(WITH_WEB),1) +ifeq ($(WITH_WEBSOCKET),1) + SRC_CFLAGS += -DWITH_WEBSOCKET +endif +endif + # Enable VILLASfpga support when libxil is available ifeq ($(shell $(PKGCONFIG) libxil; echo $$?),0) LIB_SRCS += $(addprefix lib/nodes/, fpga.c) diff --git a/src/pipe.c b/src/pipe.c index 1d79f1f40..a53d21c6d 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -266,11 +266,9 @@ check: if (optarg == endptr) if (!node) error("Node '%s' does not exist!", nodestr); -#ifdef WITH_WEBSOCKETS - if (node->_vt->start == websocket_start) { +#ifdef WITH_WEBSOCKET + if (node->_vt->start == websocket_start) web_start(&sn.web); - api_start(&sn.api); - } #endif if (reverse)