Testsuite: fix build on non-gnumake platforms
[exim.git] / test / Makefile.in
... / ...
CommitLineData
1# This Makefile builds the support programs for the Exim test suite.
2
3##############################################################################
4# These variables are set by the configure script.
5
6CC=@CC@
7CFLAGS=@CFLAGS@ @CPPFLAGS@ @BIND_8_COMPAT@ @DEFS@
8LDFLAGS=@LDFLAGS@
9CLIENT_OPENSSL=@CLIENT_OPENSSL@
10CLIENT_GNUTLS=@CLIENT_GNUTLS@
11CLIENT_ANYTLS=@CLIENT_ANYTLS@
12LOADED=@LOADED@
13LOADED_OPT=@LOADED_OPT@
14LIBS=@LIBS@
15
16SRC = @srcdir@/src
17
18##############################################################################
19
20BINARIES = bin/cf bin/client $(CLIENT_OPENSSL) $(CLIENT_GNUTLS) $(CLIENT_ANYTLS) \
21 bin/checkaccess bin/fakens bin/fd bin/iefbr14 $(LOADED) \
22 bin/mtpscript bin/server bin/showids bin/locate \
23
24# List of targets
25
26all: binaries sysbinaries
27
28binaries: $(BINARIES)
29
30sysbinaries: FORCE binaries
31 bin/locate initdb postgres pg_ctl mysqld
32 ls -la bin.sys
33
34# Compile and link the programs:
35#
36# bin/cf a "compare" program
37# bin/checkaccess tests whether the exim uid/gid can access the files
38# bin/client an SMTP script-driven client, without TLS support
39# bin/client-gnutls ditto, with GnuTLS support
40# bin/client-ssl ditto, with OpenSSL support
41# bin/fakens a fake nameserver
42# bin/fd output details of open file descriptors
43# bin/iefbr14 a program that does nothing and returns 0
44# bin/loaded a dynamically loaded test module
45# bin/mtpscript an LMTP/SMTP "server" that works on stdin/stdout
46# bin/server an SMTP (socket) script-driven server (no TLS support)
47# bin/showids output current uid, gid, euid, egid
48
49bin/cf: $(SRC)/cf.c Makefile
50 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/cf $(SRC)/cf.c
51
52bin/client: $(SRC)/client.c Makefile
53 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $(SRC)/client.c $(LIBS)
54
55bin/client-gnutls: $(SRC)/client.c Makefile
56 $(CC) $(CFLAGS) -DHAVE_GNUTLS $(LDFLAGS) -o bin/client-gnutls $(SRC)/client.c -lgnutls -lgcrypt $(LIBS)
57
58bin/client-ssl: $(SRC)/client.c Makefile
59 $(CC) $(CFLAGS) -DHAVE_OPENSSL $(LDFLAGS) -o bin/client-ssl $(SRC)/client.c -lssl -lcrypto $(LIBS)
60
61$(CLIENT_ANYTLS): $(CLIENT_GNUTLS) $(CLIENT_OPENSSL)
62 [ -n "$(CLIENT_GNUTLS)" ] && ln -sf `basename $(CLIENT_GNUTLS)` $@ || ln -sf `basename $(CLIENT_OPENSSL)` $@
63
64bin/checkaccess:$(SRC)/checkaccess.c Makefile
65 $(CC) $(CFLAGS) -DNO_TLS $(LDFLAGS) -o bin/checkaccess $(SRC)/checkaccess.c
66
67bin/fakens: $(SRC)/fakens.c Makefile
68 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $(SRC)/fakens.c $(LIBS)
69
70bin/fd: $(SRC)/fd.c Makefile
71 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $(SRC)/fd.c
72
73bin/iefbr14: $(SRC)/iefbr14.c Makefile
74 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $(SRC)/iefbr14.c
75
76bin/loaded: $(SRC)/loaded.c Makefile
77 $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $(SRC)/loaded.c
78
79bin/mtpscript: $(SRC)/mtpscript.c Makefile
80 $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $(SRC)/mtpscript.c
81
82bin/server: $(SRC)/server.c Makefile
83 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $(SRC)/server.c $(LIBS)
84
85bin/showids: $(SRC)/showids.c Makefile
86 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $(SRC)/showids.c
87
88bin/locate: $(SRC)/locate.sh Makefile
89 cp $(SRC)/locate.pl bin/locate
90 chmod 0755 bin/locate
91
92clean:; rm -rf $(BINARIES) bin.sys
93
94FORCE:
95
96# End