]> git.stg.codes - stg.git/blobdiff - projects/sgauthstress/Makefile
Fix build on Darwin.
[stg.git] / projects / sgauthstress / Makefile
index 4474e77fd13c9aa2f9903144d3de30e55636b735..4415220f1e821aa258f2f8db3e5a24cd3125fdb6 100644 (file)
@@ -9,21 +9,19 @@ SRCS = main.cpp \
        proto.cpp
 
 STGLIBS = dotconfpp \
-         locker \
-         crypto \
-         common
+          crypto \
+          common
 
 STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
 STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
 
-LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD)
+LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) $(LIBICONV)
 
 ifeq ($(OS),linux)
 LIBS += -ldl
 else
 LIBS += -lintl \
-        -lc \
-       -liconv
+        -lc
 endif
 
 SEARCH_DIRS = -I ../../include
@@ -32,7 +30,12 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
 
 CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
 CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
-LDFLAGS += -Wl,-E $(STGLIBS_LIBS)
+
+ifneq ($(OS),darwin)
+LDFLAGS += -Wl,-E
+endif
+
+LDFLAGS += $(STGLIBS_LIBS)
 
 .PHONY: all clean distclean libs plugins
 all: libs plugins $(PROG) ../../Makefile.conf
@@ -40,7 +43,7 @@ all: libs plugins $(PROG) ../../Makefile.conf
 libs:
        $(MAKE) -C $(DIR_LIBSRC)
 
-plugins: libs 
+plugins: libs
        $(MAKE) -C $(DIR_PLUGINS)
 
 $(PROG): $(OBJS)