forked from MLanguage/mlang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.include
49 lines (40 loc) · 1.64 KB
/
Makefile.include
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
# Create this file to overwrite typical variables (see Makefile.config.template)
##################################################
# Variables
##################################################
SELF_DIR=$(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
-include $(SELF_DIR)/Makefile.config
define source_dir
$(shell find $(1) -name \*.m ! -name err\*.m ! -name tgv\*.m | sort) $(1)errI.m $(1)tgvI.m
endef
SOURCE_DIR_2015=$(call source_dir,$(SELF_DIR)/ir-calcul/sources2015m_4_6/)
SOURCE_DIR_2016=$(call source_dir,$(SELF_DIR)/ir-calcul/sources2016m_4_5/)
SOURCE_DIR_2017=$(call source_dir,$(SELF_DIR)/ir-calcul/sources2017m_6_10/)
SOURCE_DIR_2018=$(call source_dir,$(SELF_DIR)/ir-calcul/sources2018m_6_7/)
SOURCE_DIR_2019=$(call source_dir,$(SELF_DIR)/ir-calcul/sources2019m_8_0/)
SOURCE_DIR_2020=$(call source_dir,$(SELF_DIR)/ir-calcul/sources2020m_6_5/)
YEAR?=2020
ifeq ($(YEAR), 2018)
SOURCE_FILES?=$(SOURCE_DIR_2018)
MPP_FILE?=$(SELF_DIR)/mpp_specs/2018_6_7.mpp
TESTS_DIR?=$(SELF_DIR)/tests/2018/fuzzing/
M_SPEC_FILE?=$(SELF_DIR)/m_specs/complex_case_with_ins_outs_2018.m_spec
else ifeq ($(YEAR), 2019)
SOURCE_FILES?=$(SOURCE_DIR_2019)
MPP_FILE?=$(SELF_DIR)/mpp_specs/2019_8_0.mpp
TESTS_DIR?=$(SELF_DIR)/tests/2019/fuzzing/
M_SPEC_FILE?=m_specs/complex_case_with_ins_outs_2019.m_spec
else ifeq ($(YEAR), 2020)
SOURCE_FILES?=$(SOURCE_DIR_2020)
MPP_FILE?=$(SELF_DIR)/mpp_specs/2020_6_5.mpp
TESTS_DIR?=$(SELF_DIR)/tests/2020/fuzzing/
M_SPEC_FILE?=$(SELF_DIR)/m_specs/complex_case_with_ins_outs_2020.m_spec
else
$(error Unsupported year: $(YEAR))
endif
C_COMPILER?=clang
ifeq ($(OPTIMIZE), 1)
OPTIMIZE_FLAG=-O
else
OPTIMIZE_FLAG=
endif