-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
59 lines (51 loc) · 1.05 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
#
# Go parameters
#
GOCMD = go
GOBUILD = $(GOCMD) build
GOCLEAN = $(GOCMD) clean
GOTEST = $(GOCMD) test -count=1
GOGET = $(GOCMD) get
GORUN = $(GOCMD) run
# The common parameters
BINARY_NAME = eshyperneat
OUT_DIR = out
LOG_LEVEL = -1
#
# The retina experiment parameters
#
RETINA_CONTEXT_FILE = "./data/retina/es_hyper.neat.yml"
RETINA_GENOME_FILE = "./data/retina/cppn_genome.yml"
RETINA_TRIALS_COUNT = 0
RETINA_OUT_DIR = $(OUT_DIR)/retina
# The default targets to run
#
all: test
# Run retina experiment
#
execute-retina:
$(GORUN) executor.go --out $(OUT_DIR) \
--context $(RETINA_CONTEXT_FILE) \
--genome $(RETINA_GENOME_FILE) \
--experiment retina \
--trials $(RETINA_TRIALS_COUNT) \
--log-level $(LOG_LEVEL)
# Run unit tests
#
test:
$(GOTEST) -v --short ./...
# Builds binary
#
build: | $(OUT_DIR)
$(GOBUILD) -o $(OUT_DIR)/$(BINARY_NAME) -v
# Creates the output directory for build artefacts
#
$(OUT_DIR):
mkdir -p $@
#
# Clean build targets
#
clean:
$(GOCLEAN)
rm -f $(OUT_DIR)/$(BINARY_NAME)
rm -f $(OUT_DIR)/$(BINARY_UNIX)