aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-10 03:34:50 +0200
committerMattias Andrée <maandree@kth.se>2021-04-10 03:34:50 +0200
commite96cc8408d8cfeb00d61bd4054aa2c85a51e3e31 (patch)
tree6854e58b81f6dd41eb81091e3842ee95154ccde7 /Makefile
parentFix cursor pos report and update interactive test (diff)
downloadlibterminput-e96cc8408d8cfeb00d61bd4054aa2c85a51e3e31.tar.gz
libterminput-e96cc8408d8cfeb00d61bd4054aa2c85a51e3e31.tar.bz2
libterminput-e96cc8408d8cfeb00d61bd4054aa2c85a51e3e31.tar.xz
Add tests and make some fixes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
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