-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 807 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 807 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
.PHONY: run-compiler run-interpreter
SMLC=mlton
SMLCARGS=-codegen native
SMLI=smlnj
SMLIARGS=
SRCS=intrp.sml
CFLAGS=-Ofast -march=native -mtune=native
clean:
rm intrp
intrp: intrp.sml
$(SMLC) $(SMLCARGS) intrp.sml
# .PHONY: interpret-mandelbrot
# interpret-mandelbrot:
# $(SMLI) $(SMLARGS) intrp.sml mandelbrot.bf
.PHONY: intrp-mandelbrot
intrp-mandelbrot: intrp
$(SMLI) $(SMLARGS) intrp.sml -i mandelbrot.bf
# Compiles and runs the mandelbrot program
.PHONY: compile-mandelbrot
compile-mandelbrot: intrp
./intrp -c mandelbrot.bf > mandelbrot.c
$(CC) $(CFLAGS) mandelbrot.c -o mandelbrot
# Compiles a brainfuck compiler written in brainfuck
# and runs the hello world program on that
.PHONY: dbfi
dbfi: intrp
./intrp -c dbfi.b > dbfi.c
$(CC) $(CFLAGS) dbfi.c -o dbfi
./dbfi < bitwidth.b