src/server/plugins/postgresql/Makefile

branch
webdav
changeset 287
a171da778817
parent 275
535004faa1a5
child 299
f927ef81a12b
equal deleted inserted replaced
286:864e2d701dd4 287:a171da778817
34 SRC = init.c 34 SRC = init.c
35 SRC += resource.c 35 SRC += resource.c
36 SRC += service.c 36 SRC += service.c
37 SRC += vfs.c 37 SRC += vfs.c
38 38
39 TEST_SRC = pgtest.c
40
39 OBJ = $(SRC:%.c=$(BUILD_ROOT)/build/server/plugins/postgresql/%$(OBJ_EXT)) 41 OBJ = $(SRC:%.c=$(BUILD_ROOT)/build/server/plugins/postgresql/%$(OBJ_EXT))
42
43 TEST_OBJ = $(TEST_SRC:%.c=$(BUILD_ROOT)/build/server/plugins/postgresql/%$(OBJ_EXT))
40 44
41 BUILD_DIR = $(BUILD_ROOT)/build/server/plugins/postgresql 45 BUILD_DIR = $(BUILD_ROOT)/build/server/plugins/postgresql
42 46
43 PLUGIN_TARGET = $(BUILD_ROOT)/build/lib/libwspostgresql$(LIB_EXT) 47 PLUGIN_TARGET = $(BUILD_ROOT)/build/lib/libwspostgresql$(LIB_EXT)
48 TEST_TARGET = $(BUILD_ROOT)/build/lib/libwspgtest$(LIB_EXT)
44 49
45 all: $(PLUGIN_TARGET) 50 PGTEST = $(BUILD_ROOT)/build/server/plugins/postgresql/test
51
52 all: $(PLUGIN_TARGET) $(TEST_TARGET) $(PGTEST)
46 53
47 $(BUILD_DIR): 54 $(BUILD_DIR):
48 mkdir -p $(BUILD_DIR) 55 mkdir -p $(BUILD_DIR)
49 56
50 $(PLUGIN_TARGET): $(BUILD_DIR) $(OBJ) 57 $(PLUGIN_TARGET): $(BUILD_DIR) $(OBJ)
51 $(CC) $(POSTGRESQL_LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $(OBJ) 58 $(CC) $(POSTGRESQL_LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $(OBJ)
59
60 $(TEST_TARGET): $(BUILD_DIR) $(OBJ) $(TEST_OBJ)
61 $(CC) $(POSTGRESQL_LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $(OBJ) $(TEST_OBJ)
52 62
53 $(BUILD_DIR)/%.o: %.c 63 $(BUILD_DIR)/%.o: %.c
54 $(CC) $(CFLAGS) $(POSTGRESQL_CFLAGS) $(SHLIB_CFLAGS) -c -o $@ $< 64 $(CC) $(CFLAGS) $(POSTGRESQL_CFLAGS) $(SHLIB_CFLAGS) -c -o $@ $<
65
66 $(PGTEST): $(OBJ)
67 cd test; $(MAKE)

mercurial