From 76485979dd99159f032b35a4bf87cb0b8ed4c87d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 13 Oct 2017 19:07:57 +0200 Subject: Add test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d88ecc7..a179778 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CONFIGFILE = config.mk include $(CONFIGFILE) -all: adjbacklight +all: adjbacklight test adjbacklight.o: adjbacklight.c arg.h $(CC) -c -o adjbacklight.o adjbacklight.c $(CCFLAGS) $(CPPFLAGS) @@ -11,6 +11,15 @@ adjbacklight.o: adjbacklight.c arg.h adjbacklight: adjbacklight.o $(CC) -o adjbacklight adjbacklight.o $(LDFLAGS) +test.o: test.c adjbacklight.c arg.h + $(CC) -c -o test.o test.c $(CCFLAGS) $(CPPFLAGS) + +test: test.o + $(CC) -o test test.o $(LDFLAGS) + +check: + ./test.sh + install: adjbacklight mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" @@ -27,6 +36,6 @@ uninstall: -rmdir -- "$(DESTDIR)$(PREFIX)/share/licenses/adjbacklight" clean: - -rm -- adjbacklight *.o + -rm -r -- adjbacklight test *.o .testdir -.PHONY: all install uninstall clean +.PHONY: all check install uninstall clean -- cgit v1.2.3-70-g09d2