summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors a m <samuel@yakubos.org>2026-06-07 02:24:08 +0100
committers a m <samuel@yakubos.org>2026-06-07 02:24:08 +0100
commit2b957653d241dcb1dd6479241b7be7aeb8c9c118 (patch)
tree7a3961f80c69eea50af6f0980d8f87b3f441d72d
parentf6705daa5ef7be2deb1e1a183e92417d9770f99c (diff)
Makefile install option
-rwxr-xr-xMakefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ace1cb4..3e80f29 100755
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
# Big kram's stats app
#clear ; vim main.c ; gcc main.c -Wall -Wextra -Wpedantic -std=c99 -o stats
+PREFIX = /usr/local
+
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
CC = gcc
@@ -11,3 +13,10 @@ all:
${CC} ${CFLAGS} ${SRC} -o stats
.PHONY: all clean dist install uninstall
+
+install: all
+ ${CC} ${CFLAGS} ${SRC} -o stats
+ cp -f stats ${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/stats
+
+