about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/makefile.in
blob: 50d3389ecbb67e770dff1acdc531f1cc59671c24 (plain) (blame)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# $LynxId: makefile.in,v 1.32 2015/12/13 23:20:11 tom Exp $
# Make WWW under unix for a.n.other unix system (bsd)
# Use this as a template

# For W3 distribution, machine type for subdirectories
WWW_MACH	= Implementation
WWWINC		= $(top_srcdir)/WWW/Library/Implementation

ECHO =		@DONT_ECHO_CC@
LFLAGS =

prefix		= @prefix@
exec_prefix	= @exec_prefix@
datarootdir	= @datarootdir@
top_srcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= $(srcdir)

LYFLAGS		= # FIXME: set in parent makefile

CC		= @CC@
DEFS		= @DEFS@
EXTRA_CPPFLAGS	= @EXTRA_CPPFLAGS@
CPPFLAGS	= @CPPFLAGS@

AR		= @AR@
ARFLAGS		= @ARFLAGS@

RANLIB		= @RANLIB@

o		= .@OBJEXT@
x		= @EXEEXT@

INTLDIR_CPPFLAGS= @INTLDIR_CPPFLAGS@ -I$(top_srcdir)/intl

CPP		= @CPP@
CPPOPTS		= $(DEFS) $(LYFLAGS) \
		-I../../.. \
		-I../../../src \
		-I$(top_srcdir) \
		-I$(top_srcdir)/src \
		$(INTLDIR_CPPFLAGS) -I$(WWWINC) $(EXTRA_CPPFLAGS) $(CPPFLAGS)

LY_CFLAGS	= @CFLAGS@
CFLAGS		= $(CPPOPTS) $(LY_CFLAGS)

LINT		= @LINT@
LINTOPTS	=

CTAGS		= @CTAGS@

# Directory for installed binary:
BINDIR		= @bindir@

# Where is the W3 object library to be installed (not normally done)?
#_________________ OK if normal W3 distribution
# Where is the WWW source root?
WWW = $(top_srcdir)/WWW

#  Where should temporary (object) files go?
WTMP = ../..

# (Version.make)
VC = 2.14
#______________________________________________________________________
# (originally CommonMakefile)

#  If this env var is set to something else Some makes will use that instead
SHELL = @CONFIG_SHELL@

#	.h files are distributed but originally are made from the
#	self-documenting hypertext files.

.SUFFIXES: .h .html
.html.h:
#	- chmod +w $*.h
	www -w90 -na -to text/x-c $*.html > $*.h
#	chmod -w $*.h

# If this is actually run in a subdirectory,
#
# WWW = ../../..
# WWW = ../..	For [cernlib] build in this directory

CMN = $(WWW)/Library/Implementation/

# Where shall we put the objects and built library?

LOB = .

# Only needed if HTWAIS.c is to be compiled. Put into your Makefile.include
#  uncomment these and fill in WAISINC for adding direct wais access
#  to Lynx.
@MAKE_WAIS@HTWAIS_c = $(CMN)/HTWAIS.c
@MAKE_WAIS@HTWAIS_o = $(LOB)/HTWAIS$o
@MAKE_WAIS@WAIS = YES
#WAISINC = -I../../../../freeWAIS-0.202/ir
@MAKE_WAIS@WAISCFLAGS = -DDIRECT_WAIS
#

# add -DNEW_GATEWAY here for the new gateway config stuff
CFLAGS2 = $(CFLAGS) $(LYFLAGS) $(WAISCFLAGS) -I$(CMN) -DACCESS_AUTH

COMPILE	= $(ECHO) $(CC) $(CFLAGS2) -c

