1 # Make file for building a library containing all the available transports and
2 # calling it transports.a. This is called from the main make file, after cd'ing
3 # to the transports subdirectory.
5 # Copyright (c) The Exim Maintainers 2021 - 2024
7 # nb: at build time, the version of this file used will have had some
8 # extra variable definitions and prepended to it and module build rules
9 # interpolated below. This is done by scripts/drivers-Makefile.
11 # MAGIC-TAG-MODS-OBJ-RULES-GO-HERE
13 all: transports.a $(MODS)
16 @$(RM_COMMAND) -f transports.a
17 @echo "$(AR) transports.a"
18 @$(AR) transports.a $(OBJ)
22 .c.o:; @echo "$(CC) $*.c"
23 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) $*.c
25 .c.so:; @echo "$(CC) -shared $*.c"
26 $(FE)$(CC) -DDYNLOOKUP $(CFLAGS_DYNAMIC) $(CFLAGS) $(INCLUDE) $(DLFLAGS) $*.c -o $@
29 $(OBJ) $(MOD): $(HDRS)
31 autoreply.o autoreply.so: autoreply.c autoreply.h
32 lmtp.o lmtp.so: lmtp.c lmtp.h
33 pipe.o pipe.so: pipe.c pipe.h
34 queuefile.o queuefile.so: queuefile.c queuefile.h
37 # These ones depend on more than one .c source
39 appendfile.o: appendfile.c appendfile.h tf_maildir.c tf_maildir.h
40 @echo "$(CC) appendfile.c tf_maildir.c"
41 $(FE)$(CC) $(CFLAGS) $(INCLUDE) appendfile.c tf_maildir.c -r -o $@
43 appendfile.so: appendfile.c appendfile.h tf_maildir.c tf_maildir.h
44 @echo "$(CC) -shared appendfile.c tf_maildir.c"
45 $(FE)$(CC) -DDYNLOOKUP $(CFLAGS_DYNAMIC) $(CFLAGS) $(INCLUDE) $(DLFLAGS) \
46 appendfile.c tf_maildir.c -o $@
48 smtp.o: smtp.c smtp_socks.c smtp.h
49 @echo "$(CC) smtp.c smtp_socks.c"
50 $(FE)$(CC) $(CFLAGS) $(INCLUDE) smtp.c smtp_socks.c -r -o $@
52 smtp.so: smtp.c smtp_socks.c smtp.h
53 @echo "$(CC) -shared smtp.c smtp_socks.c"
54 $(FE)$(CC) -DDYNLOOKUP $(CFLAGS_DYNAMIC) $(CFLAGS) $(INCLUDE) $(DLFLAGS) \
55 smtp.c smtp_socks.c -o $@