about summary refs log tree commit diff stats
path: root/src/makefile.in
blob: e14fa843d8b65629aa4e1a93f4db5d6ec7d04ecb (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
# template-makefile for Lynx src directory

SHELL = /bin/sh

x		= @PROG_EXT@

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

# Symbols which the configure script can set in each makefile:
CC		= @CC@
CPP		= @CPP@
CFLAGS		= @CFLAGS@
DEFS		= @DEFS@
CPPFLAGS	= @CPPFLAGS@

LIBS		= @LIBS@ $(RESOLVLIB) $(WAISLIB) $(SITE_LIBS)
LDFLAGS		= @LDFLAGS@

# Symbols inherited from the top-level makefile
RESOLVLIB	= # FIXME: set in parent makefile
SITE_DEFS	= # FIXME: set in parent makefile
SITE_LIBS	= # FIXME: set in parent makefile
WAISLIB		= # FIXME: set in parent makefile

WWWINC		= WWW/Library/Implementation
WWWLIB		= ../WWW/Library/unix/libwww.a

CPP_OPTS	= $(DEFS) $(CPPFLAGS) \
		-I. \
		-I.. \
		-Ichrtrans \
		-I$(srcdir)/chrtrans \
		-I$(top_srcdir) \
		-I$(top_srcdir)/src \
		-I$(top_srcdir)/$(WWWINC) \
		$(SITE_DEFS)
CC_OPTS		= $(CPP_OPTS) $(CFLAGS)

LINT		= @LINT@
LINTOPTS	=

COMPRESS_PROG	=@COMPRESS_PROG@
COMPRESS_EXT	=@COMPRESS_EXT@

CHARTRANS_OBJS=UCdomap.o UCAux.o UCAuto.o
OBJS=  LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
LYMail.o HTAlert.o GridText.o LYGetFile.o \
LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \
LYStyle.o LYHash.o $(CHARTRANS_OBJS) @LIBOBJS@

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

all: lynx$x

.SUFFIXES : .i

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

.c.i:
@RULE_CC@
	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $*.c >$@

lynx$x:   message do_chartrans_stuff ../LYHelp.h $(OBJS) $(WWWLIB)
	@echo "Linking and creating Lynx executable"
	$(CC) $(CC_OPTS) $(LDFLAGS) -o $@  $(OBJS) $(WWWLIB) $(LIBS)
	@echo "Copying Lynx executable into top-level directory"
	cp $@ ..
	@echo "Welcome to Lynx!"

message:
	@echo "Compiling Lynx sources"

do_chartrans_stuff:
	-cd chrtrans && $(MAKE) \
		SITE_DEFS="$(SITE_DEFS)" \
		CFLAGS="$(CFLAGS)" \
		CPPFLAGS="$(CPPFLAGS)" \
		CC="$(CC)" tables

lint:
	$(LINT) $(LINTOPTS) $(CPP_OPTS) *.c  > ../lint.out

clean:
	rm -f lynx$x core *.[ob] *.bak
	cd chrtrans && $(MAKE) clean

distclean: clean

LYMain.o: ../userdefs.h
LYMainLoop.o: ../userdefs.h
LYReadCFG.o: ../userdefs.h
HTFWriter.o: ../userdefs.h
LYGetFile.o: ../userdefs.h
LYOptions.o: ../userdefs.h
LYReadCFG.o: ../userdefs.h
LYrcFile.o: ../userdefs.h
LYMail.o: ../userdefs.h
LYUtils.o: ../userdefs.h
HTInit.o: ../userdefs.h
LYTraversal.o: ../userdefs.h
LYMail.o: ../userdefs.h
LYCharSets.o: ../userdefs.h
LYShowInfo.o: ../cfg_defs.h

CHRTR= chrtrans/

TABLES= \
 $(CHRTR)cp1250_uni.h \
 $(CHRTR)cp1251_uni.h \
 $(CHRTR)cp1252_uni.h \
 $(CHRTR)cp1253_uni.h \
 $(CHRTR)cp1255_uni.h \
 $(CHRTR)cp1256_uni.h \
 $(CHRTR)cp1257_uni.h \
 $(CHRTR)cp437_uni.h \
 $(CHRTR)cp737_uni.h \
 $(CHRTR)cp775_uni.h \
 $(CHRTR)cp850_uni.h \
 $(CHRTR)cp852_uni.h \
 $(CHRTR)cp862_uni.h \
 $(CHRTR)cp864_uni.h \
 $(CHRTR)cp866_uni.h \
 $(CHRTR)cp869_uni.h \
 $(CHRTR)def7_uni.h \
 $(CHRTR)dmcs_uni.h \
 $(CHRTR)iso01_uni.h \
 $(CHRTR)iso02_uni.h \
 $(CHRTR)iso03_uni.h \
 $(CHRTR)iso04_uni.h \
 $(CHRTR)iso05_uni.h \
 $(CHRTR)iso06_uni.h \
 $(CHRTR)iso07_uni.h \
 $(CHRTR)iso08_uni.h \
 $(CHRTR)iso09_uni.h \
 $(CHRTR)iso10_uni.h \
 $(CHRTR)koi8r_uni.h \
 $(CHRTR)mac_uni.h \
 $(CHRTR)mnem_suni.h \
 $(CHRTR)mnem2_suni.h \
 $(CHRTR)next_uni.h \
 $(CHRTR)rfc_suni.h \
 $(CHRTR)utf8_uni.h \
 $(CHRTR)viscii_uni.h

CMN=../WWW/Library/Implementation/

$(TABLES):
	-cd chrtrans && $(MAKE) tables

UCdomap.o: UCdomap.c chrtrans/UCkd.h chrtrans/makeuctb chrtrans/makeuctb.c \
                 UCdomap.h $(CMN)UCMap.h $(TABLES) ../userdefs.h

UCAux.o : UCAux.c $(CMN)UCAux.h $(CMN)UCDefs.h
LYCookie.o: ../userdefs.h

depend : $(TABLES)
	makedepend -fmakefile -- $(CC_OPTS) -- $(C_SRC)

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