738e351470d27793127013e35ea705866dbab6a5
[exim.git] / src / src / routers / Makefile
1 # Make file for building a library containing all the available routers and
2 # calling it routers.a. This is called from the main make file, after cd'ing
3 # to the directors subdirectory. The library also contains functions that
4 # are called only from within the individual routers.
5 #
6 # Copyright (c) The Exim Maintainers 2021 - 2024
7
8 # nb: at build time, the version of this file used will have had some
9 #     extra variable definitions and prepended to it and module build rules
10 #     interpolated below. This is done by scripts/drivers-Makefile with
11 #     definitions from scripts/Configure-Makefile.
12
13 # MAGIC-TAG-MODS-OBJ-RULES-GO-HERE
14
15 RF_OBJ = rf_change_domain.o rf_expand_data.o rf_get_errors_address.o \
16       rf_get_munge_headers.o rf_get_transport.o rf_get_ugid.o \
17       rf_lookup_hostlist.o \
18       rf_queue_add.o rf_self_action.o \
19       rf_set_ugid.o
20
21 OBJ += $(RF_OBJ)
22
23 all:             routers.a $(MODS)
24
25 routers.a:       $(OBJ)
26                  @$(RM_COMMAND) -f routers.a
27                  @echo "$(AR) routers.a"
28                  @$(AR) routers.a $(OBJ)
29                  $(RANLIB) $@
30
31 .SUFFIXES:       .o .c .so
32 .c.o:;           @echo "$(CC) $*.c"
33                  $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) $*.c
34
35 .c.so:;          @echo "$(CC) -shared $*.c"
36                  $(FE)$(CC) -DDYNLOOKUP $(CFLAGS_DYNAMIC) $(CFLAGS) $(INCLUDE) $(DLFLAGS) $*.c -o $@
37
38
39
40 $(OBJ) $(MOD): $(HDRS) rf_functions.h
41
42 rf_change_domain.o:      rf_change_domain.c
43 rf_expand_data.o:        rf_expand_data.c
44 rf_get_errors_address.o: rf_get_errors_address.c
45 rf_get_munge_headers.o:  rf_get_munge_headers.c
46 rf_get_transport.o:      rf_get_transport.c
47 rf_get_ugid.o:           rf_get_ugid.c
48 rf_lookup_hostlist.o:    rf_lookup_hostlist.c
49 rf_queue_add.o:          rf_queue_add.c
50 rf_self_action.o:        rf_self_action.c
51 rf_set_ugid.o:           rf_set_ugid.c
52
53 accept.o accept.so:             accept.c       accept.h
54 dnslookup.o dnslookup.so:       dnslookup.c    dnslookup.h
55 ipliteral.o ipliteral.so:       ipliteral.c    ipliteral.h
56 iplookup.o iplookup.so:         iplookup.c     iplookup.h
57 manualroute.o manualroute.so:   manualroute.c  manualroute.h
58 queryprogram.o queryprogram.so: queryprogram.c queryprogram.h
59 redirect.o redirect.so:         redirect.c     redirect.h
60
61 # End