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 namserver
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 $<
46 @echo ">>> bin/cf command build"
49 bin/client: src/client.c Makefile
50 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $< $(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 $< -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 $< -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 $<
66 @echo ">>> bin/checkaccess command built"
69 bin/fakens: src/fakens.c Makefile
70 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $< $(LIBS)
71 @echo ">>> bin/fakens command built"
74 bin/fd: src/fd.c Makefile
75 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $<
76 @echo ">>> bin/fd command built"
79 bin/iefbr14: src/iefbr14.c Makefile
80 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $<
81 @echo ">>> bin/iefbr14 command built"
84 bin/loaded: src/loaded.c Makefile
85 $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $<
86 @echo ">>> bin/loaded command built"
89 bin/mtpscript: src/mtpscript.c Makefile
90 $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $<
91 @echo ">>> bin/mtpscript command built"
94 bin/server: src/server.c Makefile
95 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $< $(LIBS)
96 @echo ">>> bin/server command built"
99 bin/showids: src/showids.c Makefile
100 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $<
101 @echo ">>> bin/showids command built"