-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 795 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 795 Bytes
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
CXX = g++
LD = g++
#CXXFLAGS = -std=c++17 -Wall -pedantic -Wno-long-long -O2 -Werror -Isrc/engine -Isrc/screen -Isrc/character -Isrc/file
CXXFLAGS = -std=c++17 -Wall -pedantic -Wno-long-long -g -Werror -Isrc/engine -Isrc/screen -Isrc/character -Isrc/file # For debugging
all: compile
compile: main.o Engine.o Window.o Object.o Text.o Character.o Ant.o FAnthill.o EAnthill.o Obstacle.o File.o MapFile.o SaveFile.o
$(LD) $(CXXFLAGS) -o antwars $^ -lSDL2 -lSDL2_ttf
%.o: src/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
%.o: src/engine/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
%.o: src/screen/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
%.o: src/character/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
%.o: src/file/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean:
rm -rf *.o antwars
run:
./antwars examples/map01