CS153/hw6/Makefile
jmug ee01a8f5b2 Change hw6 to an unsolved version.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-24 23:10:01 -08:00

47 lines
1.4 KiB
Makefile

SUBMIT := $(shell cat submit_zip_contents.txt)
HWNAME := hw6
TIMESTAMP := $(shell /bin/date "+%Y-%m-%d-%H:%M:%S")
ZIPNAME := $(HWNAME)-submit-$(TIMESTAMP).zip
.PHONY: all oatc test clean zip
all: oatc
oatc:
dune build bin/main.exe
@cp bin/main.exe oatc
printanalysis:
dune build bin/printanalysis.exe
@cp bin/printanalysis.exe printanalysis
test: oatc
./oatc --test
utop:
dune utop
zip: $(SUBMIT)
zip '$(ZIPNAME)' $(SUBMIT)
clean:
dune clean
rm -rf oatc ocamlbin bin/main.exe printanalysis bin/printanalysis.exe a*.out
# make experiments FILE=foo.oat
# will create four executables, one for each
oat_experiments: oatc
echo "Generating executables for $(FILE) with optimization $(OPT)"
./oatc -o a_baseline$(OPT).out --liveness trivial --regalloc none $(OPT) $(FILE) bin/runtime.c
./oatc -o a_greedy$(OPT).out --liveness dataflow --regalloc greedy $(OPT) $(FILE) bin/runtime.c
./oatc -o a_better$(OPT).out --liveness dataflow --regalloc better $(OPT) $(FILE) bin/runtime.c
./oatc -o a_clang$(OPT).out --clang $(FILE) $(OPT) bin/runtime.c
ll_experiments: oatc
echo "Generating executables for $(FILE) with optimization $(OPT)"
./oatc -o a_baseline$(OPT).out --liveness trivial --regalloc none $(OPT) $(FILE)
./oatc -o a_greedy$(OPT).out --liveness dataflow --regalloc greedy $(OPT) $(FILE)
./oatc -o a_better$(OPT).out --liveness dataflow --regalloc better $(OPT) $(FILE)
./oatc -o a_clang$(OPT).out --clang $(FILE) $(OPT)
#