From: Maxim Mamontov Date: Wed, 21 Sep 2011 09:59:35 +0000 (+0300) Subject: Fix libs order (for --as-needed) X-Git-Tag: 2.408-rc2~5 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/b4338eb13c4c5fa33a3b86d4e88e5201c36e6401 Fix libs order (for --as-needed) --- diff --git a/projects/convertor/Makefile b/projects/convertor/Makefile index 86acb408..2a4a5923 100644 --- a/projects/convertor/Makefile +++ b/projects/convertor/Makefile @@ -9,16 +9,16 @@ PROG = convertor SRCS = ./main.cpp \ ./settings_impl.cpp -STGLIBS = logger \ - common \ - dotconfpp \ - crypto \ - conffiles +STGLIBS = dotconfpp \ + conffiles \ + logger \ + crypto \ + common STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl @@ -73,5 +73,3 @@ deps: $(SRCS) ../../Makefile.conf echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ done - - diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile index 635a572f..a22902cf 100644 --- a/projects/rlm_stg/Makefile +++ b/projects/rlm_stg/Makefile @@ -11,13 +11,13 @@ PROG = $(LIB_NAME).so SRCS = ./rlm_stg.cpp \ ./stg_client.cpp -STGLIBS = common \ - crypto - +STGLIBS = crypto \ + common + STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl @@ -79,5 +79,3 @@ deps: $(SRCS) ../../Makefile.conf echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ done - - diff --git a/projects/rscriptd/Makefile b/projects/rscriptd/Makefile index 53029eb6..a4e2a557 100644 --- a/projects/rscriptd/Makefile +++ b/projects/rscriptd/Makefile @@ -10,21 +10,21 @@ SRCS = ./main.cpp \ ./listener.cpp \ ./pidfile.cpp -STGLIBS = logger \ - locker \ - common \ - crypto \ - scriptexecuter \ - conffiles - -ifneq ($(OS),linux) -LIBS += -liconv -endif +STGLIBS = scriptexecuter \ + conffiles \ + logger \ + locker \ + crypto \ + common STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) + +ifneq ($(OS),linux) +LIBS += -liconv +endif SEARCH_DIRS = -I ../../include @@ -90,5 +90,3 @@ deps: $(SRCS) ../../Makefile.conf echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ done - - diff --git a/projects/sgauth/Makefile b/projects/sgauth/Makefile index fe588238..98867c5f 100644 --- a/projects/sgauth/Makefile +++ b/projects/sgauth/Makefile @@ -11,14 +11,14 @@ SRCS = ./main.cpp \ ./web.cpp STGLIBS = conffiles \ - ia \ crypto \ + ia \ common STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifneq ($(OS),linux) LIBS += -lintl \ diff --git a/projects/sgauthstress/Makefile b/projects/sgauthstress/Makefile index 174c31a2..9236317d 100644 --- a/projects/sgauthstress/Makefile +++ b/projects/sgauthstress/Makefile @@ -8,15 +8,15 @@ SRCS = main.cpp \ user.cpp \ proto.cpp -STGLIBS = crypto \ - common \ - dotconfpp \ - locker +STGLIBS = dotconfpp \ + locker \ + crypto \ + common STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl diff --git a/projects/sgconf/Makefile b/projects/sgconf/Makefile index 6dbf2117..7e0c5583 100644 --- a/projects/sgconf/Makefile +++ b/projects/sgconf/Makefile @@ -11,13 +11,13 @@ SRCS = ./main.cpp \ STGLIBS = conffiles \ srvconf \ - common \ - crypto + crypto \ + common STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += -lexpat $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) -lexpat $(LIB_THREAD) ifeq ($(OS),linux) else @@ -90,5 +90,3 @@ deps: $(SRCS) ../../Makefile.conf echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ done - - diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index 671833ed..f45cb8f8 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -17,7 +17,7 @@ STGLIBS = conffiles \ STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += -lexpat $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) -lexpat $(LIB_THREAD) ifeq ($(OS),linux) else @@ -90,5 +90,3 @@ deps: $(SRCS) ../../Makefile.conf echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ done - - diff --git a/projects/stargazer/Makefile b/projects/stargazer/Makefile index 33027aaa..97c2e856 100644 --- a/projects/stargazer/Makefile +++ b/projects/stargazer/Makefile @@ -24,16 +24,16 @@ SRCS = ./admin_impl.cpp \ ./user_property.cpp \ ./users_impl.cpp -STGLIBS = logger \ - locker \ - common \ - scriptexecuter \ - dotconfpp +STGLIBS = scriptexecuter \ + dotconfpp \ + locker \ + logger \ + common STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += -lexpat $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) ifeq ($(OS),linux) LIBS += -ldl