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