aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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