1 # Make file for building Exim's lookup modules.
2 # This is called from the main make file, after cd'ing
3 # to the misc_modulessubdirectory.
5 # Copyright (c) The Exim Maintainers 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/lookups-Makefile.
11 # MAGIC-TAG-MODS-OBJ-RULES-GO-HERE
15 all: miscmods.a $(MODS)
18 @$(RM_COMMAND) -f miscmods.a
19 @echo "$(AR) miscmods.a"
20 @$(AR) miscmods.a $(OBJ)
24 .c.o:; @echo "$(CC) $*.c"
25 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) $*.c
27 .c.so:; @echo "$(CC) -shared $*.c"
28 $(FE)$(CC) $(SUPPORT_$*_INCLUDE) $(SUPPORT_$*_LIBS) \
29 -DDYNLOOKUP $(CFLAGS_DYNAMIC) $(CFLAGS) $(INCLUDE) \
32 # Note that the sources from pdkim/ are linked into the build.../miscmods/ dir
33 # by scripts/Makelinks.
34 arc.o arc.so: $(HDRS) pdkim.h arc.c
35 dkim.o dkim.so: $(HDRS) dkim.h dkim.c dkim_transport.c \
36 crypt_ver.h pdkim.h pdkim_hash.h pdkim.c \
38 dmarc.o dmarc.so: $(HDRS) pdkim.h dmarc.h dmarc.c
40 exim_filter.o exim_filter.so: $(HDRS) exim_filter.c
41 pam.o pam.so: $(HDRS) pam.c
42 perl.o perl.so: $(HDRS) perl.c
43 radius.o radius.so: $(HDRS) radius.c
44 sieve_filter.o sieve_filter.so: $(HDRS) sieve_filter.c
45 spf.o spf.so: $(HDRS) spf.h spf.c
48 @echo "$(CC) dkim.c dkim_transport.c pdkim.c signing.c"
49 $(FE)$(CC) -r $(LDFLAGS_PARTIAL) -o $@ $(CFLAGS) $(INCLUDE) \
50 dkim.c dkim_transport.c pdkim.c signing.c
53 @echo "$(CC) -shared dkim.c dkim_transport.c pdkim.c signing.c"
54 $(FE)$(CC) -DDYNLOOKUP $(CFLAGS_DYNAMIC) -o $@ \
55 $(SUPPORT_$*_INCLUDE) $(SUPPORT_$*_LIBS) \
56 $(CFLAGS) $(INCLUDE) $(DLFLAGS) \
57 dkim.c dkim_transport.c pdkim.c signing.c
59 # Compile instructions for static perl.o for when EXIM_PERL is set
60 # Dynamic is managed all via scripts/Configure-Makefile
63 @echo "$(PERL_CC) perl.c"
64 $(FE)$(PERL_CC) $(PERL_CCOPTS) $(CFLAGS) $(INCLUDE) -c perl.c