aboutsummaryrefslogtreecommitdiff
blob: e60aa8d6ee9e82c433587d722b84d10d17b22cb2 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
## Makefile Parameters #########################################################
LEVEL_FILES ?= $(wildcard ${CURDIR}/data/level/*.lvl)
ALL_PROPERTY_FILES ?= $(wildcard ${CURDIR}/data/property/*.pro)
#PROPERTY_FILES ?= $(wildcard ${CURDIR}/data/property/*.pro)
PROPERTY_FILES ?= $(wildcard ${CURDIR}/data/property/test.pro)
AST_FILE ?= ${CURDIR}/data/ast/best_chronometer_ever.xml
TEMPLATE_DIR ?= ${CURDIR}/data/template/
#AST_FILE = ${CURDIR}/data/ast/pong.xml
NICE_MESSAGE ?=

TMP_DIR ?= /tmp/tabellion
DEPENDENCIES_DIR ?= $(TMP_DIR)/deps
MODEL_DIR ?= $(TMP_DIR)/mod
MODEL_INSTANCES_DIR ?= $(MODEL_DIR)/instance
MODEL_INFERRED_DIR ?= $(MODEL_DIR)/inferred
SOL_DIR ?= $(TMP_DIR)/sol

## Sub-programs ################################################################
AST_TO_INSTR ?= ast-to-instr
INST_CALC ?= instance-calculator
SOLVER ?= instr-to-kodkod
PRETTY_PRINTER ?= sol-pretty-printer

export

################################################################################
ALL_DIRS = \
	$(TMP_DIR) \
	$(DEPENDENCIES_DIR) \
	$(MODEL_DIR) \
	$(MODEL_INSTANCES_DIR) \
	$(MODEL_INFERED_DIR) \
	$(SOL_DIR)

all: $(ALL_DIRS)
	$(MAKE) compile
	$(MAKE) model
	$(MAKE) solutions

compile:
	$(MAKE) -C $(AST_TO_INSTR) compile
	$(MAKE) -C $(INST_CALC) compile
	$(MAKE) -C $(SOLVER) compile
	$(MAKE) -C $(PRETTY_PRINTER) compile

model:
	$(MAKE) -C $(AST_TO_INSTR) model
	$(MAKE) -C $(INST_CALC) model
	$(MAKE) -C $(SOLVER) model
	$(MAKE) -C $(PRETTY_PRINTER) model

solutions: $(TMP_DIR) $(MODEL_DIR) $(SOL_DIR)
	$(MAKE) -C $(AST_TO_INSTR) solutions
	$(MAKE) -C $(INST_CALC) solutions
	$(MAKE) -C $(SOLVER) solutions
	$(MAKE) -C $(PRETTY_PRINTER) solutions

clean:
	$(MAKE) -C $(AST_TO_INSTR) clean
	$(MAKE) -C $(INST_CALC) clean
	$(MAKE) -C $(SOLVER) clean
	$(MAKE) -C $(PRETTY_PRINTER) clean

clean_model:
	$(MAKE) -C $(AST_TO_INSTR) clean_model
	$(MAKE) -C $(INST_CALC) clean_model
	$(MAKE) -C $(SOLVER) clean_model
	$(MAKE) -C $(PRETTY_PRINTER) clean_model

clean_solutions:
	$(MAKE) -C $(AST_TO_INSTR) clean_solutions
	$(MAKE) -C $(INST_CALC) clean_solutions
	$(MAKE) -C $(SOLVER) clean_solutions
	$(MAKE) -C $(PRETTY_PRINTER) clean_solutions

$(ALL_DIRS):
	mkdir -p $@