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
|
# Don't edit Makefile! Use conf-* for configuration.
#
# Generated by spac see http://untroubled.org/spac/
SHELL=/bin/sh
DEFAULT: all
all: libraries programs docs
auto_testcvm.c:
echo \#define TESTCVM_UID $$(id -u) > $@
echo \#define TESTCVM_GID $$(id -g) >> $@
echo \#define TESTCVM_PWD \"$$(pwd)\" >> $@
backend-echo.so: makeso backend-echo.c mailfront.h responses.h constants.h
./makeso backend-echo.c -lbg
backend-qmail.so: makeso backend-qmail.c mailfront.h responses.h constants.h conf_qmail.c
./makeso backend-qmail.c -lbg
backend-queuedir.so: makeso backend-queuedir.c mailfront.h responses.h constants.h queuedir.c
./makeso backend-queuedir.c queuedir.c -lbg
builtins.o: compile builtins.c mailfront-internal.h mailfront.h responses.h constants.h
./compile builtins.c
clean: TARGETS
rm -f `cat TARGETS`
clean-spac: clean AUTOFILES
rm -f `cat AUTOFILES`
compile: conf-cc
( echo '#!/bin/sh'; \
echo 'source=$$1; shift'; \
echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
echo exec `head -n 1 conf-cc` -I. '-o $${base}.o -c $$source $${1+"$$@"}'; \
) >compile
chmod 755 compile
conf_modules.c: conf-modules
head -n 1 conf-modules | \
sed -e 's/"/\\"/g' \
-e 's/^/const char conf_modules[] = "/' \
-e 's/$$/";/' >conf_modules.c
conf_qmail.c: conf-qmail
head -n 1 conf-qmail | \
sed -e 's/"/\\"/g' \
-e 's/^/const char conf_qmail[] = "/' \
-e 's/$$/";/' >conf_qmail.c
dl.lib: compile load
@echo -n 'Checking for -ldl: '
@echo 'main() { ; }' >trylib-ldl.c
@{ ./compile trylib-ldl.c && ./load trylib-ldl -ldl; } >/dev/null 2>&1 \
&& { echo -ldl >dl.lib; echo yes; } \
|| { echo -n >dl.lib; echo no; }
@rm -f trylib-ldl.c trylib-ldl.o trylib-ldl
docs:
getprotoenv.o: compile getprotoenv.c mailfront.h responses.h constants.h
./compile getprotoenv.c
imapfront-auth: imapfront-auth.o load timeout.o socket.lib
./load imapfront-auth timeout.o -lcvm-sasl -lcvm-v2client -lbg `cat socket.lib`
imapfront-auth.o: compile imapfront-auth.c
./compile imapfront-auth.c
install: INSTHIER conf-bin conf-modules conf-include
bg-installer -v <INSTHIER
bg-installer -c <INSTHIER
iobytes.o: compile iobytes.c
./compile iobytes.c
libraries: pop3.a plugin-starttls-ucspi.so plugin-rbl.so plugin-clamav.so plugin-cvm-authenticate.so plugin-patterns.so backend-echo.so plugin-counters.so backend-qmail.so plugin-cvm-validate.so protocol-qmtp.so backend-queuedir.so plugin-check-fqdn.so plugin-mailrules.so protocol-smtp.so plugin-add-received.so plugin-qmail-validate.so protocol-qmqp.so plugin-spamassassin.so
load: conf-ld
( echo '#!/bin/sh';\
echo 'main="$$1"; shift';\
echo exec `head -n 1 conf-ld` -L. '-o "$$main" "$$main.o" $${1+"$$@"}'; \
) >load
chmod 755 load
lua: plugin-lua.so
mailfront: mailfront.o load builtins.o getprotoenv.o iobytes.o modules.o responses.o session.o timeout.o socket.lib dl.lib
./load mailfront builtins.o getprotoenv.o iobytes.o modules.o responses.o session.o timeout.o -lbg -rdynamic `cat socket.lib` `cat dl.lib`
mailfront.o: compile mailfront.c mailfront-internal.h mailfront.h responses.h constants.h
./compile mailfront.c
makelib:
( echo '#!/bin/sh'; \
echo 'lib="$$1"; shift';\
echo 'rm -f "$$lib"';\
echo 'ar cr "$$lib" $${1+"$$@"}';\
echo 'ranlib "$$lib"';\
) >makelib
chmod 755 makelib
makeso: conf-ccso conf-ld
( echo '#!/bin/sh'; \
echo 'source=$$1; shift'; \
echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
echo exec `head -n 1 conf-ccso` -DSHARED -I. -L. '-o $${base}.so $$source $${1+"$$@"}'; \
) >makeso
chmod 755 makeso
modules.o: compile modules.c mailfront-internal.h mailfront.h responses.h constants.h conf_modules.c
./compile modules.c
plugin-add-received.so: makeso plugin-add-received.c mailfront.h responses.h constants.h
./makeso plugin-add-received.c -lbg
plugin-check-fqdn.so: makeso plugin-check-fqdn.c mailfront.h responses.h constants.h
./makeso plugin-check-fqdn.c -lbg
plugin-clamav.so: makeso plugin-clamav.c mailfront.h responses.h constants.h
./makeso plugin-clamav.c -lbg
plugin-counters.so: makeso plugin-counters.c mailfront.h responses.h constants.h
./makeso plugin-counters.c -lbg
plugin-cvm-authenticate.so: makeso plugin-cvm-authenticate.c mailfront.h responses.h constants.h
./makeso plugin-cvm-authenticate.c -lcvm-sasl -lcvm-v2client -lbg
plugin-cvm-validate.so: makeso plugin-cvm-validate.c mailfront.h responses.h constants.h
./makeso plugin-cvm-validate.c -lcvm-v2client -lbg
plugin-lua.so: makeso plugin-lua.c mailfront.h responses.h constants.h
./makeso plugin-lua.c -lbg -llua5.1 -I/usr/include/lua5.1
plugin-mailrules.so: makeso plugin-mailrules.c mailfront.h responses.h constants.h
./makeso plugin-mailrules.c -lbg
plugin-patterns.so: makeso plugin-patterns.c mailfront.h responses.h constants.h
./makeso plugin-patterns.c -lbg
plugin-qmail-validate.so: makeso plugin-qmail-validate.c mailfront.h responses.h constants.h conf_qmail.c
./makeso plugin-qmail-validate.c -lbg
plugin-rbl.so: makeso plugin-rbl.c mailfront.h responses.h constants.h queuedir.c
./makeso plugin-rbl.c queuedir.c -lbg
plugin-spamassassin.so: makeso plugin-spamassassin.c mailfront.h responses.h constants.h
./makeso plugin-spamassassin.c -lbg
plugin-starttls-ucspi.so: makeso plugin-starttls-ucspi.c mailfront.h responses.h constants.h
./makeso plugin-starttls-ucspi.c -lbg
pop3-capa.o: compile pop3-capa.c pop3.h constants.h
./compile pop3-capa.c
pop3-mainloop.o: compile pop3-mainloop.c pop3.h constants.h
./compile pop3-mainloop.c
pop3-response.o: compile pop3-response.c pop3.h constants.h
./compile pop3-response.c
pop3.a: makelib iobytes.o timeout.o pop3-capa.o pop3-mainloop.o pop3-response.o
./makelib pop3.a iobytes.o timeout.o pop3-capa.o pop3-mainloop.o pop3-response.o
pop3front-auth: pop3front-auth.o load pop3.a socket.lib
./load pop3front-auth pop3.a -lcvm-sasl -lcvm-v2client -lbg `cat socket.lib`
pop3front-auth.o: compile pop3front-auth.c pop3.h constants.h
./compile pop3front-auth.c
pop3front-maildir: pop3front-maildir.o load pop3.a
./load pop3front-maildir pop3.a -lbg -lcvm-sasl -lcvm-v2client
pop3front-maildir.o: compile pop3front-maildir.c pop3.h constants.h
./compile pop3front-maildir.c
programs: mailfront imapfront-auth pop3front-maildir pop3front-auth testcvm qmqpfront-echo smtpfront-echo qmtpfront-qmail qmtpfront-echo qmqpfront-qmail smtpfront-qmail
protocol-qmqp.so: makeso protocol-qmqp.c mailfront.h responses.h constants.h qmtp.h qmtp-respond.c netstring.c
./makeso protocol-qmqp.c qmtp-respond.c netstring.c -lbg
protocol-qmtp.so: makeso protocol-qmtp.c mailfront.h responses.h constants.h qmtp.h qmtp-respond.c netstring.c
./makeso protocol-qmtp.c qmtp-respond.c netstring.c -lbg
protocol-smtp.so: makeso protocol-smtp.c mailfront.h responses.h constants.h
./makeso protocol-smtp.c -lbg
qmqpfront-echo: warn-auto.sh qmqpfront-echo.sh
cat warn-auto.sh qmqpfront-echo.sh >qmqpfront-echo
chmod 755 qmqpfront-echo
qmqpfront-qmail: warn-auto.sh qmqpfront-qmail.sh
cat warn-auto.sh qmqpfront-qmail.sh >qmqpfront-qmail
chmod 755 qmqpfront-qmail
qmtpfront-echo: warn-auto.sh qmtpfront-echo.sh
cat warn-auto.sh qmtpfront-echo.sh >qmtpfront-echo
chmod 755 qmtpfront-echo
qmtpfront-qmail: warn-auto.sh qmtpfront-qmail.sh
cat warn-auto.sh qmtpfront-qmail.sh >qmtpfront-qmail
chmod 755 qmtpfront-qmail
responses.o: compile responses.c responses.h
./compile responses.c
session.o: compile session.c mailfront-internal.h mailfront.h responses.h constants.h
./compile session.c
smtpfront-echo: warn-auto.sh smtpfront-echo.sh
cat warn-auto.sh smtpfront-echo.sh >smtpfront-echo
chmod 755 smtpfront-echo
smtpfront-qmail: warn-auto.sh smtpfront-qmail.sh
cat warn-auto.sh smtpfront-qmail.sh >smtpfront-qmail
chmod 755 smtpfront-qmail
socket.lib: compile load
@echo -n 'Checking for socket libraries: '
@echo 'main() { ; }' >trylib-lsocket.c
@{ ./compile trylib-lsocket.c && ./load trylib-lsocket -lsocket -lnsl; } >/dev/null 2>&1 \
&& { echo -lsocket -lnsl >socket.lib; echo -lsocket -lnsl; } \
|| { : >socket.lib; echo no; }
@rm -f trylib-lsocket.c trylib-lsocket.o trylib-lsocket
testcvm: testcvm.o load
./load testcvm -lcvm-module -lbg
testcvm.o: compile testcvm.c auto_testcvm.c
./compile testcvm.c
timeout.o: compile timeout.c
./compile timeout.c
|