-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (69 loc) · 1.76 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.PHONY: run build run-debug build-debug valgrind clean deps push
CC = g++
CFLAGS = -pthread -O2 -Wall -w -g
LDFLAGS = `sdl-config --cflags --libs` -lpthread -lSDL -lGL -lGLU -lfreetype -lSDL_ttf -lSDL_image -lSDL_mixer
INCLUDES = -I ./source/header
SRCS = ./source/source/*.cpp
MAIN = zorktrek
run: build
./source/bin/zorktrek
build: deps clean
$(CC) $(CFLAGS) $(INCLUDES) $(SRCS) -o ./source/bin/$(MAIN) $(LDFLAGS)
run-debug: build-debug
./source/debug/zorktrek
build-debug: deps clean
$(CC) $(CFLAGS) $(INCLUDES) $(SRCS) -o ./source/debug/$(MAIN) $(LDFLAGS)
valgrind: build-debug
valgrind --tool=memcheck --leak-check=full --show-reachable=yes -v --track-origins=yes ./source/debug/zorktrek
clean:
find . -iname "*~" -exec rm {} \;
- rm -f ./source/bin/$(MAIN)
- rm -f ./source/debug/$(MAIN)
deps:
sudo apt install libsdl-console \
libsdl-console-dev \
libsdl-gfx1.2-5 \
libsdl-gfx1.2-dev \
libsdl-gfx1.2-doc \
libsdl-image1.2 \
libsdl-image1.2-dev \
libsdl-kitchensink-dev \
libsdl-kitchensink1 \
libsdl-mixer1.2 \
libsdl-mixer1.2-dev \
libsdl-net1.2 \
libsdl-net1.2-dev \
libsdl-ocaml \
libsdl-ocaml-dev \
libsdl-pango-dev \
libsdl-pango1 \
libsdl-perl \
libsdl-sge \
libsdl-sge-dev \
libsdl-sound1.2 \
libsdl-sound1.2-dev \
libsdl-ttf2.0-0 \
libsdl-ttf2.0-dev \
libsdl1.2-compat \
libsdl1.2-compat-dev \
libsdl1.2-compat-shim \
libsdl1.2-compat-tests \
libsdl2-2.0-0 \
libsdl2-dev \
libsdl2-doc \
libsdl2-gfx-1.0-0 \
libsdl2-gfx-dev \
libsdl2-gfx-doc \
libsdl2-image-2.0-0 \
libsdl2-image-dev \
libsdl2-mixer-2.0-0 \
libsdl2-mixer-dev \
libsdl2-net-2.0-0 \
libsdl2-net-dev \
libsdl2-tests \
libsdl2-ttf-2.0-0 \
libsdl2-ttf-dev
push: clean
git add -A
git commit -a -m "latest"
git push -f