diff --git a/lib/Makefile.inc b/lib/Makefile.inc index 787c62dba..728653992 100644 --- a/lib/Makefile.inc +++ b/lib/Makefile.inc @@ -8,12 +8,15 @@ LIB_SRCS = $(addprefix lib/nodes/, file.c cbuilder.c) \ log.c utils.c cfg.c hist.c timing.c pool.c list.c \ queue.c memory.c advio.c \ ) \ - $(wildcard lib/hooks/*.c) \ LIB_CFLAGS = $(CFLAGS) -fPIC LIB_LDFLAGS = -shared LIB_LDLIBS = $(LDLIBS) -ldl -lrt +-include lib/hooks/Makefile.inc +-include lib/apis/Makefile.inc +-include lib/fpga/Makefile.inc + ######## Node types ######## # Enable Socket node type when libnl3 is available @@ -23,8 +26,6 @@ ifeq ($(shell pkg-config libnl-route-3.0; echo $$?),0) LIB_SRCS += $(addprefix lib/kernel/, nl.c tc.c if.c) LIB_SRCS += $(addprefix lib/, msg.c) LIB_PKGS += libnl-route-3.0 -else - $(error Missing dependecy: libnl-3) endif endif @@ -33,10 +34,7 @@ ifndef WITHOUT_FPGA ifeq ($(shell pkg-config 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) PKGS += libxil -else - $(error Missing dependecy: libxil) endif endif @@ -45,8 +43,6 @@ ifndef WITHOUT_NGSI ifeq ($(shell pkg-config libcurl jansson; echo $$?),0) LIB_SRCS += lib/nodes/ngsi.c LIB_PKGS += libcurl jansson -else - $(error Missing dependecies: libjansson) endif endif @@ -55,8 +51,6 @@ ifndef WITHOUT_WEBSOCKETS ifeq ($(shell pkg-config libwebsockets jansson; echo $$?),0) LIB_SRCS += lib/nodes/websocket.c LIB_PKGS += libwebsockets jansson -else - $(error Missing dependecies: libwebsockets or libjansson) endif endif @@ -73,8 +67,6 @@ ifneq (,$(wildcard thirdparty/opal/include/AsyncApi.h)) CFLAGS += -m32 LDFLAGS += -m32 BUILDDIR := $(BUILDDIR)32 -else - $(error Missing dependecy: libOpalUtils libOpalAsyncApiCore) endif endif diff --git a/lib/fpga/Makefile.inc b/lib/fpga/Makefile.inc new file mode 100644 index 000000000..3881fd813 --- /dev/null +++ b/lib/fpga/Makefile.inc @@ -0,0 +1,6 @@ +# 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 \ No newline at end of file diff --git a/lib/hooks/Makefile.inc b/lib/hooks/Makefile.inc new file mode 100644 index 000000000..488c96ade --- /dev/null +++ b/lib/hooks/Makefile.inc @@ -0,0 +1 @@ +LIB_SRCS += $(wildcard lib/hooks/*.c) \ No newline at end of file diff --git a/lib/nodes/Makefile.inc b/lib/nodes/Makefile.inc new file mode 100644 index 000000000..20d41c0fb --- /dev/null +++ b/lib/nodes/Makefile.inc @@ -0,0 +1 @@ +LIB_SRC += $(wildcard lib/nodes/*.c) \ No newline at end of file