From e96cc8408d8cfeb00d61bd4054aa2c85a51e3e31 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 10 Apr 2021 03:34:50 +0200 Subject: Add tests and make some fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 763a966..a62e2df 100644 --- a/Makefile +++ b/Makefile @@ -24,10 +24,11 @@ HDR =\ OBJ =\ interactive-test.o\ + test.o\ $(LOBJ:.lo=.o) -all: libterminput.a libterminput.$(LIBEXT) interactive-test +all: libterminput.a libterminput.$(LIBEXT) interactive-test test $(OBJ): $(@:.o=.c) $(HDR) $(LOBJ): $(@:.lo=.c) $(HDR) @@ -48,6 +49,12 @@ $(LOBJ): $(@:.lo=.c) $(HDR) interactive-test: interactive-test.o libterminput.a $(CC) -o $@ interactive-test.o libterminput.a $(LDFLAGS) +test: test.o libterminput.a + $(CC) -o $@ test.o libterminput.a $(LDFLAGS) + +check: test + ./test + install: libterminput.a libterminput.$(LIBEXT) mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" mkdir -p -- "$(DESTDIR)$(PREFIX)/include" @@ -75,9 +82,9 @@ uninstall: -rm -f -- "$(DESTDIR)$(MANPREFIX)/man7/libterminput.7" clean: - -rm -f -- *.o *.a *.lo *.so *.su *.dll *.dylib interactive-test + -rm -f -- *.o *.a *.lo *.so *.su *.dll *.dylib interactive-test test .SUFFIXES: .SUFFIXES: .a .o .lo .c .$(LIBEXT) -.PHONY: all install uninstall clean +.PHONY: all check install uninstall clean -- cgit v1.2.3-70-g09d2