File: Makefile

package info (click to toggle)
ifmail 2.14tx8.10-32
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,056 kB
  • sloc: ansic: 30,328; perl: 4,955; yacc: 839; makefile: 716; sh: 424; cpp: 235; lex: 206; awk: 24
file content (251 lines) | stat: -rw-r--r-- 10,563 bytes parent folder | download
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
# Makefile for ifcico FidoNet mailer
# Copyright (c) 1993-1997 by Eugene G. Crosser

INCDIR = ../iflib

include ../CONFIG

# Include -DNOISEDEBUG to emulate noisy line. If defined, -jNNN option
# causes approximately every NNNth received character to be damaged.
#DEFINES = ${OPTS} -DNOISEDEBUG
DEFINES = -DCICOLOG=${CICOLOG} \
		-DMAILLOG=${MAILLOG} \
		${OPTS}

OBJCICO = version.o ifcico.o nodelist.o flagexp.o call.o callall.o answer.o \
		modemstr.o openport.o opentcp.o dial.o session.o \
		chat.o ttyio.o emsi.o ftsc.o yoohoo.o \
		filelist.o xmsend.o xmrecv.o sendbark.o recvbark.o \
		filetime.o m7recv.o m7send.o respfreq.o \
		rdoptions.o emsidat.o wazoo.o janus.o hydra.o \
		zmsend.o zmrecv.o zmmisc.o zmrle.o \
		tcp.o tcpproto.o binkp.o \
		openfile.o ftscprod.o dietifna.o \
		nlindex.o openterm.o Txy.o
OBJINDEX = version.o ifindex.o nodebld.o nlindex.o
OBJINFO = version.o ifinfo.o nodelist.o nlindex.o
OBJPATCH = version.o nlpatch.o
OBJREQ = version.o ifreq.o #nodelist.o nlindex.o
OBJROUTE = version.o ifroute.o mxlookup.o nodelist.o nlindex.o
OBJLOOKUP= version.o nlookup.o nodelist.o nlindex.o
SRCS = lastmtime.c ifcico.c nodelist.c call.c callall.c answer.c \
		modemstr.c openport.c opentcp.c dial.c session.c \
		chat.c ttyio.c emsi.c ftsc.c yoohoo.c \
		filelist.c xmsend.c xmrecv.c sendbark.c recvbark.c \
		filetime.c m7recv.c m7send.c respfreq.c \
		rdoptions.c emsidat.c wazoo.c janus.c hydra.c \
		zmsend.c zmrecv.c zmmisc.c zmrle.c \
		tcp.c tcpproto.c binkp.c \
		openfile.c dietifna.c openterm.c \
		nlindex.c nodebld.c ifindex.c ifroute.c mxlookup.c \
		nlpatch.c Txy.c nlookup.c ifinfo.c ifreq.c
HDRS = nodelist.h statetbl.h session.h ttyio.h emsi.h zmodem.h \
		ftscprod.h nlindex.h janus.h hydra.h binkp.h fsm.h Txy.h
OTHER = README README.mxlookup README.TELNET Makefile \
		flaglex.l flagexp.y fta-1005.txt hydra.LICENSE.DOC \
		ftscprod.090 mkprod.awk \
		ifcico.8 ifcico.8.fr ifindex.8 ifinfo.8 ifroute.8 nlpatch.8 \
		ifreq.8
ALL = ifcico ifindex ifinfo ifreq nlpatch nlookup #ifroute

ifeq (yes,${SHARED})
UTLIB =
OBJCICO   += ../iflib/libifmail.so.${SHVER}
OBJINDEX  += ../iflib/libifmail.so.${SHVER}
OBJROUTE  += ../iflib/libifmail.so.${SHVER}
OBJPATCH  += ../iflib/libifmail.so.${SHVER}
OBJLOOKUP += ../iflib/libifmail.so.${SHVER}
LIBS += -L ../iflib -lifmail
else
UTLIB = ../iflib/utlib.a
endif
LIBS += -lfl

.c.o:
	${CC} -c ${CFLAGS} ${INCLUDES} ${DEFINES} $<

all:	${ALL}

ftscprod.c:	ftscprod.???
	${AWK} -F, -f mkprod.awk ftscprod.??? >ftscprod.c

flagexp.c:	flagexp.y
	${YACC} flagexp.y
	mv y.tab.c flagexp.c

flaglex.c:	flaglex.l
	${LEX} flaglex.l
	mv lex.yy.c flaglex.c

zmvars.h:	mkvars.c zmvars.def
	${CPP} mkvars.c >zmvars.h

