-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (27 loc) · 776 Bytes
/
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
CC=g++
CFLAGS=-std=c++11 -Wall -Wextra -Isrc/ -Itest/
LDFLAGS=
all: CFLAGS += -O2
all: bin/ensolement
debug: CFLAGS += -g -DENSOLEMENT_VERBOSE
debug: bin/ensolement
test: CFLAGS += -g
test: bin/test
bin/test: build/mainTest.o build/test.o build/ensolement.o build/parseur.o
$(CC) -o $@ $^ $(LDFLAGS)
bin/ensolement: build/main.o build/ensolement.o build/parseur.o
$(CC) -o $@ $^ $(LDFLAGS)
build/ensolement.o: src/ensolement.cpp
$(CC) -o $@ -c $< $(CFLAGS)
build/parseur.o: src/configuration/parseur.cpp
$(CC) -o $@ -c $< $(CFLAGS)
build/test.o: test/test.cpp
$(CC) -o $@ -c $< $(CFLAGS)
build/main.o: src/main.cpp
$(CC) -o $@ -c $< $(CFLAGS)
build/mainTest.o: test/main.cpp
$(CC) -o $@ -c $< $(CFLAGS)
clean:
rm -rf build/*
cleanAll: clean
rm -rf bin/*