summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: a4ccc66ec267dd95ac0183a247137a9ebdad48f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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}