aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-13 19:07:57 +0200
committerMattias Andrée <maandree@kth.se>2017-10-13 19:07:57 +0200
commit76485979dd99159f032b35a4bf87cb0b8ed4c87d (patch)
treec207ff5fcef5a71a3407b0121bbc19a30d70248f /Makefile
parentRewrite with style (and relicense) (diff)
downloadadjbacklight-76485979dd99159f032b35a4bf87cb0b8ed4c87d.tar.gz
adjbacklight-76485979dd99159f032b35a4bf87cb0b8ed4c87d.tar.bz2
adjbacklight-76485979dd99159f032b35a4bf87cb0b8ed4c87d.tar.xz
Add test8.0.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
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