Export symbols in order to support shared libraries (#54)
* Add BAC_ROUTING compile definition * Reorder cmake * Fix OpenSSL support: support both 1.0 and 1.1t pus * Explicitly export symbols, hidden by default * Build shared libraries on travis using cmake * Learn Makefile about static library * Fix build using mingw with cmake * Do not cleanup twice or after potential free
This commit is contained in:
committed by
GitHub
parent
bb5fafc06a
commit
4a916468c6
+8
-2
@@ -9,6 +9,12 @@
|
||||
#
|
||||
# Assumes rm and cp are available
|
||||
|
||||
CFLAGS += -Dbacnet_stack_EXPORTS
|
||||
|
||||
ifeq ($(STATIC),1)
|
||||
CFLAGS += -DBACNET_STACK_STATIC_DEFINE
|
||||
endif
|
||||
|
||||
# These might be already defined in an previous Makefile
|
||||
BACNET_PORT ?= linux
|
||||
BACNET_SRC_DIR ?= $(realpath .)
|
||||
@@ -22,7 +28,7 @@ BACNET_PORT_SRC ?= \
|
||||
BACNET_INCLUDES = -I$(BACNET_SRC_DIR) -I$(BACNET_PORT_DIR)
|
||||
CFLAGS += $(BACNET_INCLUDES)
|
||||
|
||||
BACNET_SRC ?= main.c \
|
||||
BACNET_SRC ?= \
|
||||
$(wildcard $(BACNET_SRC_DIR)/bacnet/*.c) \
|
||||
$(wildcard $(BACNET_SRC_DIR)/bacnet/basic/*.c) \
|
||||
$(wildcard $(BACNET_SRC_DIR)/bacnet/basic/binding/*.c) \
|
||||
@@ -42,7 +48,7 @@ all: $(OBJS) Makefile
|
||||
|
||||
depend:
|
||||
rm -f .depend
|
||||
${CC} -MM ${CFLAGS} *.c >> .depend
|
||||
${CC} -MM ${CFLAGS} $(BACNET_SRC) >> .depend
|
||||
|
||||
clean:
|
||||
rm -rf core $(OBJS) $(LIBRARY)
|
||||
|
||||
Reference in New Issue
Block a user