1 # This Makefile builds the support programs for the Exim test suite.
3 ##############################################################################
4 # These variables are set by the configure script.
7 CFLAGS=@CFLAGS@ @BIND_8_COMPAT@ @DEFS@
9 CLIENT_SSL=@CLIENT_SSL@
10 CLIENT_GNUTLS=@CLIENT_GNUTLS@
12 LOADED_OPT=@LOADED_OPT@
17 ##############################################################################
21 all: makebin bin/cf bin/client $(CLIENT_SSL) $(CLIENT_GNUTLS) \
22 bin/checkaccess bin/fakens bin/fd bin/iefbr14 $(LOADED) \
23 bin/mtpscript bin/server bin/showids
25 # Ensure the bin directory exists
27 makebin:; @if [ ! -e bin ] ; then mkdir bin 2>/dev/null; echo ""; fi
29 # Compile and link the programs:
31 # bin/cf a "compare" program
32 # bin/checkaccess tests whether the exim uid/gid can access the files
33 # bin/client an SMTP script-driven client, without TLS support
34 # bin/client-gnutls ditto, with GnuTLS support
35 # bin/client-ssl ditto, with OpenSSL support
36 # bin/fakens a fake nameserver
37 # bin/fd output details of open file descriptors
38 # bin/iefbr14 a program that does nothing and returns 0
39 # bin/loaded a dynamically loaded test module
40 # bin/mtpscript an LMTP/SMTP "server" that works on stdin/stdout
41 # bin/server an SMTP (socket) script-driven server (no TLS support)
42 # bin/showids output current uid, gid, euid, egid
44 bin/cf: $(SRC)/cf.c Makefile
45 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/cf $(SRC)/cf.c
46 @echo ">>> bin/cf command build"
49 bin/client: $(SRC)/client.c Makefile
50 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $(SRC)/client.c $(LIBS)
51 @echo ">>> bin/client command built"
54 bin/client-gnutls: $(SRC)/client.c Makefile
55 $(CC) $(CFLAGS) -DHAVE_GNUTLS $(LDFLAGS) -o bin/client-gnutls $(SRC)/client.c -lgnutls -lgcrypt $(LIBS)
56 @echo ">>> bin/client-gnutls command built"
59 bin/client-ssl: $(SRC)/client.c Makefile
60 $(CC) $(CFLAGS) -DHAVE_OPENSSL $(LDFLAGS) -o bin/client-ssl $(SRC)/client.c -lssl -lcrypto $(LIBS)
61 @echo ">>> bin/client-ssl command built"
64 bin/checkaccess:$(SRC)/checkaccess.c Makefile
65 $(CC) $(CFLAGS) -DNO_TLS $(LDFLAGS) -o bin/checkaccess $(SRC)/checkaccess.c
66 @echo ">>> bin/checkaccess command built"
69 bin/fakens: $(SRC)/fakens.c Makefile
70 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $(SRC)/fakens.c $(LIBS)
71 @echo ">>> bin/fakens command built"
74 bin/fd: $(SRC)/fd.c Makefile
75 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $(SRC)/fd.c
76 @echo ">>> bin/fd command built"
79 bin/iefbr14: $(SRC)/iefbr14.c Makefile
80 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $(SRC)/iefbr14.c
81 @echo ">>> bin/iefbr14 command built"
84 bin/loaded: $(SRC)/loaded.c Makefile
85 $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $(SRC)/loaded.c
86 @echo ">>> bin/loaded command built"
89 bin/mtpscript: $(SRC)/mtpscript.c Makefile
90 $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $(SRC)/mtpscript.c
91 @echo ">>> bin/mtpscript command built"
94 bin/server: $(SRC)/server.c Makefile
95 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $(SRC)/server.c $(LIBS)
96 @echo ">>> bin/server command built"
99 bin/showids: $(SRC)/showids.c Makefile
100 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $(SRC)/showids.c
101 @echo ">>> bin/showids command built"