RELDIR=lib\hdb
!include ../../windows/NTMakefile.w32
gen_files_hdb = \
$(OBJ)\asn1_Salt.x \
$(OBJ)\asn1_Key.x \
$(OBJ)\asn1_Event.x \
$(OBJ)\asn1_HDBFlags.x \
$(OBJ)\asn1_GENERATION.x \
$(OBJ)\asn1_HDB_Ext_PKINIT_acl.x \
$(OBJ)\asn1_HDB_Ext_PKINIT_cert.x \
$(OBJ)\asn1_HDB_Ext_PKINIT_hash.x \
$(OBJ)\asn1_HDB_Ext_Constrained_delegation_acl.x \
$(OBJ)\asn1_HDB_Ext_Lan_Manager_OWF.x \
$(OBJ)\asn1_HDB_Ext_Password.x \
$(OBJ)\asn1_HDB_Ext_Aliases.x \
$(OBJ)\asn1_HDB_extension.x \
$(OBJ)\asn1_HDB_extensions.x \
$(OBJ)\asn1_hdb_entry.x \
$(OBJ)\asn1_hdb_entry_alias.x \
$(OBJ)\asn1_hdb_keyset.x
$(gen_files_hdb) $(OBJ)\hdb_asn1.hx $(OBJ)\hdb_asn1-priv.hx: $(BINDIR)\asn1_compile.exe hdb.asn1
cd $(OBJ)
$(BINDIR)\asn1_compile.exe $(SRCDIR)\hdb.asn1 hdb_asn1
cd $(SRCDIR)
$(gen_files_hdb:.x=.c): $$(@R).x
!ifdef OPENLDAP_MODULE
ldap_dll = $(BINDIR)\hdb_ldap.dll
ldap_lib = $(LIBDIR)\hdb_ldap.lib
ldap_objs = $(OBJ)\hdb-ldap.obj
$(ldap_dll): $(ldap_objs)
$(DLLGUILINK) -implib:$(ldap_lib)
$(_VC_MANIFEST_EMBED_DLL)
$(_VC_MANIFEST_CLEAN)
$(_CODESIGN)
clean::
-$(RM) $(ldap_dll)
-$(RM) $(ldap_lib)
!else
ldap = $(OBJ)\hdb-ldap.obj
ldap_c = hdb-ldap.c
!endif
dist_libhdb_la_SOURCES = \
common.c \
db.c \
db3.c \
ext.c \
$(ldap_c) \
hdb.c \
hdb-sqlite.c \
hdb-keytab.c \
hdb-mitdb.c \
hdb_locl.h \
keys.c \
keytab.c \
dbinfo.c \
mkey.c \
ndbm.c \
print.c
libhdb_OBJs = \
$(OBJ)\common.obj \
$(OBJ)\db.obj \
$(OBJ)\db3.obj \
$(OBJ)\ext.obj \
$(ldap) \
$(OBJ)\hdb.obj \
$(OBJ)\hdb-sqlite.obj \
$(OBJ)\hdb-keytab.obj \
$(OBJ)\hdb-mitdb.obj \
$(OBJ)\keys.obj \
$(OBJ)\keytab.obj \
$(OBJ)\dbinfo.obj \
$(OBJ)\mkey.obj \
$(OBJ)\ndbm.obj \
$(OBJ)\print.obj \
$(gen_files_hdb:.x=.obj) \
$(OBJ)\hdb_err.obj
$(OBJ)\hdb_err.c $(OBJ)\hdb_err.h: hdb_err.et
cd $(OBJ)
$(BINDIR)\compile_et.exe $(SRCDIR)\hdb_err.et
cd $(SRCDIR)
$(OBJ)\hdb-protos.h: $(dist_libhdb_la_SOURCES)
$(PERL) ../../cf/make-proto.pl -q -P remove -o $@ $(dist_libhdb_la_SOURCES) \
|| $(RM) $@
$(OBJ)\hdb-private.h: $(dist_libhdb_la_SOURCES)
$(PERL) ../../cf/make-proto.pl -q -P remote -p $@ $(dist_libhdb_la_SOURCES) \
|| $(RM) $@
INCFILES= \
$(INCDIR)\hdb.h \
$(INCDIR)\hdb-protos.h \
$(OBJ)\hdb-private.h \
$(INCDIR)\hdb_err.h \
$(INCDIR)\hdb_asn1.h \
$(INCDIR)\hdb_asn1-priv.h
!ifndef STATICLIBS
$(LIBHDB): $(BINDIR)\libhdb.dll
$(BINDIR)\libhdb.dll: $(libhdb_OBJs) $(ldap_lib) $(LIBKRB5) $(LIBASN1) $(LIBSQLITE) $(LIBCOMERR) $(LIBROKEN)
$(DLLGUILINK) -def:libhdb-exports.def -implib:$(LIBHDB)
$(DLLPREP)
!else
$(LIBHDB): $(libhdb_OBJs) $(ldap_lib)
$(LIBCON)
!endif
all:: $(INCFILES) $(LIBHDB)
clean::
-$(RM) $(INCFILES)
-$(RM) $(LIBHDB)
test:: test-binaries test-run
test-binaries: $(OBJ)\test_dbinfo.exe $(OBJ)\test_hdbkeys.exe
$(OBJ)\test_dbinfo.exe: $(OBJ)\test_dbinfo.obj $(LIBHDB) $(LIBKRB5) $(LIBROKEN) $(LIBVERS)
$(EXECONLINK)
$(_VC_MANIFEST_EMBED_EXE)
$(OBJ)\test_hdbkeys.exe: $(OBJ)\test_hdbkeys.obj $(LIBHDB) $(LIBKRB5) $(LIBROKEN) $(LIBASN1) $(LIBVERS)
$(EXECONLINK)
$(_VC_MANIFEST_EMBED_EXE)
test-run:
cd $(OBJ)
test_dbinfo.exe
test_hdbkeys.exe
cd $(SRCDIR)
!ifdef OPENLDAP_INC
openldap_inc_flag=-I$(OPENLDAP_INC)
!else
openldap_inc_flag=
!endif
hdb_cflags=$(openldap_inc_flag) -I$(OBJ)
{}.c{$(OBJ)}.obj:
$(C2OBJ) $(hdb_cflags)
{$(OBJ)}.c{$(OBJ)}.obj:
$(C2OBJ) $(hdb_cflags)