1 # $Cambridge: exim/src/src/lookups/Makefile,v 1.9 2009/06/10 07:34:05 tom Exp $
3 # Make file for building all the available lookups.
4 # This is called from the main make file, after cd'ing
5 # to the lookups subdirectory.
7 # because the variable is EXPERIMENTAL_SPF and not LOOKUP_SPF
8 # we put this one here by default and compile a dummy if
9 # EXPERIMENTAL_SPF is not defined
13 ifeq ($(LOOKUP_CDB),2)
15 LOOKUP_cdb_INCLUDE = $(LOOKUP_CDB_INCLUDE)
16 LOOKUP_cdb_LIBS = $(LOOKUP_CDB_LIBS)
18 ifneq ($(LOOKUP_CDB),)
23 ifeq ($(LOOKUP_DBM),2)
25 LOOKUP_dbmdb_INCLUDE = $(LOOKUP_DBM_INCLUDE)
26 LOOKUP_dbmdb_LIBS = $(LOOKUP_DBM_LIBS)
28 ifneq ($(LOOKUP_DBM),)
33 ifeq ($(LOOKUP_DNSDB),2)
35 LOOKUP_dnsdb_INCLUDE = $(LOOKUP_DNSDB_INCLUDE)
36 LOOKUP_dnsdb_LIBS = $(LOOKUP_DNSDB_LIBS)
38 ifneq ($(LOOKUP_DNSDB),)
43 ifeq ($(LOOKUP_DSEARCH),2)
45 LOOKUP_dsearch_INCLUDE = $(LOOKUP_DSEARCH_INCLUDE)
46 LOOKUP_dsearch_LIBS = $(LOOKUP_DSEARCH_LIBS)
48 ifneq ($(LOOKUP_DSEARCH),)
53 ifeq ($(LOOKUP_IBASE),2)
55 LOOKUP_ibase_INCLUDE = $(LOOKUP_IBASE_INCLUDE)
56 LOOKUP_ibase_LIBS = $(LOOKUP_IBASE_LIBS)
58 ifneq ($(LOOKUP_IBASE),)
63 ifneq ($(LOOKUP_LDAP),)
67 ifeq ($(LOOKUP_LSEARCH),2)
69 LOOKUP_lsearch_INCLUDE = $(LOOKUP_LSEARCH_INCLUDE)
70 LOOKUP_lsearch_LIBS = $(LOOKUP_LSEARCH_LIBS)
72 ifneq ($(LOOKUP_LSEARCH),)
77 ifeq ($(LOOKUP_MYSQL),2)
79 LOOKUP_mysql_INCLUDE = $(LOOKUP_MYSQL_INCLUDE)
80 LOOKUP_mysql_LIBS = $(LOOKUP_MYSQL_LIBS)
82 ifneq ($(LOOKUP_MYSQL),)
87 ifeq ($(LOOKUP_NIS),2)
89 LOOKUP_nis_INCLUDE = $(LOOKUP_NIS_INCLUDE)
90 LOOKUP_nis_LIBS = $(LOOKUP_NIS_LIBS)
92 ifneq ($(LOOKUP_NIS),)
97 ifeq ($(LOOKUP_NISPLUS),2)
99 LOOKUP_nisplus_INCLUDE = $(LOOKUP_NISPLUS_INCLUDE)
100 LOOKUP_nisplus_LIBS = $(LOOKUP_NISPLUS_LIBS)
102 ifneq ($(LOOKUP_NISPLUS),)
107 ifeq ($(LOOKUP_ORACLE),2)
109 LOOKUP_oracle_INCLUDE = $(LOOKUP_ORACLE_INCLUDE)
110 LOOKUP_oracle_LIBS = $(LOOKUP_ORACLE_LIBS)
112 ifneq ($(LOOKUP_ORACLE),)
117 ifeq ($(LOOKUP_PASSWD),2)
119 LOOKUP_passwd_INCLUDE = $(LOOKUP_PASSWD_INCLUDE)
120 LOOKUP_passwd_LIBS = $(LOOKUP_PASSWD_LIBS)
122 ifneq ($(LOOKUP_PASSWD),)
127 ifeq ($(LOOKUP_PGSQL),2)
129 LOOKUP_pgsql_INCLUDE = $(LOOKUP_PGSQL_INCLUDE)
130 LOOKUP_pgsql_LIBS = $(LOOKUP_PGSQL_LIBS)
132 ifneq ($(LOOKUP_PGSQL),)
137 ifeq ($(LOOKUP_SQLITE),2)
139 LOOKUP_sqlite_INCLUDE = $(LOOKUP_SQLITE_INCLUDE)
140 LOOKUP_sqlite_LIBS = $(LOOKUP_SQLITE_LIBS)
142 ifneq ($(LOOKUP_SQLITE),)
147 ifeq ($(LOOKUP_TESTDB),2)
149 LOOKUP_testdb_INCLUDE = $(LOOKUP_TESTDB_INCLUDE)
150 LOOKUP_testdb_LIBS = $(LOOKUP_TESTDB_LIBS)
152 ifneq ($(LOOKUP_TESTDB),)
157 ifeq ($(LOOKUP_WHOSON),2)
159 LOOKUP_whoson_INCLUDE = $(LOOKUP_WHOSON_INCLUDE)
160 LOOKUP_whoson_LIBS = $(LOOKUP_WHOSON_LIBS)
162 ifneq ($(LOOKUP_WHOSON),)
168 all: lookups.a lf_quote.o lf_check_file.o lf_sqlperform.o $(MODS)
171 @$(RM_COMMAND) -f lookups.a
172 @echo "$(AR) lookups.a"
173 @$(AR) lookups.a $(OBJ)
177 .c.o:; @echo "$(CC) $*.c"
178 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) $*.c
180 .c.so:; @echo "$(CC) -shared $*.c"
181 $(FE)$(CC) $(LOOKUP_$*_INCLUDE) $(LOOKUP_$*_LIBS) -DDYNLOOKUP -shared -rdynamic $(CFLAGS) $(INCLUDE) $(DLFLAGS) $*.c -o $@
183 lf_check_file.o: $(HDRS) lf_check_file.c lf_functions.h
184 lf_quote.o: $(HDRS) lf_quote.c lf_functions.h
185 lf_sqlperform.o: $(HDRS) lf_sqlperform.c lf_functions.h
188 dbmdb.o: $(HDRS) dbmdb.c
189 dnsdb.o: $(HDRS) dnsdb.c
190 dsearch.o: $(HDRS) dsearch.c
191 ibase.o: $(HDRS) ibase.c
192 ldap.o: $(HDRS) ldap.c
193 lsearch.o: $(HDRS) lsearch.c
194 mysql.o: $(HDRS) mysql.c
196 nisplus.o: $(HDRS) nisplus.c
197 oracle.o: $(HDRS) oracle.c
198 passwd.o: $(HDRS) passwd.c
199 pgsql.o: $(HDRS) pgsql.c
201 sqlite.o: $(HDRS) sqlite.c
202 testdb.o: $(HDRS) testdb.c
203 whoson.o: $(HDRS) whoson.c
205 cdb.so: $(HDRS) cdb.c
206 dbmdb.so: $(HDRS) dbmdb.c
207 dnsdb.so: $(HDRS) dnsdb.c
208 dsearch.so: $(HDRS) dsearch.c
209 ibase.so: $(HDRS) ibase.c
210 ldap.so: $(HDRS) ldap.c
211 lsearch.so: $(HDRS) lsearch.c
212 mysql.so: $(HDRS) mysql.c
213 nis.so: $(HDRS) nis.c
214 nisplus.so: $(HDRS) nisplus.c
215 oracle.so: $(HDRS) oracle.c
216 passwd.so: $(HDRS) passwd.c
217 pgsql.so: $(HDRS) pgsql.c
218 spf.so: $(HDRS) spf.c
219 sqlite.so: $(HDRS) sqlite.c
220 testdb.so: $(HDRS) testdb.c
221 whoson.so: $(HDRS) whoson.c