forked from f3270/NEAT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (44 loc) · 2.08 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
#CC=g++ -03
CC=g++
CFLAGS=-g -Wall
CPPFLAGS=-I include
all: build neat
## Compile with -pg option to profile with gprof
debug: build/neat.o build/network.o build/nnode.o build/link.o build/trait.o build/gene.o build/genome.o build/innovation.o build/organism.o build/species.o build/population.o build/experiments.o build/neatmain.o
$(CC) $(CFLAGS) $(CPPFLAGS) -pg $^ -o neat ## removed -c
####
neat: build/neat.o build/network.o build/nnode.o build/link.o build/trait.o build/gene.o build/genome.o build/innovation.o build/organism.o build/species.o build/population.o build/experiments.o build/neatmain.o
$(CC) $(CFLAGS) $(CPPFLAGS) $^ -o $@ ## removed -c
build/neat.o: src/neat.cpp include/neat.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/network.o: src/network.cpp include/network.h include/neat.h build/neat.o
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/nnode.o: src/nnode.cpp include/nnode.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/link.o: src/link.cpp include/link.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/trait.o: src/trait.cpp include/trait.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/gene.o: src/gene.cpp include/gene.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/genome.o: src/genome.cpp include/genome.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/innovation.o: src/innovation.cpp include/innovation.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/organism.o: src/organism.cpp include/organism.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/species.o: src/species.cpp include/species.h include/organism.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/population.o: src/population.cpp include/population.h include/organism.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/experiments.o: src/experiments.cpp include/experiments.h include/network.h include/species.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build/neatmain.o: src/neatmain.cpp include/neatmain.h include/neat.h include/population.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
build:
mkdir build
clean:
rm -rf build/ *~
purge:
@echo Deleting *.o, *~, ./build and ./neat
rm -rf build *~ neat