aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2022-10-10 18:08:23 +0200
committerGravatar Tim Segers <tsegers@pm.me>2022-10-10 18:26:26 +0200
commit2337828095920b8debdb0f8e0337a9d6aad6b55c (patch)
tree5f2427f6cceed61423d17dccabe626f65e695e04 /Makefile
parent5a13248060e51ac11436e9c0aa9f1694998caf54 (diff)
downloadopendeco-2337828095920b8debdb0f8e0337a9d6aad6b55c.tar.gz
Add minunit.h with some trivial tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 43f137c..ef132c5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,20 @@ VERSION=\"$(shell git describe --tags --dirty)\"
PREFIX = /usr/local
-all: opendeco
+all: opendeco test/opendeco_test
opendeco: opendeco.c deco.c deco.h schedule.c schedule.h output.c output.h
gcc --std=c99 -pedantic -Wall -Werror -O3 -DVERSION=${VERSION} opendeco.c deco.c schedule.c output.c -lm -o opendeco
+test/opendeco_test: deco.c test/opendeco_test.c
+ gcc --std=c99 -pedantic -Wall -Werror -O3 test/minunit.c test/opendeco_test.c test/deco_test.c deco.c -lm -o test/opendeco_test
+
run: opendeco
./opendeco -d 30 -t 120 -g EAN32 --decogasses EAN50
+test: test/opendeco_test
+ ./test/opendeco_test
+
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f opendeco ${DESTDIR}${PREFIX}/bin
@@ -20,3 +26,4 @@ uninstall:
clean:
rm opendeco
+ rm test/opendeco_test