From fe1c9fffef7d6f575b8462c7fdb2c017829cb3e5 Mon Sep 17 00:00:00 2001 From: David Barrett Date: Mon, 1 Oct 2018 12:51:37 -0700 Subject: [PATCH] Possibly working on both Mac and Ubuntu? --- Makefile | 1 - test/clustertest/testplugin/Makefile | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4d4a97c6a..07e13e419 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,6 @@ testplugin: # Set up our precompiled header. This makes building *way* faster (roughly twice as fast). # Including it here causes it to be generated. # Depends on one of our mbedtls files, to make sure the submodule gets pulled and built. -UNAME_S := $(shell uname -s) PRECOMPILE_D =libstuff/libstuff.d PRECOMPILE_INCLUDE =-include libstuff/libstuff.h libstuff/libstuff.h.gch libstuff/libstuff.d: libstuff/libstuff.h mbedtls/library/libmbedcrypto.a diff --git a/test/clustertest/testplugin/Makefile b/test/clustertest/testplugin/Makefile index 5fb7cd76c..0c024031c 100644 --- a/test/clustertest/testplugin/Makefile +++ b/test/clustertest/testplugin/Makefile @@ -51,11 +51,15 @@ ifneq ($(MAKECMDGOALS),clean) -include $(DEP) endif -LIBRARIES =-lpcrecpp -lbedrock -lstuff -ldl -lpthread -lmbedtls -lmbedx509 -lmbedcrypto -lz +# OSX needs to re-link the libraries for some reason +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Darwin) +LIBRARIES = -L../../../ -L../../../mbedtls/library -rdynamic -lpcrecpp -lbedrock -lstuff -ldl -lpthread -lmbedtls -lmbedx509 -lmbedcrypto -lz +endif # The main library depends on all the .o files. testplugin.so: $(OBJ) - $(GXX) $(CXXFLAGS) -shared -o $@ $(OBJ) -lpcrecpp -L../../../ -L../../../mbedtls/library -rdynamic $(LIBRARIES) + $(GXX) $(CXXFLAGS) -shared -o $@ $(OBJ) $(LIBRARIES) # Make dependency files from cpp files, putting them in $INTERMEDIATEDIR. # This is the same as making the object files, both dependencies and object files are built together. The only