COMMON = $(LOB)/HTParse$o $(LOB)/HTAccess$o $(LOB)/HTTP$o \
	$(LOB)/HTFile$o	$(LOB)/HTBTree$o $(LOB)/HTFTP$o $(LOB)/HTTCP$o \
	$(LOB)/SGML$o $(LOB)/HTMLDTD$o $(LOB)/HTChunk$o \
	$(LOB)/HTPlain$o \
	$(LOB)/HTMLGen$o \
	$(LOB)/HTAtom$o $(LOB)/HTAnchor$o $(LOB)/HTStyle$o \
	$(LOB)/HTList$o $(LOB)/HTString$o \
	$(LOB)/HTRules$o $(LOB)/HTFormat$o  $(LOB)/HTMIME$o \
	$(LOB)/HTNews$o  $(LOB)/HTGopher$o \
	$(LOB)/HTTelnet$o $(LOB)/HTFinger$o $(LOB)/HTWSRC$o $(HTWAIS_o) \
	$(LOB)/HTAAUtil$o $(LOB)/HTAABrow$o \
	$(LOB)/HTGroup$o \
	$(LOB)/HTAAProt$o \
	$(LOB)/HTAssoc$o  $(LOB)/HTLex$o    $(LOB)/HTUU$o \
	$(LOB)/HTDOS$o

CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \
	$(CMN)HTBTree.c \
	$(CMN)HTFTP.c	$(CMN)HTTCP.c	  $(CMN)SGML.c \
	$(CMN)HTMLDTD.c \
	$(CMN)HTPlain.c	\
	$(CMN)HTMLGen.c \
	$(CMN)HTChunk.c $(CMN)HTAtom.c    $(CMN)HTAnchor.c $(CMN)HTStyle.c \
	$(CMN)HTList.c  $(CMN)HTString.c  $(CMN)HTRules.c \
	$(CMN)HTFormat.c $(CMN)HTMIME.c \
	$(CMN)HTNews.c  $(CMN)HTGopher.c  $(CMN)HTTelnet.c \
	$(CMN)HTFinger.c $(HTWAIS_c)	  $(CMN)HTWSRC.c \
	$(CMN)HTAABrow.c \
	$(CMN)HTGroup.c  \
	$(CMN)HTAAProt.c \
	$(CMN)HTAssoc.c  $(CMN)HTLex.c    $(CMN)HTUU.c

HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \
	$(CMN)HTBTree.h $(CMN)HTFTP.h $(CMN)HTTCP.h \
	$(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \
	$(CMN)HTPlain.h	\
	$(CMN)HTFWriter.h	$(CMN)HTMLGen.h \
	$(CMN)HTStream.h \
	$(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \
	$(CMN)HTList.h \
	$(CMN)HTString.h $(CMN)HTRules.h \
	$(CMN)HTFormat.h $(CMN)HTInit.h \
	$(CMN)HTMIME.h $(CMN)HTNews.h \
	$(CMN)HTGopher.h \
	$(CMN)HTUtils.h $(CMN)www_tcp.h $(CMN)HText.h \
	$(CMN)HTTelnet.h $(CMN)HTFinger.h \
	$(CMN)HTWAIS.h  $(CMN)HTWSRC.h \
	$(CMN)HTAABrow.h \
	$(CMN)HTGroup.h  \
	$(CMN)HTAAProt.h \
	$(CMN)HTAssoc.h  $(CMN)HTLex.h    $(CMN)HTUU.h

C_SRC		= $(COMMON:$o=.c)

all : $(LOB)/libwww.a

lint:
	$(LINT) $(LINTOPTS) $(CPPOPTS) $(C_SRC) 2>&1 |tee ../../../lint.libwww

.SUFFIXES: $o .i .h .html

.c$o:
	@RULE_CC@
	@ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c

.c.i:
	@RULE_CC@
	@ECHO_CC@$(CPP) -C $(CPPOPTS) $(srcdir)/$*.c >$@

depend :
	makedepend -fmakefile -- $(CFLAGS) -- $(CFILES)

#	Library
#
#  On SGI, ranlib is unnecessary and does not exist so we ignore errors
# for that step
$(LOB)/libwww.a : $(COMMON)
	$(AR) $(ARFLAGS) $(LOB)/libwww.a $(COMMON)
	-$(RANLIB) $(LOB)/libwww.a

#	Clean up everything generatable except final products
clean :
	rm -f core *.core *.leaks *.[oi] *.bak tags TAGS
	rm -f dtd_util$x
	rm -f $(LOB)/*$o

distclean : clean
	@echo made $@

tags:
	$(CTAGS) *.[ch]

#			Common code
#			-----------

$(LOB)/HTList$o : $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h
	$(COMPILE) $(CMN)HTList.c

$(LOB)/HTAnchor$o : $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h
	$(COMPILE) $(CMN)HTAnchor.c

$(LOB)/HTFormat$o : $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h
	$(COMPILE) $(CMN)HTFormat.c

$(LOB)/HTMIME$o : $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h
	$(COMPILE) $(CMN)HTMIME.c

$(LOB)/HTNews$o : $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h\
	 $(CMN)HTMLDTD.h
	$(COMPILE) $(CMN)HTNews.c

$(LOB)/HTGopher$o : $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h \
	 $(CMN)HTMLDTD.h
	$(COMPILE) $(CMN)HTGopher.c

$(LOB)/HTTelnet$o : $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h $(CMN)../../../userdefs.h
	$(COMPILE) $(CMN)HTTelnet.c

$(LOB)/HTFinger$o : $(CMN)HTFinger.c $(CMN)HTUtils.h $(CMN)HTList.h \
	$(CMN)HTMLDTD.h
	$(COMPILE) $(CMN)HTFinger.c

$(LOB)/HTStyle$o : $(CMN)HTStyle.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTStyle.c

$(LOB)/HTAtom$o : $(CMN)HTAtom.c $(CMN)HTUtils.h $(CMN)HTList.h
	$(COMPILE) $(CMN)HTAtom.c

$(LOB)/HTChunk$o : $(CMN)HTChunk.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTChunk.c

$(LOB)/HTString$o : $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make
	$(COMPILE) -DVC=\"$(VC)\" $(CMN)HTString.c

$(LOB)/HTRules$o : $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make \
	 $(CMN)HTAAProt.h
	$(COMPILE) -DVC=\"$(VC)\" $(CMN)HTRules.c

$(LOB)/SGML$o : $(CMN)SGML.c $(CMN)HTUtils.h $(CMN)UCAux.h
	$(COMPILE) $(CMN)SGML.c

$(LOB)/HTMLGen$o : $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
	$(COMPILE) $(CMN)HTMLGen.c

$(LOB)/HTMLDTD$o : $(CMN)HTMLDTD.c $(CMN)SGML.h
	$(COMPILE) $(CMN)HTMLDTD.c

$(LOB)/HTPlain$o : $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h \
	 $(CMN)UCAux.h
	$(COMPILE) $(CMN)HTPlain.c

$(LOB)/HTWAIS$o : $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h
	$(COMPILE) $(WAISINC) $(CMN)HTWAIS.c

$(LOB)/HTWSRC$o : $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h
	$(COMPILE) $(CMN)HTWSRC.c

#	Access Authorization

$(LOB)/HTAAUtil$o : $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \
	 $(CMN)HTUtils.h $(CMN)HTString.h
	$(COMPILE) $(CMN)HTAAUtil.c

$(LOB)/HTGroup$o : $(CMN)HTGroup.c $(CMN)HTGroup.h \
	 $(CMN)HTAAUtil.h \
	 $(CMN)HTAssoc.h $(CMN)HTLex.h
	$(COMPILE) $(CMN)HTGroup.c

$(LOB)/HTAABrow$o : $(CMN)HTAABrow.c $(CMN)HTAABrow.h \
	 $(CMN)HTAAUtil.h $(CMN)HTUU.h \
	 $(CMN)HTUtils.h $(CMN)HTString.h \
	 $(CMN)HTParse.h $(CMN)HTList.h \
	 $(CMN)HTAssoc.h
	$(COMPILE) $(CMN)HTAABrow.c

$(LOB)/HTAAProt$o : $(CMN)HTAAProt.c $(CMN)HTAAProt.h \
	 $(CMN)HTUtils.h $(CMN)HTAAUtil.h \
	 $(CMN)HTAssoc.h $(CMN)HTLex.h
	$(COMPILE) $(CMN)HTAAProt.c

$(LOB)/HTAssoc$o : $(CMN)HTAssoc.c $(CMN)HTAssoc.h \
	$(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTList.h
	$(COMPILE) $(CMN)HTAssoc.c

$(LOB)/HTLex$o : $(CMN)HTLex.c $(CMN)HTLex.h $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTLex.c

$(LOB)/HTUU$o : $(CMN)HTUU.c $(CMN)HTUU.h $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTUU.c


#	Communications & Files

$(LOB)/HTTP$o : $(CMN)HTTP.c $(CMN)HTUtils.h $(CMN)HTAABrow.h
	$(COMPILE) $(CMN)HTTP.c

$(LOB)/HTTCP$o : $(CMN)HTTCP.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTTCP.c

$(LOB)/HTFile$o : $(CMN)HTFile.c $(CMN)HTUtils.h \
	 $(CMN)HTMLDTD.h
	$(COMPILE) $(CMN)HTFile.c

$(LOB)/HTBTree$o : $(CMN)HTBTree.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTBTree.c

$(LOB)/HTFTP$o : $(CMN)HTFTP.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTFTP.c

$(LOB)/HTAccess$o : $(CMN)HTAccess.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTAccess.c

$(LOB)/HTParse$o : $(CMN)HTParse.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTParse.c

$(LOB)/HTVMS_WaisUI$o : $(CMN)HTVMS_WaisUI.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTVMS_WaisUI.c

$(LOB)/HTDOS$o : $(CMN)HTDOS.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)HTDOS.c

# Utilities
$(LOB)/dtd_util$o : $(CMN)dtd_util.c $(CMN)HTUtils.h
	$(COMPILE) $(CMN)dtd_util.c

DTD_UTIL = $(LOB)/dtd_util$o $(LOB)/HTMLDTD$o

sources: dtd_util$x src0_HTMLDTD.txt src1_HTMLDTD.txt
	-rm -f *_HTMLDTD.h
	./dtd_util$x -l src0_HTMLDTD.txt -s -c -o src0_HTMLDTD.h
	./dtd_util$x -l src1_HTMLDTD.txt -t -c -o src1_HTMLDTD.h
	./dtd_util$x -l src0_HTMLDTD.txt -s -h -o hdr_HTMLDTD.h

dtd_util$x: $(DTD_UTIL)
	$(CC) $(CC_OPTS) $(LDFLAGS) -o $@  $(DTD_UTIL) $(LIBS)

DIFFC	= diff -u -I LynxId
check: dtd_util$x
	@echo "** comparing builtin src0_HTMLDTD.txt"
	./dtd_util$x >HTMLDTD.log
	-$(DIFFC) src0_HTMLDTD.txt HTMLDTD.log

	@echo "** comparing reloaded src0_HTMLDTD.txt"
	./dtd_util$x -l src0_HTMLDTD.txt >HTMLDTD.log
	-$(DIFFC) src0_HTMLDTD.txt HTMLDTD.log

	@echo "** comparing header generated from builtin"
	./dtd_util$x -s -h -o HTMLDTD.log
	-$(DIFFC) hdr_HTMLDTD.h HTMLDTD.log
	./dtd_util$x -t -h -o HTMLDTD.log
	-$(DIFFC) hdr_HTMLDTD.h HTMLDTD.log

	@echo "** comparing header generated by load"
	./dtd_util$x -s -h -o HTMLDTD.log -l src0_HTMLDTD.txt
	-$(DIFFC) hdr_HTMLDTD.h HTMLDTD.log
	./dtd_util$x -t -h -o HTMLDTD.log -l src1_HTMLDTD.txt
	-$(DIFFC) hdr_HTMLDTD.h HTMLDTD.log

	@echo "** comparing strict source generated from builtin"
	./dtd_util$x -s -c -o HTMLDTD.log
	-$(DIFFC) src0_HTMLDTD.h HTMLDTD.log

	@echo "** comparing strict source generated by load"
	./dtd_util$x -s -c -o HTMLDTD.log -l src0_HTMLDTD.txt
	-$(DIFFC) src0_HTMLDTD.h HTMLDTD.log

	@echo "** comparing tagsoup source generated from builtin"
	./dtd_util$x -t -c -o HTMLDTD.log
	-$(DIFFC) src1_HTMLDTD.h HTMLDTD.log

	@echo "** comparing tagsoup source generated by load"
	./dtd_util$x -t -c -o HTMLDTD.log -l src1_HTMLDTD.txt
	-$(DIFFC) src1_HTMLDTD.h HTMLDTD.log

# DO NOT DELETE THIS LINE -- make depend depends on it.