From: Maxim Mamontov Date: Wed, 27 Jul 2011 14:08:48 +0000 (+0300) Subject: Fix compilation and linkage issues X-Git-Tag: 2.408-alpha~60 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/1e3b7df4933a8db8bb625d394994c8863f2c7bdd Fix compilation and linkage issues --- diff --git a/projects/convertor/Makefile b/projects/convertor/Makefile index 569917d2..86ab6ed3 100644 --- a/projects/convertor/Makefile +++ b/projects/convertor/Makefile @@ -29,7 +29,7 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += -Wall LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(DIR_LIB) -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) .PHONY: all clean distclean libs plugins install uninstall all: libs plugins $(PROG) ../../Makefile.conf @@ -41,7 +41,7 @@ plugins: libs $(MAKE) -C $(DIR_PLUGINS) $(PROG): $(OBJS) $(STGLIBS) - $(CC) $^ $(LDFLAGS) $(LIBS) -o $(PROG) + $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG) clean: rm -f deps $(PROG) *.o tags *.*~ .OS diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile index da1a5768..68cdb5be 100644 --- a/projects/rlm_stg/Makefile +++ b/projects/rlm_stg/Makefile @@ -30,7 +30,7 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += -Wall -fPIC -I./ LDFLAGS += -shared -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) .PHONY: all clean distclean libs install uninstall install-bin uninstall-bin all: libs $(PROG) ../../Makefile.conf @@ -39,7 +39,7 @@ libs: $(MAKE) -C $(DIR_LIBSRC) $(PROG): $(OBJS) $(STGLIBS) - $(CC) $^ $(LDFLAGS) -o $(PROG) $(LIBS) + $(CXX) $^ $(LDFLAGS) -o $(PROG) $(LIBS) clean: rm -f deps $(PROG) *.o tags *.*~ .OS diff --git a/projects/rscriptd/Makefile b/projects/rscriptd/Makefile index 2b6cbc1c..a009a5c1 100644 --- a/projects/rscriptd/Makefile +++ b/projects/rscriptd/Makefile @@ -18,12 +18,6 @@ STGLIBS = -lstglogger \ LIBS += $(LIB_THREAD) -#ifeq ($(OS),linux) -#LIBS += -ldl -#else -#LIBS += -lc -#endif - SEARCH_DIRS = -I $(DIR_INCLUDE) OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) @@ -31,7 +25,7 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += -Wall LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB) -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) .PHONY: all clean distclean libs install uninstall all: libs $(PROG) ../../Makefile.conf @@ -40,7 +34,7 @@ libs: $(MAKE) -C $(DIR_LIBSRC) $(PROG): $(OBJS) $(STGLIBS) - $(CC) $^ $(LDFLAGS) $(LIBS) -o $(PROG) + $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG) clean: rm -f deps $(PROG) *.o tags *.*~ .OS diff --git a/projects/sgauth/Makefile b/projects/sgauth/Makefile index 338e3500..cf2e2c53 100644 --- a/projects/sgauth/Makefile +++ b/projects/sgauth/Makefile @@ -11,9 +11,9 @@ SRCS = ./main.cpp \ ./web.cpp STGLIBS = -lstgconffiles \ + -lstgia \ -lstgcrypto \ - -lstgcommon \ - -lstgia + -lstgcommon LIBS += $(LIB_THREAD) @@ -30,7 +30,7 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += -Wall LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB) -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data all: libs $(PROG) ../../Makefile.conf @@ -39,7 +39,7 @@ libs: $(MAKE) -C $(DIR_LIBSRC) $(PROG): $(OBJS) $(STGLIBS) - $(CC) $^ $(LDFLAGS) -o $(PROG) $(LIBS) + $(CXX) $^ $(LDFLAGS) -o $(PROG) $(LIBS) clean: rm -f deps $(PROG) *.o tags *.*~ .OS diff --git a/projects/sgauthstress/Makefile b/projects/sgauthstress/Makefile index 0dd514fe..4864da31 100644 --- a/projects/sgauthstress/Makefile +++ b/projects/sgauthstress/Makefile @@ -28,7 +28,7 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += -Wall LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB) -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) .PHONY: all clean distclean libs plugins all: libs plugins $(PROG) ../../Makefile.conf diff --git a/projects/sgconf/Makefile b/projects/sgconf/Makefile index 99135556..02f8d7b8 100644 --- a/projects/sgconf/Makefile +++ b/projects/sgconf/Makefile @@ -10,9 +10,9 @@ SRCS = ./main.cpp \ ./common_sg.cpp STGLIBS = -lstgconffiles \ + -lstgsrvconf \ -lstgcommon \ - -lstgcrypto \ - -lstgsrvconf + -lstgcrypto LIBS += -lexpat \ $(LIB_THREAD) @@ -41,7 +41,7 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += -Wall LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB) -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data all: libs $(PROG) ../../Makefile.conf @@ -50,7 +50,7 @@ libs: $(MAKE) -C $(DIR_LIBSRC) $(PROG): $(OBJS) $(STGLIBS) - $(CC) $^ $(LDFLAGS) $(LIBS) -o $(PROG) + $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG) clean: rm -f deps $(PROG) *.o tags *.*~ .OS diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index 752f05a5..2453ef5c 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -10,9 +10,9 @@ SRCS = ./main.cpp \ ./parser.cpp LIBS = -lstgconffiles \ + -lstgsrvconf \ -lstgcrypto \ - -lstgcommon \ - -lstgsrvconf + -lstgcommon LIBS += -lexpat \ $(LIB_THREAD) @@ -41,7 +41,7 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += -Wall LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB) -vpath %.so $(DIR_LIB) +vpath %.a $(DIR_LIB) .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data all: libs $(PROG) ../../Makefile.conf @@ -50,7 +50,7 @@ libs: $(MAKE) -C $(DIR_LIBSRC) $(PROG): $(OBJS) $(STGLIBS) - $(CC) $^ $(LIBS) $(LDFLAGS) -o $(PROG) + $(CXX) $^ $(LIBS) $(LDFLAGS) -o $(PROG) clean: rm -f deps $(PROG) *.o tags *.*~ .OS diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index ec271442..8c61523a 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -566,7 +566,7 @@ if (!fakeConnect) id, dirsStr); - ScriptExec(scriptOnConnectParams); + ScriptExec(scriptOnConnectParams.c_str()); } else { @@ -623,7 +623,7 @@ if (!fakeDisconnect) id, dirsStr); - ScriptExec(scriptOnDisonnectParams); + ScriptExec(scriptOnDisonnectParams.c_str()); } else { @@ -1032,7 +1032,7 @@ if (access(scriptOnAdd.c_str(), X_OK) == 0) scriptOnAdd.c_str(), login.c_str()); - ScriptExec(scriptOnAddParams); + ScriptExec(scriptOnAddParams.c_str()); } else { @@ -1054,7 +1054,7 @@ if (access(scriptOnDel.c_str(), X_OK) == 0) scriptOnDel.c_str(), login.c_str()); - ScriptExec(scriptOnDelParams); + ScriptExec(scriptOnDelParams.c_str()); } else {