1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # - Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
13 # - Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in
15 # the documentation and/or other materials provided with the
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
34 !include ../../windows/NTMakefile.w32
40 $(OBJ)\asn1_HDBFlags.x \
41 $(OBJ)\asn1_GENERATION.x \
42 $(OBJ)\asn1_HDB_Ext_PKINIT_acl.x \
43 $(OBJ)\asn1_HDB_Ext_PKINIT_cert.x \
44 $(OBJ)\asn1_HDB_Ext_PKINIT_hash.x \
45 $(OBJ)\asn1_HDB_Ext_Constrained_delegation_acl.x \
46 $(OBJ)\asn1_HDB_Ext_Lan_Manager_OWF.x \
47 $(OBJ)\asn1_HDB_Ext_Password.x \
48 $(OBJ)\asn1_HDB_Ext_Aliases.x \
49 $(OBJ)\asn1_HDB_extension.x \
50 $(OBJ)\asn1_HDB_extensions.x \
51 $(OBJ)\asn1_hdb_entry.x \
52 $(OBJ)\asn1_hdb_entry_alias.x \
53 $(OBJ)\asn1_hdb_keyset.x
55 $(gen_files_hdb) $(OBJ)\hdb_asn1.hx $(OBJ)\hdb_asn1-priv.hx: $(BINDIR)\asn1_compile.exe hdb.asn1
57 $(BINDIR)\asn1_compile.exe $(SRCDIR)\hdb.asn1 hdb_asn1
60 $(gen_files_hdb:.x=.c): $$(@R).x
62 !ifdef OPENLDAP_MODULE
64 ldap_dll = $(BINDIR)\hdb_ldap.dll
65 ldap_lib = $(LIBDIR)\hdb_ldap.lib
66 ldap_objs = $(OBJ)\hdb-ldap.obj
68 $(ldap_dll): $(ldap_objs)
69 $(DLLGUILINK) -implib:$(ldap_lib)
78 ldap = $(OBJ)\hdb-ldap.obj
83 dist_libhdb_la_SOURCES = \
108 $(OBJ)\hdb-sqlite.obj \
109 $(OBJ)\hdb-keytab.obj \
110 $(OBJ)\hdb-mitdb.obj \
117 $(gen_files_hdb:.x=.obj) \
120 $(OBJ)\hdb_err.c $(OBJ)\hdb_err.h: hdb_err.et
122 $(BINDIR)\compile_et.exe $(SRCDIR)\hdb_err.et
125 $(OBJ)\hdb-protos.h: $(dist_libhdb_la_SOURCES)
126 $(PERL) ../../cf/make-proto.pl -q -P remove -o $@ $(dist_libhdb_la_SOURCES) \
129 $(OBJ)\hdb-private.h: $(dist_libhdb_la_SOURCES)
130 $(PERL) ../../cf/make-proto.pl -q -P remote -p $@ $(dist_libhdb_la_SOURCES) \
135 $(INCDIR)\hdb-protos.h \
136 $(OBJ)\hdb-private.h \
137 $(INCDIR)\hdb_err.h \
138 $(INCDIR)\hdb_asn1.h \
139 $(INCDIR)\hdb_asn1-priv.h
143 RES=$(OBJ)\libhdb-version.res
145 $(LIBHDB): $(BINDIR)\libhdb.dll
147 $(BINDIR)\libhdb.dll: $(libhdb_OBJs) $(ldap_lib) $(LIBHEIMDAL) $(LIBSQLITE) $(LIBCOMERR) $(LIBROKEN) $(RES)
148 $(DLLGUILINK) -def:libhdb-exports.def -implib:$(LIBHDB)
153 $(LIBHDB): $(libhdb_OBJs) $(ldap_lib)
158 all:: $(INCFILES) $(LIBHDB)
164 test:: test-binaries test-run
166 test-binaries: $(OBJ)\test_dbinfo.exe $(OBJ)\test_hdbkeys.exe
168 $(OBJ)\test_dbinfo.exe: $(OBJ)\test_dbinfo.obj $(LIBHDB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
172 $(OBJ)\test_hdbkeys.exe: $(OBJ)\test_hdbkeys.obj $(LIBHDB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
182 openldap_inc_flag=-I$(OPENLDAP_INC)
187 hdb_cflags=$(openldap_inc_flag) -I$(OBJ)
190 $(C2OBJ_P) $(hdb_cflags)
192 {$(OBJ)}.c{$(OBJ)}.obj::
193 $(C2OBJ_P) $(hdb_cflags)
196 $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libhdb-exports.def