zmvars.c:	mkvars.c zmvars.def
	${CPP} -DMAKE_C mkvars.c >zmvars.c

flagexp.o:	flaglex.c flagexp.c

flaglex.o:	flaglex.c flagexp.c

install: all
	${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${SMODE} ifcico ${BINDIR}/ifcico
	${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifindex ${BINDIR}/ifindex
	${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifinfo ${BINDIR}/ifinfo
	${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifreq ${BINDIR}/ifreq
	${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifroute ${BINDIR}/ifroute
	${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} nlpatch ${BINDIR}/nlpatch
	${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} nlookup ${BINDIR}/nlookup

tryc:	ifcico
	>/var/log/ifmail/ifdebug
	./ifcico -xjnors -I../misc/config -alocalhost f230.n5020

tryp:	nlpatch
	>/var/log/ifmail/ifdebug
	cd /var/spool/ifmail/nl.d;\
	/usr/lib/ifmail/nlpatch -xtu z2-list.266 z2-diff.273

lc:
	wc -l ${SRCS} ${HDRS} ${OTHER}

clean:
	rm -f *.o flaglex.c flagexp.c ftscprod.c core ${ALL} lastmtime \
	iflog ifdebug filelist version.c Makefile.bak

ifcico:	${OBJCICO} ${UTLIB}
	${CC} ${LDFLAGS} ${OBJCICO} ${UTLIB} -o ifcico ${LIBS}

ifindex: ${OBJINDEX} ${UTLIB}
	${CC} ${LDFLAGS} ${OBJINDEX} ${UTLIB} -o ifindex ${LIBS}

ifinfo: ${OBJINFO} ${UTLIB}
	${CC} ${LDFLAGS} ${OBJINFO} ${UTLIB} -o ifinfo ${LIBS}

ifreq: ${OBJREQ} ${UTLIB}
	${CC} ${LDFLAGS} ${OBJREQ} ${UTLIB} -o ifreq ${LIBS}

ifroute: ${OBJROUTE} ${UTLIB}
	${CC} ${LDFLAGS} ${OBJROUTE} ${UTLIB} -o ifroute ${LIBS}

nlpatch: ${OBJPATCH} ${UTLIB}
	${CC} ${LDFLAGS} ${OBJPATCH} ${UTLIB} -o nlpatch ${LIBS}

nlookup: ${OBJLOOKUP} ${UTLIB}
	${CC} ${LDFLAGS} ${OBJLOOKUP} ${UTLIB} -o nlookup ${LIBS}

lastmtime: lastmtime.c
	${CC} ${LDFLAGS} ${CFLAGS} lastmtime.c -o lastmtime

tar:	ifcico.tar.z

ifcico.tar.z: ${SRCS} ${HDRS} ${OTHER}
	${TAR} cf - ${SRCS} ${HDRS} ${OTHER} | \
	gzip >$@

filelist:	Makefile
	BASE=`pwd`; \
	BASE=`basename $${BASE}`; \
	(for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ifmail/$${BASE}/$$f; done) \
	>filelist

man:	man.lang
	${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifcico.8 ${MANDIR}/man8/ifcico.8
	${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifindex.8 ${MANDIR}/man8/ifindex.8
	${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifinfo.8 ${MANDIR}/man8/ifinfo.8
	${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifreq.8 ${MANDIR}/man8/ifreq.8
	${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifroute.8 ${MANDIR}/man8/ifroute.8
	${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} nlpatch.8 ${MANDIR}/man8/nlpatch.8

man.lang:
	if [ "${LANG}" != "" ]; then \
	case "${LANG}" in \
		fr*) ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifcico.8.fr ${MANDIR}/fr/man8/ifcico.8 ;; \
	esac ; fi

config:
	test -f config

version.c:	${SRCS} ${HDRS} flaglex.l flagexp.y lastmtime ../CONFIG
	echo 'char *version=${VERSION};' >version.c
	echo 'char *copyright=${COPYRIGHT};' >>version.c
ifdef SOURCE_DATE_EPOCH
	echo "char *reldate=\"$(shell LC_ALL=C date --utc --date="@$(SOURCE_DATE_EPOCH)" +%c)\";" >>version.c
else
	echo "char *reldate=\"`./lastmtime ${SRCS} ${HDRS} flaglex.l flagexp.y`\";" >>version.c
endif

depend:	version.c
	@mv -f Makefile Makefile.bak; \
	sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \
	${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \
		>>Makefile; \
	${ECHO} '# Dependencies generated by make depend' >>Makefile; \
	for f in ${SRCS} version.c; \
	do \
		${ECHO} "Dependencies for $$f:\c"; \
		${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \
		for h in `sed -n -e \
			's/^#[ 	]*include[ 	]*"\([^"]*\)".*/\1/p' $$f`; \
		do \
			${ECHO} " $$h\c"; \
			if [ -r $$h ]; \
			then \
				${ECHO} " $$h\c" >>Makefile; \
			else \
				${ECHO} " ${INCDIR}/$$h\c" >>Makefile; \
			fi; \
		done; \
		${ECHO} " done."; \
		${ECHO} "" >>Makefile; \
	done; \
	${ECHO} '# End of generated dependencies' >>Makefile

# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
# Dependencies generated by make depend
lastmtime.o:
ifcico.o: ../iflib/getopt.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h ../iflib/trap.h ../iflib/config.h ../iflib/version.h ../iflib/needed.h
nodelist.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodelist.h nlindex.h ../iflib/needed.h
call.o: ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h ../iflib/config.h session.h ../iflib/callstat.h
callall.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h nodelist.h ../iflib/config.h ../iflib/scanout.h ../iflib/needed.h
answer.o: ../iflib/lutil.h ../iflib/ftn.h nodelist.h session.h ../iflib/config.h
modemstr.o: ../iflib/config.h nodelist.h
openport.o: ../iflib/lutil.h ../iflib/xutil.h ../iflib/ulock.h ttyio.h
opentcp.o: ../iflib/lutil.h ttyio.h
dial.o: ../iflib/lutil.h nodelist.h ../iflib/config.h
session.o: ttyio.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h statetbl.h session.h ../iflib/config.h emsi.h ../iflib/version.h
chat.o: ../iflib/lutil.h ../iflib/xutil.h nodelist.h ../iflib/config.h
ttyio.o: ttyio.h ../iflib/lutil.h
emsi.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h nodelist.h ../iflib/version.h
ftsc.o: ../iflib/ftn.h ../iflib/getheader.h ../iflib/xutil.h ../iflib/lutil.h session.h ttyio.h statetbl.h ../iflib/config.h
yoohoo.o: statetbl.h ../iflib/xutil.h ../iflib/lutil.h ttyio.h session.h ftscprod.h ../iflib/config.h ../iflib/ftn.h emsi.h nodelist.h ../iflib/version.h
filelist.o: ../iflib/config.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/bwrite.h session.h ../iflib/ftn.h
xmsend.o: session.h ../iflib/lutil.h ttyio.h statetbl.h ../iflib/version.h
xmrecv.o: session.h ttyio.h statetbl.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/config.h
sendbark.o: ../iflib/ftn.h ../iflib/lutil.h ttyio.h session.h statetbl.h
recvbark.o: ../iflib/lutil.h ttyio.h session.h statetbl.h
filetime.o:
m7recv.o: statetbl.h ttyio.h ../iflib/lutil.h
m7send.o: statetbl.h ttyio.h ../iflib/lutil.h
respfreq.o: ../iflib/directory.h session.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/config.h ../iflib/ftnmsg.h ../iflib/version.h
rdoptions.o: session.h ../iflib/xutil.h ../iflib/lutil.h nodelist.h ../iflib/config.h ../iflib/needed.h
emsidat.o: ../iflib/ftn.h ../iflib/xutil.h ../iflib/lutil.h emsi.h session.h ../iflib/config.h ../iflib/version.h ../iflib/falists.h
wazoo.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h
janus.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h
hydra.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h hydra.h
zmsend.o: ttyio.h ../iflib/xutil.h ../iflib/lutil.h session.h zmodem.h emsi.h
zmrecv.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h zmodem.h session.h ../iflib/config.h emsi.h
zmmisc.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h zmodem.h
zmrle.o: ../iflib/lutil.h ttyio.h zmodem.h
tcp.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h
tcpproto.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h session.h ../iflib/config.h emsi.h
openfile.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/config.h ../iflib/needed.h
dietifna.o: ../iflib/lutil.h ttyio.h session.h emsi.h
openterm.o: ../iflib/lutil.h
nlindex.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodelist.h nlindex.h
nodebld.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodelist.h nlindex.h ../iflib/needed.h
ifindex.o: ../iflib/getopt.h ../iflib/lutil.h nodelist.h nlindex.h ../iflib/config.h ../iflib/version.h ../iflib/trap.h
ifroute.o: ../iflib/getopt.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h ../iflib/config.h ../iflib/version.h ../iflib/trap.h
mxlookup.o:
nlpatch.o: ../iflib/getopt.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/version.h ../iflib/config.h
version.o:
# End of generated dependencies