aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2022-10-06 23:26:55 +0200
committerGravatar Tim Segers <tsegers@pm.me>2022-10-06 23:26:55 +0200
commit38e59dbe061c0fcb9ed5491dd15a01a210d498e0 (patch)
tree1418a433e0e0b206be5281d131445b5b4a366d80
parent92b7c9262d5fac56726468c15e45f72dfeaabf52 (diff)
downloadopendeco-38e59dbe061c0fcb9ed5491dd15a01a210d498e0.tar.gz
Add install target to makefile
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5d3e992..43f137c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,22 @@
VERSION=\"$(shell git describe --tags --dirty)\"
+PREFIX = /usr/local
+
+all: opendeco
+
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
run: opendeco
./opendeco -d 30 -t 120 -g EAN32 --decogasses EAN50
+install: all
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp -f opendeco ${DESTDIR}${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/opendeco
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/opendeco
+
clean:
rm opendeco