diff --git a/premake5.lua b/premake5.lua index b632643..d995773 100644 --- a/premake5.lua +++ b/premake5.lua @@ -25,10 +25,3 @@ workspace "bake" configuration "release" defines { "NDEBUG" } optimize "On" - - filter { "system:macosx", "action:gmake"} - toolset "clang" - links { "dl", "pthread" } - - filter { "system:linux", "action:gmake"} - links { "rt", "dl", "pthread", "m" } diff --git a/util/build-darwin/bake_util.make b/util/build-darwin/bake_util.make index c4a66ae..2abcf47 100644 --- a/util/build-darwin/bake_util.make +++ b/util/build-darwin/bake_util.make @@ -30,7 +30,7 @@ ifeq ($(config),debug) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += + LIBS += -ldl -lpthread LDDEPS += ALL_LDFLAGS += $(LDFLAGS) -dynamiclib -Wl,-install_name,@rpath/libbake_util.dylib LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) @@ -65,7 +65,7 @@ ifeq ($(config),release) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O2 -fPIC ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O2 -fPIC ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += + LIBS += -ldl -lpthread LDDEPS += ALL_LDFLAGS += $(LDFLAGS) -dynamiclib -Wl,-install_name,@rpath/libbake_util.dylib LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) diff --git a/util/build-linux/bake_util.make b/util/build-linux/bake_util.make index ba21a6a..59dac4b 100644 --- a/util/build-linux/bake_util.make +++ b/util/build-linux/bake_util.make @@ -22,7 +22,7 @@ ifeq ($(config),debug) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -std=c99 -D_XOPEN_SOURCE=600 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -std=c99 -D_XOPEN_SOURCE=600 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += + LIBS += -lrt -ldl -lpthread -lm LDDEPS += ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libbake_util.so LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) @@ -49,7 +49,7 @@ ifeq ($(config),release) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O2 -fPIC -std=c99 -D_XOPEN_SOURCE=600 ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O2 -fPIC -std=c99 -D_XOPEN_SOURCE=600 ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) - LIBS += + LIBS += -lrt -ldl -lpthread -lm LDDEPS += ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libbake_util.so -s LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) diff --git a/util/premake5.lua b/util/premake5.lua index 3cf77b3..73aba07 100644 --- a/util/premake5.lua +++ b/util/premake5.lua @@ -24,3 +24,10 @@ workspace "bake_util" configuration "release" defines { "UT_IMPL", "NDEBUG" } optimize "On" + + filter { "system:macosx", "action:gmake"} + toolset "clang" + links { "dl", "pthread" } + + filter { "system:linux", "action:gmake"} + links { "rt", "dl", "pthread", "m" }