From 158a71f4cc867d0c211fbe971157b67bf0c0570e Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 27 Mar 2018 17:51:10 +0200 Subject: Refactor make targets lib/midbro and midbro_test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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”. --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1428b75..cbfe127 100644 --- a/Makefile +++ b/Makefile @@ -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/" -- cgit v1.2.3