-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakeFile
49 lines (36 loc) · 1.13 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
# .PHONY used to indicate a certain target is not a file
# various marcos or variables
INCULDES = -I
LIBS = -l
C = g++
CFLAGS = -g -ggdb -std=c++23 -Wall -Wextra -Wsign-conversion -Werror -Wshadow -Wenum-compare
O = main.o NumericInput.o practice.o text.o miscellany.o customTypes.o guessGame.o
H = functions.h constants.h
# you can use the del or erase keyword
RM = -del
all: main.exe
main.exe: $(O)
$(C) $(CFLAGS) -o main $(O)
main.o: main.cpp $(H) Random.h customTypes.h miscellany.h
$(C) $(CFLAGS) -c main.cpp
NumericInput.o: NumericInput.cpp $(H)
$(C) $(CFLAGS) -c NumericInput.cpp
practice.o: practice.cpp $(H)
$(C) $(CFLAGS) -c practice.cpp
text.o: text.cpp $(H)
$(C) $(CFLAGS) -c text.cpp
miscellany.o: miscellany.cpp miscellany.h customTypes.h $(H)
$(C) $(CFLAGS) -c miscellany.cpp
customTypes.o: customTypes.cpp customTypes.h includes.h Random.h
$(C) $(CXXFLAGS) -c customTypes.cpp
guessGame.o: guessGame.cpp guessGame.h Random.hpp $(H)
$(C) $(CFLAGS) -c guessGame.cpp
.cpp.o:
$(C) $(CFLAGS) -c *.cpp
.cpp:
$(C) $(CFLAGS) -o main *.cpp
subsystem:
cd game && $(MAKE)
.PHONY : clean
clean:
$(RM) *.o main.exe