X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/40ec7c02603812a6b65d648e7bded4f8c088cb0e..9dbaa1f22054ff5492e793259d5641b876b57ac1:/projects/sgauthstress/Makefile?ds=inline diff --git a/projects/sgauthstress/Makefile b/projects/sgauthstress/Makefile index a90e9b6d..9d5e94cd 100644 --- a/projects/sgauthstress/Makefile +++ b/projects/sgauthstress/Makefile @@ -2,16 +2,21 @@ include ../../Makefile.conf PROG = sgauthstress -SRCS = ./main.cpp \ - ./settings.cpp \ - ./store_loader.cpp +SRCS = main.cpp \ + settings.cpp \ + store_loader.cpp \ + user.cpp \ + proto.cpp -STGLIBS = -lstgcrypto \ - -lstgcommon \ - -ldotconfpp \ - -lstgia +STGLIBS = crypto \ + common \ + dotconfpp \ + locker -LIBS += $(LIB_THREAD) +STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) +STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) + +LIBS += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS)) ifeq ($(OS),linux) LIBS += -ldl @@ -20,14 +25,13 @@ LIBS += -lintl \ -lc endif -SEARCH_DIRS = -I $(DIR_INCLUDE) +SEARCH_DIRS = -I ../../include 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) +CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS) +CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS) +LDFLAGS += -Wl,-E $(STGLIBS_LIBS) .PHONY: all clean distclean libs plugins all: libs plugins $(PROG) ../../Makefile.conf @@ -38,8 +42,8 @@ libs: plugins: libs $(MAKE) -C $(DIR_PLUGINS) -$(PROG): $(OBJS) libs - $(CXX) $(OBJS) $(LDFLAGS) $(LIBS) $(STGLIBS) -o $(PROG) +$(PROG): $(OBJS) + $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG) clean: rm -f deps $(PROG) *.o *.*~ @@ -58,9 +62,9 @@ endif endif deps: $(SRCS) ../../Makefile.conf - $(MAKE) -C $(DIR_LIBSRC) includes + $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ - echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\ + echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ + echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ done