From 685183aec181d29f3035cdd19ab1d826e2edb5f9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 16:17:46 +0200 Subject: Improve makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index df46d2b..515e737 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,15 @@ CONFIGFILE = config.mk include $(CONFIGFILE) + all: test +test.o: binary-multisearch.h + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) -test: test.c binary-multisearch.h - $(CC) -o $@ test.c $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) +.o: + $(CC) -o $@ $< $(LDFLAGS) check: test ./test @@ -19,6 +24,9 @@ uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/include/binary-multisearch.h" clean: - -rm -f -- *.o test + -rm -f -- *.o *.su test + +.SUFFIXES: +.SUFFIXES: .o .c .PHONY: all check install uninstall clean -- cgit v1.2.3-70-g09d2