-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (58 loc) · 1.83 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
OJBS = main.o menu.o utilities.o map.o character.o space.o \
emptySpace.o wallSpace.o keySpace.o doorSpace.o exitSpace.o \
characterSpace.o player.o gamePlay.o
CC = g++
CFLAGS = -c -std=c++0x -Wall
LFLAGS = -g -std=c++0x -Wall -o
game.o: $(OJBS)
@echo '[BUILDING] ... game'
@$(CC) $(LFLAGS) game $(OJBS)
@echo '[DONE] ... Program output as: game'
main.o: main.cpp
@echo '[BUILDING] ... main'
@$(CC) $(CFLAGS) main.cpp
menu.o: utils/menu.cpp
@echo '[BUILDING] ... menu'
@$(CC) $(CFLAGS) utils/menu.cpp
utilities.o: utils/utilities.cpp
@echo '[BUILDING] ... utilities'
@$(CC) $(CFLAGS) utils/utilities.cpp
map.o: maps/map.cpp
@echo '[BUILDING] ... map'
@$(CC) $(CFLAGS) maps/map.cpp
character.o: character/character.cpp
@echo '[BUILDING] ... character'
@$(CC) $(CFLAGS) character/character.cpp
space.o: space/space.cpp
@echo '[BUILDING] ... space'
@$(CC) $(CFLAGS) space/space.cpp
emptySpace.o: space/emptySpace.cpp
@echo '[BUILDING] ... emptySpace'
@$(CC) $(CFLAGS) space/emptySpace.cpp
wallSpace.o: space/wallSpace.cpp
@echo '[BUILDING] ... wallSpace'
@$(CC) $(CFLAGS) space/wallSpace.cpp
keySpace.o: space/keySpace.cpp
@echo '[BUILDING] ... keySpace'
@$(CC) $(CFLAGS) space/keySpace.cpp
doorSpace.o: space/doorSpace.cpp
@echo '[BUILDING] ... doorSpace'
@$(CC) $(CFLAGS) space/doorSpace.cpp
characterSpace.o: space/characterSpace.cpp
@echo '[BUILDING] ... characterSpace'
@$(CC) $(CFLAGS) space/characterSpace.cpp
exitSpace.o: space/exitSpace.cpp
@echo '[BUILDING] ... exitSpace'
@$(CC) $(CFLAGS) space/exitSpace.cpp
player.o: character/player.cpp
@echo '[BUILDING] ... player'
@$(CC) $(CFLAGS) character/player.cpp
gamePlay.o: gamePlay.cpp
@echo '[BUILDING] ... gamePlay'
@$(CC) $(CFLAGS) gamePlay.cpp
clean:
@echo '[CLEANING] ... removing .o files'
@rm *.o
.PHONY: valgrind
valgrind:
valgrind --tool=memcheck game