-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile
43 lines (28 loc) · 1.38 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
CC = g++
CFLAGS = -Wall
ALLEG = -Iallegro5/ -lallegro -lallegro_primitives -lallegro_font -lallegro_ttf
BIN = bin
BUILD = build
CONF = conf
SRC = src
TEST = test
CONF_FILES = $(CONF)/AI_params.h $(CONF)/display_params.h $(CONF)/field_params.h
.PHONY: all clean
all: $(BIN)/main #$(BIN)/test_maneuver $(BIN)/test_shapes $(BIN)/test_movements $(BIN)/test_collision
# Object files
$(BUILD)/%.o: $(SRC)/%.cpp $(CONF_FILES)
$(CC) $(CFLAGS) $(DEBUG) -I$(CONF) -c -o $@ $<
# Executables
$(BIN)/main: $(BUILD)/main.o $(BUILD)/maneuver.o $(BUILD)/display.o $(BUILD)/keyboard.o $(BUILD)/vehicle.o $(BUILD)/map.o $(BUILD)/maps.o $(BUILD)/shapes.o $(BUILD)/Q_learning_network.o $(BUILD)/util.o
$(CC) -o $@ $^ $(ALLEG)
$(BIN)/test_maneuver: $(BUILD)/test_maneuver.o $(BUILD)/maneuver.o $(BUILD)/util.o
$(CC) -o $@ $^ $(ALLEG)
$(BIN)/test_shapes: $(BUILD)/test_shapes.o $(BUILD)/shapes.o $(BUILD)/util.o
$(CC) -o $@ $^ $(ALLEG)
$(BIN)/test_collision: $(BUILD)/test_collision.o $(BUILD)/maneuver.o $(BUILD)/display.o $(BUILD)/vehicle.o $(BUILD)/map.o $(BUILD)/Q_learning_network.o $(BUILD)/shapes.o $(BUILD)/util.o
$(CC) -o $@ $^ $(ALLEG)
$(BIN)/test_movements: $(BUILD)/test_movements.o $(BUILD)/maneuver.o $(BUILD)/display.o $(BUILD)/vehicle.o $(BUILD)/map.o $(BUILD)/maps.o $(BUILD)/Q_learning_network.o $(BUILD)/shapes.o $(BUILD)/util.o
$(CC) -o $@ $^ $(ALLEG)
clean:
rm -f bin/*
rm -f build/*