-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile.student
46 lines (35 loc) · 1.04 KB
/
Makefile.student
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
ROOT = .
VM_ROOT = ../../..
# This flag enables -O2 optimization. Usage: make OPT=1
#OPT = 1
# This flag disables JIT dependencies (should be 0 for task #4).
NO_JIT = 1
# This flag enables SDL dependencies (should be 1 for task #4).
#WITH_SDL = 1
ifneq ($(NO_JIT), 1)
JIT_OBJ = $(OBJ)/jit$(OBJ_SUFF)
else
JIT_OBJ =
endif
USER_OBJ = \
$(JIT_OBJ) \
$(OBJ)/main$(OBJ_SUFF) \
$(OBJ)/translator_impl$(OBJ_SUFF)
USER_CFLAGS = -std=c++14
include $(VM_ROOT)/common.mk
MATHVM = $(BIN)/mvm
all: $(MATHVM)
ifeq ($(OPT), 1)
KIND = opt
else
KIND = debug
endif
test: $(MATHVM)
$(VM_ROOT)/tests/task1.py -k $(KIND) -t $(VM_ROOT)/tests/mark3/
$(VM_ROOT)/tests/task1.py -k $(KIND) -t $(VM_ROOT)/tests/mark4/
$(VM_ROOT)/tests/task1.py -k $(KIND) -t $(VM_ROOT)/tests/mark5/
#$(VM_ROOT)/tests/task3.py -k $(KIND) -t $(VM_ROOT)/tests/mark3/
#$(VM_ROOT)/tests/task3.py -k $(KIND) -t $(VM_ROOT)/tests/mark4/
#$(VM_ROOT)/tests/task3.py -k $(KIND) -t $(VM_ROOT)/tests/mark5/
$(MATHVM): $(OUT) $(MATHVM_OBJ) $(USER_OBJ)
$(CXX) -o $@ $(MATHVM_OBJ) $(USER_OBJ) $(LIBS)