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
|
# Makefile for iflib - part of ifmail FidoNet package
# Copyright (c) 1993-1997 by Eugene G. Crosser
INCDIR = .
include ../CONFIG
DEFINES = -DDEBUGFILE=\"${DEBUGFILE}\" \
-DLOGFILE=\"${LOGFILE}\" \
-DCONFIGFILE=\"${CONFIGFILE}\" \
-DMAPTABDIR=\"${MAPTABDIR}\" \
-DLOCKDIR=\"${LOCKDIR}\" \
-DPUBDIR=\"${PUBDIR}\" \
-DFAKEDIR=\"${FAKEDIR}\" \
-DMAILLOG=${MAILLOG} \
-DNEWSLOG=${NEWSLOG} \
-DCICOLOG=${CICOLOG} \
${OPTS}
OBJS = lutil.o xutil.o ulock.o rfcdate.o sequencer.o ftnmsg.o hdr.o \
crc.o parsedate.o gettime.o execute.o execsh.o \
rdconfig.o ftn.o packet.o pktname.o bwrite.o \
bread.o getheader.o scanout.o matchaka.o atoul.o \
nodelock.o trap.o rfcaddr.o expipe.o callstat.o \
cspace.o setproctitle.o \
charset.o mime.o \
lhash.o hash.o falists.o ${NEEDED}
SRCS = lutil.c xutil.c ulock.c rfcdate.c sequencer.c ftnmsg.c hdr.c \
crc.c strcasestr.c strncasecmp.c strcasecmp.c \
rename.c mkdir.c parsedate.y gettime.c \
rdconfig.c ftn.c packet.c pktname.c bwrite.c \
bread.c getheader.c scanout.c matchaka.c usleep.c \
execute.c execsh.c signal.c regexpr.c atoul.c \
nodelock.c trap.c rfcaddr.c expipe.c callstat.c \
cspace.c setproctitle.c ref.c \
charset.c mime.c \
cleanup_ref.c make_new_ref.c tmpfile.c \
dirent.c lhash.c hash.c falists.c
HDRS = lutil.h xutil.h ulock.h libinn.h macros.h configdata.h clibrary.h \
config.h ftn.h bwrite.h bread.h getheader.h getopt.h \
scanout.h trap.h rfcaddr.h ftnmsg.h rfcmsg.h callstat.h \
cspace.h charset.h mime.h \
crc.h strcasestr.h strncasecmp.h strcasecmp.h rename.h \
mkdir.h usleep.h ref_interface.h tmpfile.h \
version.h directory.h lhash.h hash.h falists.h
OTHER = Makefile README parsedate.3 cleanup_ref.8 make_new_ref.8
ifdef REFERENCES_MSC96
OBJS += ref.o
#REF_FILES=cleanup_ref make_new_ref
REF_FILES=make_new_ref
REF_MAN=man_ref
REF_INSTALL=install_ref
endif
#############################################################################
ifeq (yes,${SHARED})
.c.o:
${CC} ${CFLAGS} -fPIC ${INCLUDES} ${DEFINES} -c $<
all: needed.h libifmail.so.${SHVER} ${REF_FILES}
else
.c.o:
${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
all: needed.h utlib.a ${REF_FILES}
endif
parsedate.c: parsedate.y
@echo expect 6 shift/reduce conflicts
${YACC} parsedate.y
mv y.tab.c parsedate.c
@echo expect 4 warnings compiling parsedate.c
libifmail.so.${SHVER}: ${OBJS}
${CC} -o libifmail.so.${SHVER} -shared -Wl,-soname,libifmail.so.${SHVER} ${OBJS}
ln -s libifmail.so.${SHVER} libifmail.so
utlib.a: ${OBJS}
${AR} r $@ $?
${RANLIB} $@
needed.h:
(for f in ${NEEDED} ;do BASE=`basename $$f .o`; BASE=\"$${BASE}.h\" ; \
echo "#include $${BASE}"; done) > needed.h
cleanup_ref: cleanup_ref.o ref.o
${CC} ${CFLAGS} cleanup_ref.o ref.o ${LIBS} -o cleanup_ref
make_new_ref: make_new_ref.o ref.o
${CC} ${CFLAGS} make_new_ref.o ref.o ${LIBS} -o make_new_ref
clean:
rm -f utlib.a libifmail.so* *.o getdate.c parsedate.c testscan \
testconf testtrap testrfcaddr core filelist Makefile.bak needed.h \
cleanup_ref make_new_ref
install: all ${REF_INSTALL}
ifeq (1,${SHARED})
${INSTALL} -o${OWNER} -g${GROUP} -m644 libifmail.so.${SHVER} ${LIBDIR}/libifmail.so.${SHVER}
endif
install_ref:
#${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} cleanup_ref ${BINDIR}/cleanup_ref
${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} make_new_ref ${BINDIR}/make_new_ref
tar: utlib.tar.z
utlib.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: ${REF_MAN}
${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} parsedate.3 ${MANDIR}/man3/parsedate.3
man_ref:
${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} cleanup_ref.8 ${MANDIR}/man8/cleanup_ref.8
${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} make_new_ref.8 ${MANDIR}/man8/make_new_ref.8
testconf: rdconfig.c config.h utlib.a
cc -g -Wall -DTESTING rdconfig.c utlib.a -o $@
tryconf: testconf
./testconf ../misc/config
testscan: scanout.c scanout.h utlib.a
cc -g -Wall -DTESTING scanout.c utlib.a -o $@
tryscan: testscan
./testscan ../misc/config
testtrap: trap.c
cc -g -Wall -DNEED_TRAP -DTESTING trap.c utlib.a -o $@
trytrap: testtrap
./testtrap
testrfcaddr: rfcaddr.c rfcaddr.h
cc -g -Wall -DTESTING rfcaddr.c utlib.a -o $@
tryrfcaddr: testrfcaddr
./testrfcaddr
depend:
@rm -f Makefile.bak; \
mv 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}; \
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"; \
${ECHO} " $$h\c" >>Makefile; \
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
lutil.o:
xutil.o: xutil.h lutil.h
ulock.o: lutil.h
rfcdate.o:
sequencer.o: lutil.h config.h
ftnmsg.o: lutil.h bwrite.h ftn.h ftnmsg.h
hdr.o: xutil.h lutil.h rfcmsg.h
crc.o:
strcasestr.o:
strncasecmp.o:
strcasecmp.o:
rename.o:
mkdir.o:
parsedate.y.o: configdata.h libinn.h macros.h
gettime.o: configdata.h clibrary.h libinn.h
rdconfig.o: xutil.h lutil.h ftn.h config.h charset.h
ftn.o: lutil.h xutil.h ftn.h rfcaddr.h config.h mime.h
packet.o: xutil.h lutil.h ftn.h config.h bwrite.h
pktname.o: directory.h lutil.h xutil.h ftn.h config.h
bwrite.o: bwrite.h config.h
bread.o: bread.h config.h
getheader.o: lutil.h xutil.h ftn.h bread.h config.h
scanout.o: directory.h xutil.h config.h ftn.h scanout.h lutil.h
matchaka.o: ftn.h lutil.h config.h
usleep.o:
execute.o: lutil.h
execsh.o: lutil.h
signal.o:
regexpr.o:
atoul.o:
nodelock.o: xutil.h lutil.h ftn.h
trap.o: lutil.h trap.h lutil.h
rfcaddr.o: xutil.h rfcaddr.h
expipe.o: lutil.h
callstat.o: lutil.h ftn.h callstat.h
setprocn.o:
ref.o: config.h ref_interface.h lutil.h
charset.o: lutil.h xutil.h rfcmsg.h needed.h config.h mime.h charset.h
mime.o: needed.h lutil.h xutil.h
cleanup_ref.o: config.h ref_interface.h
make_new_ref.o: config.h ref_interface.h
tmpfile.o:
dirent.o: directory.h
lhash.o: lhash.h
hash.o: hash.h lhash.h
falists.o: xutil.h lutil.h ftn.h falists.h
# End of generated dependencies
|