src/server/Makefile

changeset 198
2f845b5bda9d
parent 179
ef6827505bd2
child 254
4784c14aa639
equal deleted inserted replaced
197:23fa058ae54b 198:2f845b5bda9d
33 33
34 MAIN_TARGET = $(BUILD_ROOT)/build/bin/webservd 34 MAIN_TARGET = $(BUILD_ROOT)/build/bin/webservd
35 35
36 LIB_WSCFG = $(BUILD_ROOT)/build/lib/libwscfg$(LIB_EXT) 36 LIB_WSCFG = $(BUILD_ROOT)/build/lib/libwscfg$(LIB_EXT)
37 37
38 all: preparation $(MAIN_TARGET) $(LIB_WSCFG) $(PLUGINS) 38 TEST_TARGET = $(BUILD_ROOT)/build/bin/wstest
39
40 all: preparation $(MAIN_TARGET) $(LIB_WSCFG) $(PLUGINS) $(TEST_TARGET)
39 41
40 include util/objs.mk 42 include util/objs.mk
41 include safs/objs.mk 43 include safs/objs.mk
42 include webdav/objs.mk 44 include webdav/objs.mk
43 include daemon/objs.mk 45 include daemon/objs.mk
44 include config/objs.mk 46 include config/objs.mk
45 include admin/objs.mk 47 include admin/objs.mk
48 include test/objs.mk
46 49
47 include util/Makefile 50 include util/Makefile
48 include safs/Makefile 51 include safs/Makefile
49 include webdav/Makefile 52 include webdav/Makefile
50 include daemon/Makefile 53 include daemon/Makefile
51 include config/Makefile 54 include config/Makefile
52 include admin/Makefile 55 include admin/Makefile
56 include test/Makefile
53 57
54 MAINOBJS = $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) $(ADMINOBJS) 58 MAINOBJS = $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) $(ADMINOBJS)
55 59
56 OBJ_DIRS = daemon safs ucx util webdav config admin plugins 60 TESTOBJS += $(MAINOBJS)
61
62 OBJ_DIRS = daemon safs ucx util webdav config admin plugins test
57 MK_OBJ_DIRS = $(OBJ_DIRS:%=$(OBJ_DIR)server/%) 63 MK_OBJ_DIRS = $(OBJ_DIRS:%=$(OBJ_DIR)server/%)
58 64
59 CFLAGS += -I../ 65 CFLAGS += -I../
60 LDFLAGS += -lucx 66 LDFLAGS += -lucx
61 67
62 preparation: $(MK_OBJ_DIRS) 68 preparation: $(MK_OBJ_DIRS)
63 69
64 $(MK_OBJ_DIRS): 70 $(MK_OBJ_DIRS):
65 mkdir -p $@ 71 mkdir -p $@
66 72
67 $(MAIN_TARGET): $(MAINOBJS) 73 $(MAIN_TARGET): preparation $(MAINOBJS) $(DAEMON_STARTOBJ)
68 $(CXX) -o $(MAIN_TARGET) $(MAINOBJS) -L$(BUILD_ROOT)/build/lib $(LDFLAGS) 74 $(CXX) -o $(MAIN_TARGET) $(MAINOBJS) $(DAEMON_STARTOBJ) -L$(BUILD_ROOT)/build/lib $(LDFLAGS)
69 75
70 $(LIB_WSCFG): $(CONFOBJS) 76 $(LIB_WSCFG): $(CONFOBJS)
71 $(CC) $(SHLIB_LDFLAGS) -o $@ $(CONFOBJS) 77 $(CC) $(SHLIB_LDFLAGS) -o $@ $(CONFOBJS)
72 78
73 79 $(TEST_TARGET): $(TESTOBJS)
74 ../../build/server/ucx/%.o: %.c 80 $(CXX) -o $(TEST_TARGET) $(TESTOBJS) -L$(BUILD_ROOT)/build/lib $(LDFLAGS)
75 $(CC) -o $@ -c $(CFLAGS) $<
76 81
77 82
78 $(PLUGINS): $(MAIN_TARGET) FORCE 83 $(PLUGINS): $(MAIN_TARGET) FORCE
79 cd plugins/$@/; $(MAKE) all 84 cd plugins/$@/; $(MAKE) all
80 85

mercurial