summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 87b33c8eb2425b97545e80df25726c6af191473f (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 -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}