-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (39 loc) · 1.06 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
# Create the interpreter for the gramado language.
# Usage:
# $ ./gramado -s THEME1.CNF --stats
# Created by Fred Nora.
linkTarget = gramado
Objects = main.o globals.o view.o compiler.o lexer.o parser.o tree.o
all:
# Controller
gcc -c main.c -o main.o
gcc -c globals.c -o globals.o
# View
gcc -c view/view.c -o view.o
# Model
gcc -c model/compiler.c -o compiler.o
gcc -c model/lexer.c -o lexer.o
gcc -c model/parser.c -o parser.o
gcc -c model/tree.c -o tree.o
# Link
# Create the 'gramado' executable.
gcc -Wall -o $(linkTarget) $(Objects)
# Build the final destination.
-mkdir build/
-cp ./$(linkTarget) build/
-cp ./assets/css/gramado.css build/
-cp ./assets/js/gramado.js build/
-cp ./assets/examples/THEME1.CNF build/
-cp ./assets/examples/TEST1.CNF build/
-cp ./assets/usage.txt build/
-cp ./assets/Makefile build/
rm *.o
@echo "Go to build/ folder and type make";
clean:
-rm *.o
-rm ./gramado
-rm -rf build
clean-all:
-rm *.o
-rm ./gramado
-rm -rf build