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@
11 B64_GNUTLS=@B64_GNUTLS@
13 LOADED_OPT=@LOADED_OPT@
18 ##############################################################################
20 BINARIES = bin/cf bin/client $(CLIENT_SSL) $(CLIENT_GNUTLS) \
21 bin/checkaccess bin/fakens bin/fd bin/iefbr14 $(LOADED) \
22 bin/mtpscript bin/server bin/showids bin/locate \
27 all: binaries sysbinaries
31 sysbinaries: FORCE binaries
32 bin/locate initdb postgres pg_ctl mysqld
35 # Compile and link the programs:
37 # bin/cf a "compare" program
38 # bin/checkaccess tests whether the exim uid/gid can access the files
39 # bin/client an SMTP script-driven client, without TLS support
40 # bin/client-gnutls ditto, with GnuTLS support
41 # bin/client-ssl ditto, with OpenSSL support
42 # bin/fakens a fake nameserver
43 # bin/fd output details of open file descriptors
44 # bin/iefbr14 a program that does nothing and returns 0
45 # bin/loaded a dynamically loaded test module
46 # bin/mtpscript an LMTP/SMTP "server" that works on stdin/stdout
47 # bin/server an SMTP (socket) script-driven server (no TLS support)
48 # bin/showids output current uid, gid, euid, egid
50 bin/cf: $(SRC)/cf.c Makefile
51 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/cf $(SRC)/cf.c
53 bin/client: $(SRC)/client.c Makefile
54 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $(SRC)/client.c $(LIBS)
56 bin/client-gnutls: $(SRC)/client.c Makefile
57 $(CC) $(CFLAGS) -DHAVE_GNUTLS $(LDFLAGS) -o bin/client-gnutls $(SRC)/client.c -lgnutls -lgcrypt $(LIBS)
59 bin/client-ssl: $(SRC)/client.c Makefile
60 $(CC) $(CFLAGS) -DHAVE_OPENSSL $(LDFLAGS) -o bin/client-ssl $(SRC)/client.c -lssl -lcrypto $(LIBS)
62 bin/checkaccess:$(SRC)/checkaccess.c Makefile
63 $(CC) $(CFLAGS) -DNO_TLS $(LDFLAGS) -o bin/checkaccess $(SRC)/checkaccess.c
65 bin/fakens: $(SRC)/fakens.c Makefile
66 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $(SRC)/fakens.c $(LIBS)
68 bin/fd: $(SRC)/fd.c Makefile
69 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $(SRC)/fd.c
71 bin/iefbr14: $(SRC)/iefbr14.c Makefile
72 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $(SRC)/iefbr14.c
74 bin/loaded: $(SRC)/loaded.c Makefile
75 $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $(SRC)/loaded.c
77 bin/mtpscript: $(SRC)/mtpscript.c Makefile
78 $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $(SRC)/mtpscript.c
80 bin/server: $(SRC)/server.c Makefile
81 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $(SRC)/server.c $(LIBS)
83 bin/showids: $(SRC)/showids.c Makefile
84 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $(SRC)/showids.c
86 bin/locate: $(SRC)/locate.sh Makefile
87 cp $(SRC)/locate.pl bin/locate
90 bin/ed25519_privkey_pem_to_pubkey_raw_b64: $(SRC)/ed25519_privkey_pem_to_pubkey_raw_b64.c Makefile
91 $(CC) $(CFLAGS) -DHAVE_GNUTLS $(LDFLAGS) -o bin/ed25519_privkey_pem_to_pubkey_raw_b64 \
92 $(SRC)/ed25519_privkey_pem_to_pubkey_raw_b64.c -lgnutls -lgcrypt $(LIBS)
94 clean:; rm -rf $(BINARIES) bin.sys