From 092f9615d0a43254905bd4a87fe307f323e1b146 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 23 Apr 2014 06:24:37 +0200 Subject: update makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3-70-g09d2