aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-23 06:24:37 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-23 06:24:57 +0200
commit092f9615d0a43254905bd4a87fe307f323e1b146 (patch)
tree1a974cefe40b4fb43740178cdd82a2a14d0e7737 /Makefile
parentm + add string comparator (diff)
downloadmds-092f9615d0a43254905bd4a87fe307f323e1b146.tar.gz
mds-092f9615d0a43254905bd4a87fe307f323e1b146.tar.bz2
mds-092f9615d0a43254905bd4a87fe307f323e1b146.tar.xz
update makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bfc5676..fedac35 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,7 @@ C_FLAGS = $(OPTIMISE) $(WARN) -std=$(STD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
# Build rules.
.PHONY: all
-all: bin/mds bin/mds-server obj/libmdsserver/linked-list.o obj/libmdsserver/hash-table.o
+all: bin/mds bin/mds-server bin/libmdsserver.so
bin/%: obj/%.o
@@ -74,6 +74,15 @@ obj/%.o: src/%.c src/%.h src/config.h
gcc $(C_FLAGS) -c -o $@ $<
+bin/libmdsserver.so: obj/libmdsserver/linked-list.o obj/libmdsserver/hash-table.o
+ mkdir -p $(shell dirname $@)
+ gcc $(C_FLAGS) -shared -o $@ $^
+
+obj/libmdsserver/%.o: src/libmdsserver/%.c src/libmdsserver/%.h
+ mkdir -p $(shell dirname $@)
+ gcc $(C_FLAGS) -fPIC -c -o $@ $<
+
+
# Clean rules.