2 |
7u83 |
1 |
|
19 |
7u83 |
2 |
include ../../../defs.mk
|
41 |
7u83 |
3 |
#include ../../../Makefile.defs
|
19 |
7u83 |
4 |
|
|
|
5 |
SRC6=./syntax
|
|
|
6 |
SRC1=../common
|
2 |
7u83 |
7 |
SRC2=${SRC1}/obj_c
|
|
|
8 |
SRC2A=${SRC1}/obj_tok
|
|
|
9 |
SRC2B=${SRC1}/obj_templ
|
|
|
10 |
SRC3=${SRC1}/construct
|
|
|
11 |
SRC4=${SRC1}/output
|
|
|
12 |
SRC5=${SRC1}/parse
|
|
|
13 |
SRC7=${SRC1}/utility
|
19 |
7u83 |
14 |
SPEC=../../lib/tdf/def_4_1.db
|
2 |
7u83 |
15 |
|
|
|
16 |
# Standard variables
|
|
|
17 |
|
6 |
7u83 |
18 |
TCCOPTS= -Yposix1 -Xs
|
|
|
19 |
CCOPTS= ${TCCOPTS} -I${SRC1} -I${SRC2} -I${SRC3} -I${SRC4} -I${SRC5}\
|
|
|
20 |
-I${SRC6} -I${SRC7}
|
2 |
7u83 |
21 |
LIBS=
|
19 |
7u83 |
22 |
CFLAGS= -I${SRC1} -I${SRC2} -I${SRC3} -I${SRC4} -I${SRC5} -I${SRC6} -I${SRC7}
|
2 |
7u83 |
23 |
|
|
|
24 |
# Dependencies and construction rules
|
|
|
25 |
|
6 |
7u83 |
26 |
PROG= tdfc2
|
2 |
7u83 |
27 |
|
19 |
7u83 |
28 |
OBJS= access.o allocate.o assign.o basetype.o buffer.o c_class.o capsule.o\
|
6 |
7u83 |
29 |
cast.o catalog.o char.o check.o chktype.o class.o compile.o\
|
|
|
30 |
constant.o construct.o convert.o copy.o debug.o declare.o decode.o\
|
|
|
31 |
derive.o destroy.o diag.o diag2.o dump.o encode.o error.o exception.o\
|
|
|
32 |
exp.o expression.o file.o function.o hash.o identifier.o init.o\
|
|
|
33 |
initialise.o instance.o inttype.o label.o lex.o literal.o load.o\
|
|
|
34 |
macro.o main.o mangle.o member.o merge.o namespace.o operator.o\
|
|
|
35 |
option.o overload.o parse.o pragma.o predict.o preproc.o print.o\
|
|
|
36 |
printf.o psyntax1.o psyntax2.o psyntax3.o quality.o redeclare.o\
|
|
|
37 |
rewrite.o save.o shape.o statement.o stmt.o struct.o syntax1.o\
|
|
|
38 |
syntax2.o syntax3.o system.o table.o template.o throw.o tok.o tokdef.o\
|
|
|
39 |
token.o typeid.o unmangle.o variable.o virtual.o xalloc.o
|
2 |
7u83 |
40 |
|
6 |
7u83 |
41 |
.PATH: ${SRC1} ${SRC2} ${SRC2A} ${SRC2B} ${SRC3} ${SRC4} ${SRC5} ${SRC6}\
|
|
|
42 |
${SRC7}
|
2 |
7u83 |
43 |
|
60 |
7u83 |
44 |
$(PROG): $(OBJS)
|
|
|
45 |
$(CC) -o $(PROG) $(LDFLAGS) $(OBJS)
|
|
|
46 |
|
19 |
7u83 |
47 |
.c.o:
|
|
|
48 |
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
install: $(PROG)
|
|
|
52 |
install -d $(INSTALL_BINDIR)
|
|
|
53 |
install $(PROG) $(INSTALL_BINDIR)/$(PROG)
|
|
|
54 |
|
|
|
55 |
clean:
|
|
|
56 |
rm -f $(OBJS)
|
|
|
57 |
rm -f $(PROG)
|
|
|
58 |
|
|
|
59 |
depend:
|
|
|
60 |
mkdep $(CFLAGS) ${SRC1}/*.c ${SRC2}/*.c ${SRC3}/*.c ${SRC4}/*.c ${SRC5}/*.c ${SRC6}/*.c ${SRC7}/*.c
|
|
|
61 |
|
|
|
62 |
|
60 |
7u83 |
63 |
#-include .depend
|
19 |
7u83 |
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
6 |
7u83 |
68 |
#CAT=cat
|
|
|
69 |
#CALCULUS=calculus
|
|
|
70 |
#MAKE_ERR=make_err
|
|
|
71 |
#MAKE_TDF=make_tdf
|
|
|
72 |
#SID=sid
|
|
|
73 |
#SIDOPTS=-l ossg-c -s numeric -s split -s no-lines
|
|
|
74 |
#
|
|
|
75 |
#ALG=${SRC1}/c_class.alg
|
|
|
76 |
#TEMPL=${SRC2B}/bits.h ${SRC2B}/err_ext.h ${SRC2B}/loc_ext.h
|
|
|
77 |
#SYNTAX=${SRC6}/syntax.sid ${SRC6}/syntax.act
|
|
|
78 |
#PSYNTAX=${SRC5}/psyntax.sid ${SRC5}/psyntax.act
|
|
|
79 |
#
|
|
|
80 |
#SID_OUT=${SRC6}/syntax1.c ${SRC6}/syntax.h
|
|
|
81 |
#PSID_OUT=${SRC5}/psyntax1.c ${SRC5}/psyntax.h
|
|
|
82 |
#C_OUT=${SRC2}/c_class.h
|
|
|
83 |
#TOK_OUT=${SRC2A}/c_class.h
|
|
|
84 |
#ERR_OUT=${SRC7}/errors1.h ${SRC7}/errors2.h ${SRC7}/errors3.h ${SRC7}/opts.h
|
|
|
85 |
#TDF_OUT=${SRC4}/tdf1.h
|
|
|
86 |
#
|
|
|
87 |
#ALL_OUT=${SID_OUT} ${PSID_OUT} ${C_OUT} ${TOK_OUT} ${ERR_OUT} ${TDF_OUT}
|
|
|
88 |
#
|
|
|
89 |
#auto : ${ALL_OUT}
|
|
|
90 |
#
|
|
|
91 |
#${SRC6}/syntax1.c : ${SYNTAX}
|
|
|
92 |
# ${SID} ${SIDOPTS} ${SYNTAX} ${SRC6}/syntax@.c ${SRC6}/syntax.h
|
|
|
93 |
#
|
|
|
94 |
#${SRC5}/psyntax1.c : ${PSYNTAX}
|
|
|
95 |
# ${SID} ${SIDOPTS} ${PSYNTAX} ${SRC5}/psyntax@.c ${SRC5}/psyntax.h
|
|
|
96 |
#
|
|
|
97 |
#${SRC2}/c_class.h : ${ALG} ${TEMPL}
|
|
|
98 |
# @${REMOVE} ${SRC2}/*.h
|
|
|
99 |
# ${CALCULUS} -a -x ${ALG} ${SRC2}
|
|
|
100 |
# ${CALCULUS} ${ALG} -T${SRC2B}/bits.h ${SRC2}/bits.h
|
|
|
101 |
# ${CALCULUS} ${ALG} -T${SRC2B}/err_ext.h ${SRC2}/err_ext.h
|
|
|
102 |
# ${CALCULUS} ${ALG} -T${SRC2B}/loc_ext.h ${SRC2}/loc_ext.h
|
|
|
103 |
#
|
|
|
104 |
#${SRC2A}/c_class.h : ${ALG} ${TEMPL}
|
|
|
105 |
# @${REMOVE} ${SRC2A}/*.h
|
|
|
106 |
# ${CALCULUS} -a -x -t ${ALG} ${SRC2A}
|
|
|
107 |
# ${CALCULUS} -t ${ALG} -T${SRC2B}/bits.h ${SRC2A}/bits.h
|
|
|
108 |
# ${CALCULUS} -t ${ALG} -T${SRC2B}/err_ext.h ${SRC2A}/err_ext.h
|
|
|
109 |
# ${CALCULUS} -t ${ALG} -T${SRC2B}/loc_ext.h ${SRC2A}/loc_ext.h
|
|
|
110 |
#
|
|
|
111 |
#${SRC7}/errors1.h : ${SRC7}/catalog.err
|
|
|
112 |
# @${REMOVE} ${SRC7}/errors1.h
|
|
|
113 |
# ${MAKE_ERR} ${SRC7}/catalog.err ${SRC7}/errors1.h
|
|
|
114 |
#
|
|
|
115 |
#${SRC7}/errors2.h : ${SRC7}/catalog.err ${SRC7}/extra.err
|
|
|
116 |
# @${REMOVE} ${SRC7}/errors2.h
|
|
|
117 |
# ${CAT} ${SRC7}/catalog.err ${SRC7}/extra.err | ${MAKE_ERR} > ${SRC7}/errors2.h
|
|
|
118 |
#
|
|
|
119 |
#${SRC7}/errors3.h : ${SRC7}/catalog.err ${SRC7}/extra.err
|
|
|
120 |
# @${REMOVE} ${SRC7}/errors3.h
|
|
|
121 |
# ${CAT} ${SRC7}/catalog.err ${SRC7}/extra.err | ${MAKE_ERR} -d > ${SRC7}/errors3.h
|
|
|
122 |
#
|
|
|
123 |
#${SRC7}/opts.h : ${SRC7}/catalog.err
|
|
|
124 |
# @${REMOVE} ${SRC7}/opts.h
|
|
|
125 |
# ${MAKE_ERR} -u ${SRC7}/catalog.err ${SRC7}/opts.h
|
|
|
126 |
#
|
|
|
127 |
#${SRC4}/tdf1.h : ${SPEC} ${SRC2B}/tdf1.h
|
|
|
128 |
# @${REMOVE} ${SRC4}/tdf1.h
|
|
|
129 |
# ${MAKE_TDF} ${SPEC} ${SRC2B}/tdf1.h ${SRC4}/tdf1.h
|
|
|
130 |
#
|
|
|
131 |
#auto_clobber :
|
|
|
132 |
# @${REMOVE} ${SRC6}/syntax*.c ${SRC6}/syntax.h
|
|
|
133 |
# @${REMOVE} ${SRC5}/psyntax*.c ${SRC5}/psyntax.h
|
|
|
134 |
# @${REMOVE} ${SRC2}/*.h
|
|
|
135 |
# @${REMOVE} ${SRC2A}/*.h
|
|
|
136 |
# @${REMOVE} ${ERR_OUT}
|
|
|
137 |
# @${REMOVE} ${TDF_OUT}
|
2 |
7u83 |
138 |
|