Testsuite: prepare shadow (vpath) builds
[users/heiko/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@ @BIND_8_COMPAT@ @DEFS@
8 LDFLAGS=@LDFLAGS@
9 CLIENT_SSL=@CLIENT_SSL@
10 CLIENT_GNUTLS=@CLIENT_GNUTLS@
11 LOADED=@LOADED@
12 LOADED_OPT=@LOADED_OPT@
13 LIBS=@LIBS@
14
15 VPATH = @srcdir@
16
17 ##############################################################################
18
19 # List of targets
20
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
24
25 # Ensure the bin directory exists
26
27 makebin:;       @if [ ! -e bin ] ; then mkdir bin 2>/dev/null; echo ""; fi
28
29 # Compile and link the programs:
30 #
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
43
44 bin/cf:         src/cf.c Makefile
45                 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/cf $<
46                 @echo ">>> bin/cf command build"
47                 @echo " "
48
49 bin/client:     src/client.c Makefile
50                 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $< $(LIBS)
51                 @echo ">>> bin/client command built"
52                 @echo " "
53
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"
57                 @echo " "
58
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"
62                 @echo " "
63
64 bin/checkaccess:src/checkaccess.c Makefile
65                 $(CC) $(CFLAGS) -DNO_TLS $(LDFLAGS) -o bin/checkaccess $<
66                 @echo ">>> bin/checkaccess command built"
67                 @echo " "
68
69 bin/fakens:     src/fakens.c Makefile
70                 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $< $(LIBS)
71                 @echo ">>> bin/fakens command built"
72                 @echo " "
73
74 bin/fd:         src/fd.c Makefile
75                 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $<
76                 @echo ">>> bin/fd command built"
77                 @echo " "
78
79 bin/iefbr14:    src/iefbr14.c Makefile
80                 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $<
81                 @echo ">>> bin/iefbr14 command built"
82                 @echo " "
83
84 bin/loaded:     src/loaded.c Makefile
85                 $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $<
86                 @echo ">>> bin/loaded command built"
87                 @echo " "
88
89 bin/mtpscript:  src/mtpscript.c Makefile
90                 $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $<
91                 @echo ">>> bin/mtpscript command built"
92                 @echo " "
93
94 bin/server:     src/server.c Makefile
95                 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $< $(LIBS)
96                 @echo ">>> bin/server command built"
97                 @echo " "
98
99 bin/showids:    src/showids.c Makefile
100                 $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $<
101                 @echo ">>> bin/showids command built"
102                 @echo " "
103                 
104 clean:;         rm -rf bin/* 
105
106 # End