diff -r 23fa058ae54b -r 2f845b5bda9d src/server/Makefile --- a/src/server/Makefile Sun May 13 12:06:41 2018 +0200 +++ b/src/server/Makefile Tue May 15 18:48:53 2018 +0200 @@ -35,7 +35,9 @@ LIB_WSCFG = $(BUILD_ROOT)/build/lib/libwscfg$(LIB_EXT) -all: preparation $(MAIN_TARGET) $(LIB_WSCFG) $(PLUGINS) +TEST_TARGET = $(BUILD_ROOT)/build/bin/wstest + +all: preparation $(MAIN_TARGET) $(LIB_WSCFG) $(PLUGINS) $(TEST_TARGET) include util/objs.mk include safs/objs.mk @@ -43,6 +45,7 @@ include daemon/objs.mk include config/objs.mk include admin/objs.mk +include test/objs.mk include util/Makefile include safs/Makefile @@ -50,10 +53,13 @@ include daemon/Makefile include config/Makefile include admin/Makefile +include test/Makefile -MAINOBJS = $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) $(ADMINOBJS) +MAINOBJS = $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) $(ADMINOBJS) -OBJ_DIRS = daemon safs ucx util webdav config admin plugins +TESTOBJS += $(MAINOBJS) + +OBJ_DIRS = daemon safs ucx util webdav config admin plugins test MK_OBJ_DIRS = $(OBJ_DIRS:%=$(OBJ_DIR)server/%) CFLAGS += -I../ @@ -64,15 +70,14 @@ $(MK_OBJ_DIRS): mkdir -p $@ -$(MAIN_TARGET): $(MAINOBJS) - $(CXX) -o $(MAIN_TARGET) $(MAINOBJS) -L$(BUILD_ROOT)/build/lib $(LDFLAGS) +$(MAIN_TARGET): preparation $(MAINOBJS) $(DAEMON_STARTOBJ) + $(CXX) -o $(MAIN_TARGET) $(MAINOBJS) $(DAEMON_STARTOBJ) -L$(BUILD_ROOT)/build/lib $(LDFLAGS) $(LIB_WSCFG): $(CONFOBJS) $(CC) $(SHLIB_LDFLAGS) -o $@ $(CONFOBJS) - -../../build/server/ucx/%.o: %.c - $(CC) -o $@ -c $(CFLAGS) $< +$(TEST_TARGET): $(TESTOBJS) + $(CXX) -o $(TEST_TARGET) $(TESTOBJS) -L$(BUILD_ROOT)/build/lib $(LDFLAGS) $(PLUGINS): $(MAIN_TARGET) FORCE