From 2b957653d241dcb1dd6479241b7be7aeb8c9c118 Mon Sep 17 00:00:00 2001 From: s a m Date: Sun, 7 Jun 2026 02:24:08 +0100 Subject: Makefile install option --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) 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 + + -- cgit v1.2.3