Commit | Line | Data |
---|---|---|
151b83f8 PH |
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@ | |
be4bdb96 | 7 | CFLAGS=@CFLAGS@ @CPPFLAGS@ @BIND_8_COMPAT@ @DEFS@ |
151b83f8 | 8 | LDFLAGS=@LDFLAGS@ |
effbc122 | 9 | CLIENT_OPENSSL=@CLIENT_OPENSSL@ |
151b83f8 | 10 | CLIENT_GNUTLS=@CLIENT_GNUTLS@ |
effbc122 | 11 | CLIENT_ANYTLS=@CLIENT_ANYTLS@ |
151b83f8 PH |
12 | LOADED=@LOADED@ |
13 | LOADED_OPT=@LOADED_OPT@ | |
a4ca1b01 | 14 | LIBS=@LIBS@ |
151b83f8 | 15 | |
fa49e273 | 16 | SRC = @srcdir@/src |
ad179014 | 17 | |
151b83f8 PH |
18 | ############################################################################## |
19 | ||
effbc122 | 20 | BINARIES = bin/cf bin/client $(CLIENT_OPENSSL) $(CLIENT_GNUTLS) $(CLIENT_ANYTLS) \ |
151b83f8 | 21 | bin/checkaccess bin/fakens bin/fd bin/iefbr14 $(LOADED) \ |
effbc122 | 22 | bin/mtpscript bin/server bin/showids bin/locate \ |
151b83f8 | 23 | |
6481e125 JH |
24 | # List of targets |
25 | ||
26 | all: binaries sysbinaries | |
27 | ||
28 | binaries: $(BINARIES) | |
151b83f8 | 29 | |
e7ae83be | 30 | sysbinaries: FORCE binaries |
50936073 | 31 | bin/locate initdb postgres pg_ctl mysqld |
3f783654 | 32 | ls -la bin.sys |
151b83f8 PH |
33 | |
34 | # Compile and link the programs: | |
35 | # | |
fa49e273 | 36 | # bin/cf a "compare" program |
bbe15da8 PH |
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 | |
4c04137d | 41 | # bin/fakens a fake nameserver |
bbe15da8 PH |
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 | ||
fa49e273 HSHR |
49 | bin/cf: $(SRC)/cf.c Makefile |
50 | $(CC) $(CFLAGS) $(LDFLAGS) -o bin/cf $(SRC)/cf.c | |
151b83f8 | 51 | |
fa49e273 HSHR |
52 | bin/client: $(SRC)/client.c Makefile |
53 | $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $(SRC)/client.c $(LIBS) | |
151b83f8 | 54 | |
fa49e273 HSHR |
55 | bin/client-gnutls: $(SRC)/client.c Makefile |
56 | $(CC) $(CFLAGS) -DHAVE_GNUTLS $(LDFLAGS) -o bin/client-gnutls $(SRC)/client.c -lgnutls -lgcrypt $(LIBS) | |
151b83f8 | 57 | |
fa49e273 HSHR |
58 | bin/client-ssl: $(SRC)/client.c Makefile |
59 | $(CC) $(CFLAGS) -DHAVE_OPENSSL $(LDFLAGS) -o bin/client-ssl $(SRC)/client.c -lssl -lcrypto $(LIBS) | |
151b83f8 | 60 | |
effbc122 | 61 | $(CLIENT_ANYTLS): $(CLIENT_GNUTLS) $(CLIENT_OPENSSL) |
19ae9a55 | 62 | [ -n "$(CLIENT_GNUTLS)" ] && ln -sf `basename $(CLIENT_GNUTLS)` $@ || ln -sf `basename $(CLIENT_OPENSSL)` $@ |
effbc122 | 63 | |
fa49e273 HSHR |
64 | bin/checkaccess:$(SRC)/checkaccess.c Makefile |
65 | $(CC) $(CFLAGS) -DNO_TLS $(LDFLAGS) -o bin/checkaccess $(SRC)/checkaccess.c | |
151b83f8 | 66 | |
fa49e273 HSHR |
67 | bin/fakens: $(SRC)/fakens.c Makefile |
68 | $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $(SRC)/fakens.c $(LIBS) | |
151b83f8 | 69 | |
fa49e273 HSHR |
70 | bin/fd: $(SRC)/fd.c Makefile |
71 | $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $(SRC)/fd.c | |
151b83f8 | 72 | |
fa49e273 HSHR |
73 | bin/iefbr14: $(SRC)/iefbr14.c Makefile |
74 | $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $(SRC)/iefbr14.c | |
151b83f8 | 75 | |
fa49e273 HSHR |
76 | bin/loaded: $(SRC)/loaded.c Makefile |
77 | $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $(SRC)/loaded.c | |
151b83f8 | 78 | |
fa49e273 HSHR |
79 | bin/mtpscript: $(SRC)/mtpscript.c Makefile |
80 | $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $(SRC)/mtpscript.c | |
151b83f8 | 81 | |
fa49e273 HSHR |
82 | bin/server: $(SRC)/server.c Makefile |
83 | $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $(SRC)/server.c $(LIBS) | |
151b83f8 | 84 | |
fa49e273 HSHR |
85 | bin/showids: $(SRC)/showids.c Makefile |
86 | $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $(SRC)/showids.c | |
fa49e273 | 87 | |
cc285a9f | 88 | bin/locate: $(SRC)/locate.sh Makefile |
50936073 | 89 | cp $(SRC)/locate.pl bin/locate |
e7ae83be | 90 | chmod 0755 bin/locate |
cc285a9f | 91 | |
6481e125 JH |
92 | clean:; rm -rf $(BINARIES) bin.sys |
93 | ||
cc285a9f | 94 | FORCE: |
151b83f8 PH |
95 | |
96 | # End |