aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk21
1 files changed, 18 insertions, 3 deletions
diff --git a/mk/build.mk b/mk/build.mk
index 57ee222..e1e61b1 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -5,7 +5,13 @@
.PHONY: libraries
-libraries: bin/libmdsserver.so
+libraries: libmdsserver libmdsclient
+
+.PHONY: libmdsserver
+libmdsserver: bin/libmdsserver.so
+
+.PHONY: libmdsclient
+libmdsclient: bin/libmdsclient.so
.PHONY: servers
servers: $(foreach S,$(SERVERS),bin/$(S))
@@ -110,7 +116,7 @@ endif
# Build libmdsserver.
-bin/libmdsserver.so: $(foreach O,$(LIBOBJ),obj/libmdsserver/$(O).o)
+bin/libmdsserver.so: $(foreach O,$(SERVEROBJ),obj/libmdsserver/$(O).o)
mkdir -p $(shell dirname $@)
$(CC) $(C_FLAGS) -shared -o $@ $^
@@ -118,7 +124,6 @@ obj/libmdsserver/%.o: src/libmdsserver/%.c src/libmdsserver/*.h $(SEDED)
mkdir -p $(shell dirname $@)
$(CC) $(C_FLAGS) -fPIC -c -o $@ $<
-
# sed header files.
ifneq ($(LIBMDSSERVER_IS_INSTALLED),y)
src/libmdsserver/config.h: src/libmdsserver/config.h.in
@@ -149,3 +154,13 @@ src/libmdsserver/config.h: src/libmdsserver/config.h.in
sed -i 's:@MDS_STORAGE_ROOT_DIRECTORY@:$(MDS_STORAGE_ROOT_DIRECTORY):g' $@
endif
+
+# Build libmdsclient.
+
+bin/libmdsclient.so: $(foreach O,$(CLIENTOBJ),obj/libmdsclient/$(O).o)
+ mkdir -p $(shell dirname $@)
+ $(CC) $(C_FLAGS) -shared -o $@ $^
+
+obj/libmdsclient/%.o: src/libmdsclient/%.c src/libmdsclient/*.h $(SEDED)
+ mkdir -p $(shell dirname $@)
+ $(CC) $(C_FLAGS) -fPIC -c -o $@ $<