diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index dd73693a..bae49766 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -37,7 +37,7 @@ export TRICK_ICG_NOCOMMENT export TRICK_SWIG_EXCLUDE export TRICK_GTE_EXT export TRICK_HOST_CPU := $(shell export TRICK_CC=$(TRICK_CC) && $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU) -export TRICK_EXEC_LINK_LIBS = ${PTHREAD_LIBS} $(PYTHON_LIB) +export TRICK_EXEC_LINK_LIBS = ${PTHREAD_LIBS} $(PYTHON_LIB) $(PLATFORM_LIBS) -lm -ldl -lz export TRICK_LIBS = ${RPATH} -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_units -ltrick_mm IO_SRC_DIR := io_src/ diff --git a/share/trick/makefiles/config_Darwin.mk b/share/trick/makefiles/config_Darwin.mk index e988196a..13aa931e 100644 --- a/share/trick/makefiles/config_Darwin.mk +++ b/share/trick/makefiles/config_Darwin.mk @@ -12,7 +12,4 @@ RPATH = -Wl,-rpath,${TRICK_LIB_DIR} TRICK_LDFLAGS += LD_WHOLE_ARCHIVE := -Wl,-all_load LD_NO_WHOLE_ARCHIVE := -ifeq ($(MAKELEVEL),0) -TRICK_EXEC_LINK_LIBS += -lm -ldl -lz -endif diff --git a/share/trick/makefiles/config_Linux.mk b/share/trick/makefiles/config_Linux.mk index acccab1a..2526bc90 100644 --- a/share/trick/makefiles/config_Linux.mk +++ b/share/trick/makefiles/config_Linux.mk @@ -26,35 +26,35 @@ RPATH = -Wl,-rpath=${TRICK_LIB_DIR} ifeq ($(MAKELEVEL),0) export TRICK_LDFLAGS += -Wl,--export-dynamic -TRICK_EXEC_LINK_LIBS += -lm -lrt -ldl -lz endif +PLATFORM_LIBS = -lrt LD_WHOLE_ARCHIVE := -Wl,-whole-archive LD_NO_WHOLE_ARCHIVE := -Wl,-no-whole-archive ifneq ($(DMTCP),) -TRICK_EXEC_LINK_LIBS += -L$(DMTCP)/dmtcpaware -ldmtcpaware +PLATFORM_LIBS += -L$(DMTCP)/dmtcpaware -ldmtcpaware endif ifneq ($(TPROCTE),) TRICK_ADDITIONAL_CXXFLAGS += -D_TPRO_CTE -I$(TPROCTE)/h -TRICK_EXEC_LINK_LIBS += $(TPROCTE)/lib/libtpro.a +PLATFORM_LIBS += $(TPROCTE)/lib/libtpro.a endif ifneq ($(BC635),) # BC635 driver ver 118 and earlier do not have proper include and lib dirs. TRICK_ADDITIONAL_CXXFLAGS += -D_BC635 -DLINUX -I$(BC635)/sample -TRICK_EXEC_LINK_LIBS += $(BC635)/sample/bcsdklib.a +PLATFORM_LIBS += $(BC635)/sample/bcsdklib.a endif ifeq ($(HAVE_ZEROCONF),1) -TRICK_EXEC_LINK_LIBS += -lavahi-client +PLATFORM_LIBS += -lavahi-client endif # Check BFD library version ifneq ($(BFD_HOME),) HAVE_BFD := 1 -TRICK_EXEC_LINK_LIBS += -lbfd +PLATFORM_LIBS += -lbfd endif # determine if -std=c++0x or -std=c++11 compile flags are desired