-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
100 lines (72 loc) · 2.44 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
BASE=../..
include $(BASE)/Makedefs.uni
export PATH:=$(BIN):$(PATH)
U= unicon.u unigram.u unilex.u tree.u preproce.u idol.u unix.u tokens.u yyerror.u main.u cfy.u ca.u
# Don't delete unigram.u and idol.u, needed for bootstrapping
UDEL= unicon.u unilex.u tree.u preproce.u unix.u tokens.u yyerror.u main.u cfy.u ca.u
UCFILES= unicon.icn unigram.icn unilex.icn tree.icn preproce.icn idol.u unix.icn tokens.icn yyerror.icn main.icn cfy.icn ca.icn
# Files from this dir that (for now) we copy into lib/ for use by external
# programs. Long term, need to reconcile with or replace by stuff in parser/
LIBFILES= ../lib/unilex.u ../lib/tree.u
all: unicon $(WUNICONTARGET)
unicon $(UNICONEXE): $(U) $(LIBFILES)
$(ICONT) $(U)
$(CP) unicon$(EXE) $(BIN)
# A windows-specific build option
wunicon $(WUNICONEXE): $(U)
$(ICONT) -G -o wunicon$(EXE) $(U)
$(CP) wunicon$(EXE) $(BIN)
%.u: %.icn
unicon.u : unicon.icn
$(ICONT) $(UFLAGS) -c unicon
../lib/unilex.u: unilex.u
$(CP) unilex.u ../lib
unilex.u : unilex.icn ytab_h.icn
$(ICONT) $(UFLAGS) -c unilex
main.u: main.icn
$(ICONT) $(UFLAGS) -c main
../lib/tree.u: tree.u
$(CP) tree.u ../lib
tree.u : tree.icn
$(ICONT) $(UFLAGS) -c tree
tokens.u : tokens.icn ytab_h.icn
$(ICONT) $(UFLAGS) -c tokens
preproce.u : preproce.icn
$(ICONT) $(UFLAGS) -c preproce
cfy.u : cfy.icn
$(ICONT) $(UFLAGS) -c cfy
ca.u : ca.icn
$(ICONT) $(UFLAGS) -c ca
# Commented out to avoid bootstrap problem.
# Uncomment if you modify unigram.y/unigram.icn
#unigram.u: unigram.icn
# $(ICONT) -c unigram
# build iyacc, and uncomment these lines, if you change the language grammar
#unigram.icn : unigram.y ytab_h.icn
# $(IYACC) -i unigram.y
#ytab_h.icn: unigram.y
# $(IYACC) -i -d unigram.y
# mv unigram_tab.icn ytab_h.icn
# these lines were used when Idol was involved in the build process
#unigram.icn : unigram.y ytab_h.icn
# $(IYACC) -i unigram.y
# mv unigram.icn unigram.iol
# idol -c unigram.iol
#
# If you have other unicon binaries on your path (!) you might need this to say "./merr -u ./unicon".
# If you need it to run on Windows, you might have to use .\ instead of ./
#
#yyerror.icn: unigram.icn
# ./merr -u unicon
yyerror.u: yyerror.icn
$(ICONT) -c yyerror
# Uncomment if you modify idol.icn
#idol.u: idol.icn
# $(UNICON) -c idol
unix.u: unix.icn
$(ICONT) $(UFLAGS) -c unix
#
# Don't clean everything, we need some .u files for bootstrapping.
#
clean Clean:
$(RM) unicon$(EXE) wunicon$(EXE) uniclass.dir uniclass.pag uniclass.db $(UDEL)