Commit | Line | Data |
---|---|---|
9e8e5516 C |
1 | ############################################################################### |
2 | # Instructions to Make, for compilation of ISODE ROSY processes | |
3 | ############################################################################### | |
4 | ||
5 | ############################################################################### | |
6 | # | |
7 | # $Header: /f/osi/rosy/RCS/Makefile,v 7.7 91/02/22 09:41:41 mrose Interim $ | |
8 | # | |
9 | # | |
10 | # $Log: Makefile,v $ | |
11 | # Revision 7.7 91/02/22 09:41:41 mrose | |
12 | # Interim 6.8 | |
13 | # | |
14 | # Revision 7.6 91/01/07 12:41:18 mrose | |
15 | # update | |
16 | # | |
17 | # Revision 7.5 90/12/23 18:42:46 mrose | |
18 | # update | |
19 | # | |
20 | # Revision 7.4 90/11/04 19:16:03 mrose | |
21 | # update | |
22 | # | |
23 | # Revision 7.3 90/07/27 08:47:32 mrose | |
24 | # update | |
25 | # | |
26 | # Revision 7.2 90/07/09 14:47:56 mrose | |
27 | # sync | |
28 | # | |
29 | # Revision 7.1 90/07/01 21:06:17 mrose | |
30 | # pepsy | |
31 | # | |
32 | # Revision 6.2 89/07/30 12:16:24 mrose | |
33 | # real | |
34 | # | |
35 | # Revision 6.1 89/07/22 16:05:53 mrose | |
36 | # bsd44 | |
37 | # | |
38 | # Revision 6.0 89/03/18 23:42:35 mrose | |
39 | # Release 5.0 | |
40 | # | |
41 | ############################################################################### | |
42 | ||
43 | ############################################################################### | |
44 | # | |
45 | # NOTICE | |
46 | # | |
47 | # Acquisition, use, and distribution of this module and related | |
48 | # materials are subject to the restrictions of a license agreement. | |
49 | # Consult the Preface in the User's Manual for the full terms of | |
50 | # this agreement. | |
51 | # | |
52 | ############################################################################### | |
53 | ||
54 | .SUFFIXES: .ry .py .c .o | |
55 | ||
56 | .ry.py:; ./xrosy $(RYFLAGS) $< | |
57 | ||
58 | ||
59 | PEPYLIBES= $(TOPDIR)psap/sprintoid.o \ | |
60 | $(TOPDIR)psap/oid_cmp.o $(TOPDIR)psap/oid_cpy.o \ | |
61 | $(TOPDIR)psap/oid_free.o \ | |
62 | $(TOPDIR)compat/asprintf.o $(TOPDIR)compat/serror.o \ | |
63 | $(TOPDIR)compat/sprintb.o $(TOPDIR)compat/sstr2arg.o | |
64 | LIBES = $(TOPDIR)libpsap.a $(TOPDIR)libcompat.a | |
65 | LLIBS = $(TOPDIR)llib-lpsap $(TOPDIR)llib-lcompat | |
66 | HFILES = $(HDIR)rosy.h $(HDIR)rosap.h $(HDIR)acsap.h $(HDIR)psap2.h \ | |
67 | $(HDIR)psap.h $(HDIR)ssap.h $(HDIR)isoaddrs.h \ | |
68 | $(HDIR)manifest.h $(HDIR)general.h $(HDIR)config.h | |
69 | PEPSYFILES= $(HDIR)pepsy.h $(TOPDIR)pepsy/xpepsy | |
70 | RYHFILES= rosy-defs.h $(HDIR)psap.h \ | |
71 | $(HDIR)manifest.h $(HDIR)general.h $(HDIR)config.h | |
72 | ||
73 | ||
74 | ################################################################## | |
75 | # Here it is... | |
76 | ################################################################## | |
77 | ||
78 | all: rosy librosy | |
79 | inst-all: inst-rosy manuals # inst-librosy | |
80 | install: inst-all clean | |
81 | lint: l-rosy l-librosy | |
82 | ||
83 | ||
84 | ################################################################## | |
85 | # rosy | |
86 | ################################################################## | |
87 | ||
88 | inst-rosy: $(BINDIR)rosy | |
89 | ||
90 | $(BINDIR)rosy: xrosy | |
91 | -cp $@ zxrosy | |
92 | -rm -f $@ | |
93 | cp xrosy $@ | |
94 | -@ls -gls $@ | |
95 | -@echo "" | |
96 | ||
97 | rosy: xrosy | |
98 | ||
99 | xrosy: rosyvrsn.o $(PEPYLIBES) | |
100 | $(LDCC) $(LDFLAGS) -o $@ rosy.o yacc.o pepsy_misc.o \ | |
101 | rosyvrsn.o $(PEPYLIBES) $(LSOCKET) -lm | |
102 | ||
103 | rosy.o: rosy.c $(RYHFILES) | |
104 | $(CC) $(CFLAGS) -c $*.c | |
105 | ||
106 | pepsy_misc.o: $(TOPDIR)pepsy/pepsy_misc.c | |
107 | $(CC) $(CFLAGS) -c $? | |
108 | ||
109 | rosyvrsn.c: rosy.o yacc.o pepsy_misc.o | |
110 | @$(UTILDIR)version.sh rosy > $@ | |
111 | ||
112 | yacc.o: yacc.c lex.c $(RYHFILES) | |
113 | $(CC) $(CFLAGS) -c $*.c | |
114 | ||
115 | yacc.c: yacc.y | |
116 | -@echo "expect 20 shift/reduce and 9 reduce/reduce conflicts" | |
117 | yacc $(YACCFLAGS) yacc.y | |
118 | mv y.tab.c $@ | |
119 | ||
120 | yacc.y: $(TOPDIR)pepy/yacc.y.gnrc | |
121 | $(UTILDIR)extract.sh ROSY < $? > $@ | |
122 | ||
123 | lex.c: lex.l | |
124 | $(LEX) $(LEXFLAGS) lex.l | |
125 | mv lex.yy.c $@ | |
126 | ||
127 | lex.l: $(TOPDIR)pepy/lex.l.gnrc | |
128 | $(UTILDIR)extract.sh ROSY < $? > $@ | |
129 | ||
130 | rosy-defs.h: $(TOPDIR)pepsy/pepsy.h.gnrc | |
131 | $(UTILDIR)extract.sh ROSY < $? > $@ | |
132 | ||
133 | l-rosy: yacc.c lex.c true | |
134 | $(LINT) $(LFLAGS) rosy.c yacc.c $(TOPDIR)pepsy/pepsy_misc.c \ | |
135 | rosyvrsn.c $(LLIBS) \ | |
136 | | grep -v "warning: possible pointer alignment problem" | |
137 | ||
138 | ||
139 | ################################################################ | |
140 | # librosy | |
141 | ################################################################ | |
142 | ||
143 | CFILES = rystub.c rydiscard.c ryoperation.c ryopinvoke.c rygenid.c \ | |
144 | rydispatch.c rydsresult.c rydserror.c rydsureject.c \ | |
145 | rywait.c ryopblock.c rydsblock.c ryfind.c rylose.c | |
146 | ||
147 | # pepsy based rosy library routines | |
148 | P-OFILES= p-rystub.o p-rydiscard.o p-ryoperation.o p-ryopinvoke.o \ | |
149 | p-rygenid.o p-rydispatch.o p-rydsresult.o p-rydserror.o \ | |
150 | p-rydsureject.o p-rywait.o p-ryopblock.o p-rydsblock.o \ | |
151 | p-ryfind.o p-rylose.o | |
152 | ||
153 | # (old) normal rosy library routines | |
154 | N-OFILES= rystub.o rydiscard.o ryoperation.o ryopinvoke.o \ | |
155 | rygenid.o rydispatch.o rydsresult.o rydserror.o \ | |
156 | rydsureject.o rywait.o ryopblock.o rydsblock.o \ | |
157 | ryfind.o rylose.o | |
158 | ||
159 | OFILES= $(P-OFILES) $(N-OFILES) $(OSTRINGS) | |
160 | ||
161 | inst-librosy: $(LIBDIR)librosy.a $(LINTDIR)llib-lrosy | |
162 | ||
163 | $(LIBDIR)librosy.a: librosy.a | |
164 | -rm -f $@ | |
165 | cp librosy.a $@ | |
166 | @$(UTILDIR)make-lib.sh $(SYSTEM) $@ -ranlib | |
167 | -@ls -gls $@ | |
168 | -@echo "" | |
169 | ||
170 | $(LINTDIR)llib-lrosy: llib-lrosy | |
171 | -cp $@ zllib-lrosy | |
172 | -rm -f $@ | |
173 | sed -e 's%#include "\(.*\)"%#include "$(INCDIR)\1"%' \ | |
174 | < llib-lrosy | \ | |
175 | sed -e 's%#include "/usr/include/\(.*\)"%#include <\1>%' > $@ | |
176 | @$(UTILDIR)inst-lint.sh $(SYSTEM) $(OPTIONS) $@ | |
177 | -@ls -gls $@ $@.ln | |
178 | -@echo "" | |
179 | ||
180 | librosy: librosy.a | |
181 | ||
182 | librosy.a: $(OFILES) | |
183 | -rm -f $@ | |
184 | @$(UTILDIR)make-lib.sh $(SYSTEM) $(ARFLAGS) $@ $(OFILES) | |
185 | -@rm -f $(TOPDIR)librosy.a $(TOPDIR)llib-lrosy | |
186 | -@$(LN) librosy.a $(TOPDIR)librosy.a | |
187 | -@$(LN) llib-lrosy $(TOPDIR)llib-lrosy | |
188 | -@ls -l $@ | |
189 | -@echo "ROSY library built normally" | |
190 | ||
191 | l-librosy: $(CFILES) true | |
192 | $(LINT) $(LFLAGS) $(CFILES) $(TOPDIR)llib-lrosap $(LLIBS) \ | |
193 | | grep -v "warning: possible pointer alignment problem" | |
194 | ||
195 | p-rydiscard.o: $(HFILES) $(PEPSYFILES) rydiscard.c | |
196 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rydiscard.c | |
197 | ||
198 | p-rygenid.o: $(HFILES) $(PEPSYFILES) rygenid.c | |
199 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rygenid.c | |
200 | ||
201 | p-rystub.o: $(HFILES) $(PEPSYFILES) rystub.c | |
202 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rystub.c | |
203 | ||
204 | p-rywait.o: $(HFILES) $(PEPSYFILES) rywait.c | |
205 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rywait.c | |
206 | ||
207 | p-ryoperation.o: $(HFILES) $(PEPSYFILES) ryoperation.c | |
208 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c ryoperation.c | |
209 | ||
210 | p-ryopinvoke.o: $(HFILES) $(PEPSYFILES) ryopinvoke.c | |
211 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c ryopinvoke.c | |
212 | ||
213 | p-rydispatch.o: $(HFILES) $(PEPSYFILES) rydispatch.c | |
214 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rydispatch.c | |
215 | ||
216 | p-rydsresult.o: $(HFILES) $(PEPSYFILES) rydsresult.c | |
217 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rydsresult.c | |
218 | ||
219 | p-rydserror.o: $(HFILES) $(PEPSYFILES) rydserror.c | |
220 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rydserror.c | |
221 | ||
222 | p-rydsureject.o: $(HFILES) $(PEPSYFILES) rydsureject.c | |
223 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rydsureject.c | |
224 | ||
225 | p-ryopblock.o: $(HFILES) $(PEPSYFILES) ryopblock.c | |
226 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c ryopblock.c | |
227 | ||
228 | p-rydsblock.o: $(HFILES) $(PEPSYFILES) rydsblock.c | |
229 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rydsblock.c | |
230 | ||
231 | p-ryfind.o: $(HFILES) $(PEPSYFILES) ryfind.c | |
232 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c ryfind.c | |
233 | ||
234 | p-rylose.o: $(HFILES) $(PEPSYFILES) rylose.c | |
235 | $(CC) $(LIBCFLAGS) -DPEPSY_VERSION=2 -o $@ -c rylose.c | |
236 | ||
237 | ||
238 | rystub.o: $(HFILES) | |
239 | rydiscard.o: $(HFILES) | |
240 | ryoperation.o: $(HFILES) | |
241 | ryopinvoke.o: $(HFILES) | |
242 | rygenid.o: $(HFILES) | |
243 | rydispatch.o: $(HFILES) | |
244 | rydsresult.o: $(HFILES) | |
245 | rydserror.o: $(HFILES) | |
246 | rydsureject.o: $(HFILES) | |
247 | rywait.o: $(HFILES) | |
248 | ryopblock.o: $(HFILES) | |
249 | rydsblock.o: $(HFILES) | |
250 | ryfind.o: $(HFILES) | |
251 | rylose.o: $(HFILES) | |
252 | ||
253 | true:; | |
254 | ||
255 | ||
256 | ################################################################ | |
257 | # manual pages | |
258 | ################################################################ | |
259 | ||
260 | MANUALS = rosy.1 # librosy.3n | |
261 | ||
262 | manuals:; @$(UTILDIR)inst-man.sh $(MANOPTS) $(MANUALS) | |
263 | -@echo "" | |
264 | ||
265 | ||
266 | ################################################################ | |
267 | # clean | |
268 | ################################################################ | |
269 | ||
270 | clean:; rm -f *.o *.a x* z* _* core rosy-defs.h yacc.y yacc.c lex.l \ | |
271 | lex.c rosyvrsn.c | |
272 | ||
273 | grind:; iprint Makefile | |
274 | tgrind -lc rosy-defs.h rosy.c rosyvrsn.c | |
275 | tgrind -ly yacc.y lex.l | |
276 | tgrind -lc $(CFILES) llib-lrosy | |
277 | @echo $(MANUALS) | \ | |
278 | tr " " "\012" | \ | |
279 | sed -e "s%.*%itroff -man &%" | \ | |
280 | sh -ve |