summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-07-15 06:46:24 +0100
committersumuel <samuel@yakubos.org>2026-07-15 06:46:24 +0100
commitf29f867a18ee82d6c79900420b6a6d5f66a75f18 (patch)
tree900a0cf9f59f2485e1eb0c190f7c16ef5082babb /Makefile
init
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..87b33c8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+PREFIX = /usr/local
+
+CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
+NCURSES = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -lncurses -ltinfo
+
+CC = gcc
+
+SRC = $(shell find . -name "*.c")
+TARGET = chess
+
+all:
+ ${CC} ${SRC} -o ${TARGET} ${CFLAGS} ${NCURSES}
+
+install: all
+ ${CC} ${NCURSES} ${CFLAGS} ${SRC} -o ${TARGET}
+ cp -f stats ${DESTDIR}${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/${TARGET}
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/${TARGET}
+
+