-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (35 loc) · 1001 Bytes
/
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
PROG=Compiler
VOC=/opt/voc/bin/voc
CC=gcc
VOCPATH=/opt/voc
VOCLIBS=$(VOCPATH)/lib/libvoc-OC.a
COMPILE=$(VOC) -OC -cesF
all: $(PROG)
$(PROG): $(PROG).sym
$(CC) -fPIC -g -I $(VOCPATH)/C/include \
-o $(PROG) Parser.o Scanner.o \
SymTable.o Generator.o \
Chmod.o \
c_chmod.o \
$(PROG).o \
$(VOCLIBS)
$(PROG).sym: Mod/$(PROG).Mod Parser.sym
$(COMPILE) -m Mod/$(PROG).Mod
Parser.sym: Mod/Parser.Mod Scanner.sym SymTable.sym Generator.sym
$(COMPILE) Mod/Parser.Mod
Scanner.sym: Mod/Scanner.Mod
$(COMPILE) Mod/Scanner.Mod
Generator.sym: Mod/Generator.Mod SymTable.sym Chmod.sym
$(COMPILE) Mod/Generator.Mod
SymTable.sym: Mod/SymTable.Mod
$(COMPILE) Mod/SymTable.Mod
Chmod.sym: Mod/Chmod.Mod c_chmod.o
$(VOC) -OC -fF Mod/Chmod.Mod
c_chmod.o: Mod/c_chmod/c_chmod.c Mod/c_chmod/c_chmod.h
$(CC) -c Mod/c_chmod/c_chmod.c -o c_chmod.o
cp Mod/c_chmod/c_chmod.h .
.PHONY: run clean
run: $(PROG)
@clear; nl Test.Mod; ./$(PROG)
clean:
@rm -f *.c *.h *.o *.sym .tmp..* Test $(PROG)