diff options
author | Robin Krahl <me@robin-krahl.de> | 2018-03-27 17:51:10 +0200 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2018-03-27 17:51:10 +0200 |
commit | 158a71f4cc867d0c211fbe971157b67bf0c0570e (patch) | |
tree | 46ff289e3475599b1a0842cb0f05cda1f260ec0f /Makefile | |
parent | cecedeca90bf231c5cd10b618ee2a61feb25cf83 (diff) | |
download | midbro-158a71f4cc867d0c211fbe971157b67bf0c0570e.tar.gz midbro-158a71f4cc867d0c211fbe971157b67bf0c0570e.tar.bz2 |
Refactor make targets lib/midbro and midbro_test
Rename the targets lib/midbro and midbro_test to lib/libmidbro.so and
bin/midbro_test so that they refer to the actually generated fales
instead of being “phony”.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -16,17 +16,17 @@ else CPPFLAGS += -DDEBUG endif -.PHONY: all dirs clean install uninstall lib/midbro bin/tests +.PHONY: all dirs clean install uninstall bin/tests -all: dirs lib/midbro +all: dirs lib/libmidbro.so dirs: mkdir -p build bin lib -lib/midbro: $(OBJ) - $(CC) -shared $^ -o lib/libmidbro.so $(LDFLAGS) +lib/libmidbro.so: $(OBJ) + $(CC) -shared $^ -o "$@" $(LDFLAGS) -midbro_test: +bin/midbro_test: $(CC) test/midbro_test.c -I./includes -o bin/midbro_test -L./lib -lmidbro build/%.o: src/%.c @@ -41,7 +41,7 @@ build/tests.o: test/tests.c clean: rm build/* bin/* -install: lib/midbro +install: lib/libmidbro.so mkdir -p "$(PREFIX)/include" mkdir -p "$(PREFIX)/lib" cp -p includes/midbro.h "$(PREFIX)/include/" |