24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
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 include $(BUILD_ROOT)config.mk |
30 include $(BUILD_ROOT)/config.mk |
31 |
31 |
32 CFLAGS = -xc99 |
32 LDFLAGS = -pg -lpthread -ldl -lnsl -lm -lxerces-c -lldap |
33 |
33 |
34 LDFLAGS = -pg -lpthread -ldl -lposix4 -lsocket -lnsl -lgen -lm -lsendfile -lxerces-c -lldap |
34 OBJ_DIR = $(BUILD_ROOT)/build/ |
35 |
35 |
36 OBJ_DIR = $(BUILD_ROOT)build/ |
36 MAIN_TARGET = $(BUILD_ROOT)/work/bin/webservd |
37 |
|
38 MAIN_TARGET = $(BUILD_ROOT)work/bin/webservd |
|
39 |
37 |
40 all: preparation $(MAIN_TARGET) |
38 all: preparation $(MAIN_TARGET) |
41 |
39 |
42 include ucx/objs.mk |
40 include ucx/objs.mk |
43 include util/objs.mk |
41 include util/objs.mk |
57 |
55 |
58 MAINOBJS = $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) $(ADMINOBJS) |
56 MAINOBJS = $(UCXOBJS) $(UTILOBJS) $(SAFOBJS) $(DAVOBJS) $(DAEMONOBJS) $(CONFOBJS) $(ADMINOBJS) |
59 |
57 |
60 OBJ_DIRS = daemon safs ucx util webdav config admin |
58 OBJ_DIRS = daemon safs ucx util webdav config admin |
61 MK_OBJ_DIRS = $(OBJ_DIRS:%=$(OBJ_DIR)server/%) |
59 MK_OBJ_DIRS = $(OBJ_DIRS:%=$(OBJ_DIR)server/%) |
62 MK_OBJ_DIRS += $(BUILD_ROOT)work/bin |
60 MK_OBJ_DIRS += $(BUILD_ROOT)/work/bin |
63 |
61 |
64 include ucx/Makefile |
62 include ucx/Makefile |
65 |
63 |
66 preparation: $(MK_OBJ_DIRS) |
64 preparation: $(MK_OBJ_DIRS) |
67 |
65 |
68 $(MK_OBJ_DIRS): |
66 $(MK_OBJ_DIRS): |
69 mkdir -p $@ |
67 mkdir -p $@ |
70 |
68 |
71 $(MAIN_TARGET): $(MAINOBJS) |
69 $(MAIN_TARGET): $(MAINOBJS) |
72 CC -o $(MAIN_TARGET) $(LDFLAGS) $(MAINOBJS) |
70 $(CXX) -o $(MAIN_TARGET) $(LDFLAGS) $(MAINOBJS) |
73 |
71 |
74 |
72 |
75 ../../build/server/ucx/%.o: %.c |
73 ../../build/server/ucx/%.o: %.c |
76 cc -o $@ -c $(CFLAGS) $< |
74 $(CC) -o $@ -c $(CFLAGS) $< |
77 |
75 |
78 |
76 |
79 |
77 |
80 |
78 |
81 |
79 |