aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-23 06:34:51 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-23 06:34:51 +0200
commitea59a3554ab89220219398f387ff4746771e4839 (patch)
tree3494f466385db13fcfb00dcc7d693b6f5a3608c6
parentlink binaries to the library (diff)
downloadmds-ea59a3554ab89220219398f387ff4746771e4839.tar.gz
mds-ea59a3554ab89220219398f387ff4746771e4839.tar.bz2
mds-ea59a3554ab89220219398f387ff4746771e4839.tar.xz
m make
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bfe7142..9840226 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,10 @@ C_FLAGS = $(OPTIMISE) $(WARN) -std=$(STD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
-D_GNU_SOURCE -pthread
+# Object files for the libary
+LIBOBJ = linked-list hash-table
+
+
# Build rules.
.PHONY: all
@@ -74,7 +78,7 @@ obj/%.o: src/%.c src/%.h src/config.h
gcc $(C_FLAGS) -Isrc -c -o $@ $<
-bin/libmdsserver.so: obj/libmdsserver/linked-list.o obj/libmdsserver/hash-table.o
+bin/libmdsserver.so: $(foreach O,$(LIBOBJ),obj/libmdsserver/$(O).o)
mkdir -p $(shell dirname $@)
gcc $(C_FLAGS) -shared -o $@ $^