-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 861 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
OUTDIR := build
OUTFILE := run
SRC := ./src
INCLUDE := ${SRC}
#objects = ${SRC}/main.c ${SRC}/include/windows.c ${SRC}/include/arena.c ${SRC}/include/player.h
#gcc -g3 -Wall ${objects} -lncurses -o ./${OUTDIR}/${OUTFILE}
default:
@echo "Choose operation:"
@echo " make build_run - build and run the game"
@echo " make build - build the game"
@echo " make rebuild - rebuild the game"
@echo " make run - run the game"
@echo " make clean - delete all files"
rebuild: clean build
build:
mkdir -p ${OUTDIR}
gcc -g3 -Wall -pedantic main.c ${SRC}/*.c -I${SRC}/headers -lncurses -lrt -lpthread -o ./${OUTDIR}/${OUTFILE}
run:
./${OUTDIR}/${OUTFILE}
build_run : clean build run
valgrind: build
valgrind --leak-check=full --show-leak-kinds=all -s ./${OUTDIR}/${OUTFILE} --disable-leaks
clean:
rm -r -f build