-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
49 lines (40 loc) · 1.08 KB
/
Makefile
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
# Usage:
# make # compile all files
# make install # install compiled binaries
# make clean # remove ALL binaries and objects
# check program dependencies
EXECUTABLES = bison flex gcc
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH")))
# begin Makefile
all: jaws fin
@echo "Done."
windows: jaws_w fin_w
@echo "Done."
jaws:
@cd jawsVM && make
fin:
@cd finCompiler && make
jaws_w:
@cd jawsVM && make windows
fin_w:
@cd finCompiler && make windows
install:
@sudo true
@echo "Installing jaws..."
@sudo cp jawsVM/jaws /usr/local/bin
@sudo chown root:root /usr/local/bin/jaws
@sudo chmod 755 /usr/local/bin/jaws
@echo "Installing finc..."
@sudo cp finCompiler/finc /usr/local/bin
@sudo chown root:root /usr/local/bin/finc
@sudo chmod 755 /usr/local/bin/finc
@echo "Installing man pages..."
@sudo mkdir -p /usr/local/share/man/man1/
@sudo cp man/jaws.1 /usr/local/share/man/man1/
@sudo cp man/finc.1 /usr/local/share/man/man1/
@echo "Done."
clean:
@cd jawsVM && make clean
@cd finCompiler && make clean
@echo "Done."