summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-06 13:54:49 +0100
committersumuel <samuel@yakubos.org>2026-08-06 13:54:49 +0100
commit121aaa819958473e12197ff48933f7ca8cc4e7bc (patch)
treeb33c8ddabf6cb526faaa9d93c7bfa06d5000b72e /Makefile
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..a4ccc66
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+PREFIX = /usr/local
+
+CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -O3
+NCURSES = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -lncurses -ltinfo
+
+CC = cc
+
+SRC = main.c board.c
+TARGET = sudoku
+
+all:
+ ${CC} ${SRC} -o ${TARGET} ${CFLAGS} ${NCURSES}
+
+install: all
+ ${CC} ${NCURSES} ${CFLAGS} ${SRC} -o ${TARGET}
+ cp -f sudoku ${DESTDIR}${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/${TARGET}
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/${TARGET}
+
+