-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (29 loc) · 798 Bytes
/
Makefile
File metadata and controls
41 lines (29 loc) · 798 Bytes
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
SUBMIT := backend.ml team.txt
HWNAME := hw03
ZIPNAME := $(HWNAME)-submit.zip
# Define the output directory
OUTPUT_DIR = _make_build
# Ensure the output directory exists
$(OUTPUT_DIR):
mkdir -p $(OUTPUT_DIR)
all: main.native
.PHONY: test
test: main.native $(OUTPUT_DIR)
./main.native --test
test-full: main.native $(OUTPUT_DIR)
./main.native --full-test > $(OUTPUT_DIR)/full_test_output.txt
main.native:
ocamlbuild -Is util,x86,ll,grading,sharedtests -libs unix,str main.native -use-menhir
main.byte:
ocamlbuild -Is util,x86,ll,grading,sharedtests -libs unix,str main.byte -use-menhir
.PHONY: utop repl
utop: main.byte
utop -require unix,str
repl: utop
zip: $(SUBMIT)
zip '$(ZIPNAME)' $(SUBMIT)
.PHONY: clean
clean:
ocamlbuild -clean
rm -rf output a.out
rm -rf $(OUTPUT_DIR)/*