src/server/Makefile

changeset 14
b8bf95b39952
parent 13
1fdbf4170ef4
child 16
a9bbd82d2dce
equal deleted inserted replaced
13:1fdbf4170ef4 14:b8bf95b39952
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 # POSSIBILITY OF SUCH DAMAGE. 26 # POSSIBILITY OF SUCH DAMAGE.
27 # 27 #
28 28
29 BUILD_ROOT = ../../ 29 BUILD_ROOT = ../../
30
31 LDFLAGS = -L/usr/lib/mps -R/usr/lib/mps -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lposix4 -lsocket -lnsl -lgen -lm -lsendfile -lxerces-c -pg
32
30 OBJ_DIR = $(BUILD_ROOT)build/ 33 OBJ_DIR = $(BUILD_ROOT)build/
31
32 CFLAGS = -I/usr/include/mps -g
33 LDFLAGS = -L/usr/lib/mps -R/usr/lib/mps -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lposix4 -lsocket -lnsl -lgen -lm -lsendfile -lxerces-c -pg
34 34
35 MAIN_TARGET = $(BUILD_ROOT)work/bin/webservd 35 MAIN_TARGET = $(BUILD_ROOT)work/bin/webservd
36 36
37 include objs.mk
38
39 all: preparation $(MAIN_TARGET) 37 all: preparation $(MAIN_TARGET)
40 38
41 preparation: 39 include ucx/objs.mk
42 mkdir -p $(OBJPRE) 40 include util/objs.mk
41 include safs/objs.mk
42 include webdav/objs.mk
43 include daemon/objs.mk
44
45 MAINOBJS = $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS)
46
47 OBJ_DIRS = daemon safs ucx util webdav
48 MK_OBJ_DIRS = $(OBJ_DIRS:%=$(OBJ_DIR)server/%)
49
50 preparation: $(MK_OBJ_DIRS)
43 mkdir -p $(BUILD_ROOT)work/bin 51 mkdir -p $(BUILD_ROOT)work/bin
52
53 $(MK_OBJ_DIRS):
54 mkdir -p $@
44 55
45 $(MAIN_TARGET): $(MAINOBJS) 56 $(MAIN_TARGET): $(DAEMONOBJS) $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS)
46 CC -o $(MAIN_TARGET) $(LDFLAGS) $(MAINOBJS) 57 CC -o $(MAIN_TARGET) $(LDFLAGS) $(MAINOBJS)
47 58
48 $(OBJPRE)%.o: %.c 59 $(DAEMONOBJS): $(UCXOBJS)
49 cc -o $@ -c $(CFLAGS) $< 60 cd daemon; $(MAKE) all
61 $(UCXOBJS):
62 cd ucx; $(MAKE) all
63 $(UTILOBJS):
64 cd util; $(MAKE) all
65 $(SAFOBJS):
66 cd safs; $(MAKE) all
67 $(DAVOBJS):
68 cd webdav; $(MAKE) all
50 69
51 $(OBJPRE)%.o: %.cpp
52 CC -o $@ -c $(CFLAGS) $<
53

mercurial