From 38e59dbe061c0fcb9ed5491dd15a01a210d498e0 Mon Sep 17 00:00:00 2001 From: Tim Segers Date: Thu, 6 Oct 2022 23:26:55 +0200 Subject: Add install target to makefile --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.3-70-g09d2