about summary refs log tree commit diff stats
path: root/makefile.in
blob: 3ee36f94991ba6f251f9cb3a112fd3bccdacb6ea (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
##makefile for lynx

SHELL = /bin/sh
@SET_MAKE@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
srcdir		= @srcdir@
VPATH		= $(srcdir)

CC		= @CC@
CPPOPTS		= @DEFS@ @CPPFLAGS@
CFLAGS		= $(CPPOPTS) @CFLAGS@

LIBS		= @LIBS@

##this is the name of the directory the lynx source code is in.
##(e.g. lynx2-7-1, not the full path)
lynxdir= lynx2-7-1

##this is the name of the directory the lynx source code is in.
##(e.g. lynx2-7, not the full path)
lynxname= lynx2-7-1

## Where you want lynx installed
bindir= @bindir@

## Where you want the lynx man file installed
mandir= @mandir@/man1

## Where you want the lynx.cfg file installed
libdir= @libdir@

installbin= @INSTALL@ -c -s -m 755
installdoc= @INSTALL@ -c -m 444

##set the relative location of the WWW library Implementation directory,
##from this directory
##do not set this to be an absolute path!!!
WWWINC= WWW/Library/Implementation

# !!!!!!!!!!! SUN resolv LIBRARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# To include resolv in the LIBS="" list for SUN 3, 4 or Solaris OS,
# point RESOLVLIB to that library.  You need this if you get the message
# "Alert!:  Unable to connect to remote host" whenever you try to
# access a host other than localhost and have made Lynx without it.
# See the PROBLEMS file for more information.
#RESOLVLIB= -lresolv

# !!!!!!!!!!! Alternate socket functions for SOCKS !!!!!!!!!!!!!!!!!!
# To make a SOCKSified lynx, include -DSOCKS in your SITE_LYDEFS and
# SITE_DEFS, below, and point SOCKSLIB to your SOCKS library.  Note
# that you may have problems accessing FTP servers.  Also, instead of
# SOCKSifying lynx for use behind a firewall, you are better off if
# you make it normally, and set it up to use a proxy server.  You can
# SOCKSify the proxy server, and it will handle all clients, not just
# Lynx (see the INSTALLATION file in this distribution).  If your SOCKS
# server was compiled to use the short version of Rbind, also include
# -DSHORTENED_RBIND in your SITE_LYDEFS and SITE_DEFS.  If you do
# SOCKSify lynx, you can turn off SOCKS proxy usage via a -nosocks
# command line switch.
#SOCKSLIB= /usr/local/lib/libsocks.a

# !!!!!!!!!!!!!  DIRECT WAIS ACCESS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# If you are adding direct wais access you must fill in the
# location of wais.a, client.a and the standard math library, libm.a.
# You can pick up the most current freeWAIS sources from
#	ftp://ftp.cnidr.org/pub/NIDR.tools/freewais
# If you are using freeWAIS-0.202 or older, include -DDECLARE_WAIS_LOGFILES
# in your SITE_DEFS.
# Plese put an ABSOLUTE address here if you want it to work!
#WAISLIB= ../../freeWAIS-0.202/bin/client.a ../../freeWAIS-0.202/bin/wais.a /usr/lib/libm.a

# !!!!!!!!!!!!! SLANG Support (For color version of Lynx). !!!!!!!!!!!!!!!!
# The slang library is an alternative to curses, developed by John E. Davis
# (davis@space.mit.edu).  Version 0.99-27 or higher is available from
#	ftp://space.mit.edu/pub/davis
# It provides color support for Lynx.

# !!!!!!!!!!!!! NCURSES Support (For color version of Lynx). !!!!!!!!!!!!!!
# If you need ncurses, the latest version can always be found
# in ftp://ftp.clark.net/pub/dickey/ncurses/  (4.1)
# or ftp://ftp.netcom.com/pub/zm/zmbenhal/ncurses/ (1.9.9g)
#
# Also be sure to check out the compilation symbols in userdefs.h
# before building Lynx!

# If you apply patches which require linking to site-specific libraries, set
# SITE_LIBS to those libraries.
SITE_LIBS= # Your libraries here

# Set SITE_LYDEFS to one or more of the defines for the WWW Library:
SITE_LYDEFS = # Your defines here

# Set SITE_DEFS to one or more of the defines for lynx below:
SITE_DEFS = # Your defines here

# defines include:
# -DARCHIVE_ONLY   (see README.configure)
# -DDIRED_SUPPORT  (see README.configure)
# -DEXP_CHARTRANS  (see README.configure)
# -DEXP_CHARTRANS_AUTOSWITCH also let lynx switch term mode(Linux console only)
# -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
# -DIGNORE_CTRL_C  Define if Control-C shouldn't exit lynx.
# -DLINKEDSTYLES   (see README.configure)
# -DLONG_LIST      (see README.configure)
# -DLY_FIND_LEAKS  (see README.configure)
# -DNCURSES        (see README.configure)
# -DNOPORT         if you must use PASV instead of PORT for FTP
# -DNO_CHANGE_EXECUTE_PERMS (see README.configure)
# -DNO_CPU_LIMIT   Disables Max CPU timeout (includes CLOCKS_PER_SECOND)
# -DNO_PARENT_DIR_REFERENCE (see README.configure)
# -DNSL_FORK       For fork-based name server lookups that can be 'z'apped.
# -DOK_GZIP        (see README.configure)
# -DOK_OVERRIDE    (see README.configure)
# -DOK_PERMIT      (see README.configure)
# -DOK_TAR         (see README.configure)
# -DOK_UUDECODE    (see README.configure)
# -DOK_ZIP         (see README.configure)
# -DSHORTENED_RBIND  For a SOCKSified lynx with the short version of Rbind.
# -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only)
# -DSOCKS          For making a SOCKSified lynx.
# -DUNDERLINE_LINKS  Define if you want links underlined instead of bold.
# -DUNPAINT_CACHE  (see README.configure)
# -DUSEHASH        (see README.configure)
# -DUSE_COLOR_STYLE (see README.configure)
# -DUSE_SLANG      (see README.configure)
# -DUSE_ZLIB       To use some functions from zlib library if you have it.
#
# if you are linking to freeWAIS-0.202 or older, you should define this
# in MCFLAGS (SITE_DEFS)
#
# -DDECLARE_WAIS_LOGFILES
#
# if you have the reverse clear screen problem of some SUN4 systems you
# should define this in MCFLAGS (SITE_DEFS)
#
# -DREVERSE_CLEAR_SCREEN_PROBLEM
#
# if you have an SVR4 system with the "type any key" problem, try defining
# this in LYFLAGS (SITE_LYDEFS) and MCFLAGS (SITE_DEFS)
#
# -DSVR4_BSDSELECT
#
# Old Data General systems may need this in their SITE_LYDEFS
# for their inet_addr(host) calls.
#
# -DDGUX_OLD
#
# if you would like logging of client requests via syslog(), you should
# define this in MCFLAGS (SITE_DEFS)
#
# -DSYSLOG_REQUESTED_URLS
#
# for installation of local execution links, please see the file userdefs.h
#
# TESTED: Linux FreeBSD SunOS Solaris IRIX CLIX HP-UX AIX SCO
all:
	cd WWW/Library/unix && $(MAKE) CC="$(CC)" \
		LYFLAGS="$(SITE_LYDEFS)"
	cd src && $(MAKE) all CC="$(CC)" \
		MCFLAGS="" \
		LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
		SITE_DEFS="$(SITE_DEFS)" \
		WWWINC=$(WWWINC) \
		WWWLIB="../WWW/Library/unix/libwww.a"

help:
	@echo
	@echo "Please run make with one of the following arguments"
	@echo "all        -- to make the executable, put it in this directory"
	@echo "clean      -- removes all '.o' and 'core' files"
	@echo "depend     -- use makedepend to generate header-dependencies"
	@echo "tar        -- runs clean, removes executable, and tars the whole directory"
	@echo "compress   -- runs tar, then compresses the result"
	@echo "zip        -- runs clean, removes executable, and zips the whole directory"
	@echo

##Miscellaneous actions
clean:
	rm -f WWW/Library/*/*.[aob]
	rm -f WWW/Library/*/.created
	cd src && $(MAKE) clean
	rm -f *.b src/lynx core Lynx.leaks

depend:
	cd WWW/Library/unix && $(MAKE) $@
	cd src && $(MAKE) $@

distclean: clean
	-rm -f WWW/Library/unix/makefile src/makefile src/chrtrans/makefile
	-rm -f WWW/Library/*/*~
	-rm -f WWW/Library/*/*.bak
	-rm -rf src/obsolete
	-cd src && $(MAKE) clean
	-cd src/chrtrans && $(MAKE) distclean
	-rm -f *~ *.bak *.sav
	-rm -f makefile lynx_cfg.h config.status config.log config.cache
	-rm -f lynx

maintainer-clean: distclean
	-rm -rf WWW/Library/*/obsolete
	-rm -f Lynx.prj .*_aux

tar:  clean
	rm -f lynx
	$(MAKE) save

turnover:	clean
	$(MAKE) save

zipcompress: compress zip
	echo "done!"

zip:  clean
	rm -f src/lynx
	rm -f lynx
	rm -f src/a.out
	rm -f ../$(lynxname).zip
	cd ..; rm -f $(lynxname).zip; zip -r $(lynxname).zip $(lynxdir)

save:
	cd ..; rm -f $(lynxname).tar; tar -cf - $(lynxdir) > $(lynxname).tar

compress: tar
	cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar

install: all
	-mv -f $(bindir)/lynx $(bindir)/lynx.old
	-mv -f $(libdir)/lynx.cfg $(libdir)/lynx.oldcfg
	$(installbin) lynx $(bindir)/lynx
	$(installdoc) lynx.man $(mandir)/lynx.1
	$(installdoc) lynx.cfg $(libdir)/lynx.cfg