--- a/src/server/Makefile Thu Feb 16 15:08:38 2012 +0100 +++ b/src/server/Makefile Wed Feb 22 23:20:39 2012 +0100 @@ -28,6 +28,8 @@ BUILD_ROOT = ../../ +CFLAGS = + LDFLAGS = -L/usr/lib/mps -R/usr/lib/mps -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lposix4 -lsocket -lnsl -lgen -lm -lsendfile -lxerces-c -pg OBJ_DIR = $(BUILD_ROOT)build/ @@ -42,13 +44,24 @@ include webdav/objs.mk include daemon/objs.mk include config/objs.mk +include admin/objs.mk -MAINOBJS = $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) +include ucx/Makefile +include util/Makefile +include safs/Makefile +include webdav/Makefile +include daemon/Makefile +include config/Makefile +include admin/Makefile -OBJ_DIRS = daemon safs ucx util webdav config +MAINOBJS = $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) $(ADMINOBJS) + +OBJ_DIRS = daemon safs ucx util webdav config admin MK_OBJ_DIRS = $(OBJ_DIRS:%=$(OBJ_DIR)server/%) MK_OBJ_DIRS += $(BUILD_ROOT)work/bin +include ucx/Makefile + preparation: $(MK_OBJ_DIRS) $(MK_OBJ_DIRS): @@ -57,16 +70,11 @@ $(MAIN_TARGET): $(MAINOBJS) CC -o $(MAIN_TARGET) $(LDFLAGS) $(MAINOBJS) -$(DAEMONOBJS): $(DAEMONSOURCE) - cd daemon; $(MAKE) all -$(UCXOBJS): $(UCXSOURCE) - cd ucx; $(MAKE) all -$(UTILOBJS): $(UTILSOURCE) - cd util; $(MAKE) all -$(SAFOBJS): $(SAFSOURCE) - cd safs; $(MAKE) all -$(CONFOBJS): $(CONFSOURCE) - cd config; $(MAKE) all -$(DAVOBJS): $(DAVSOURCE) - cd webdav; $(MAKE) all + +../../build/server/ucx/%.o: %.c + cc -o $@ -c $(CFLAGS) $< + + + +