diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-23 06:24:37 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-23 06:24:57 +0200 |
commit | 092f9615d0a43254905bd4a87fe307f323e1b146 (patch) | |
tree | 1a974cefe40b4fb43740178cdd82a2a14d0e7737 /Makefile | |
parent | m + add string comparator (diff) | |
download | mds-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-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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. |