1# Id 2 3include $(top_srcdir)/Makefile.am.common 4 5AM_CPPFLAGS += -I../asn1 -I$(srcdir)/../asn1 6AM_CPPFLAGS += $(INCLUDE_openldap) -DHDB_DB_DIR=\"$(DIR_hdbdir)\" 7AM_CPPFLAGS += -I$(srcdir)/../krb5 8AM_CPPFLAGS += $(INCLUDE_sqlite3) 9AM_CPPFLAGS += $(INCLUDE_libintl) 10if HAVE_DBHEADER 11AM_CPPFLAGS += -I$(DBHEADER) 12endif 13 14BUILT_SOURCES = \ 15 $(gen_files_hdb:.x=.c) \ 16 hdb_err.c \ 17 hdb_err.h 18 19gen_files_hdb = \ 20 asn1_Salt.x \ 21 asn1_Key.x \ 22 asn1_Event.x \ 23 asn1_HDBFlags.x \ 24 asn1_GENERATION.x \ 25 asn1_HDB_Ext_PKINIT_acl.x \ 26 asn1_HDB_Ext_PKINIT_cert.x \ 27 asn1_HDB_Ext_PKINIT_hash.x \ 28 asn1_HDB_Ext_Constrained_delegation_acl.x \ 29 asn1_HDB_Ext_Lan_Manager_OWF.x \ 30 asn1_HDB_Ext_Password.x \ 31 asn1_HDB_Ext_Aliases.x \ 32 asn1_HDB_Ext_KeySet.x \ 33 asn1_HDB_extension.x \ 34 asn1_HDB_extensions.x \ 35 asn1_hdb_entry.x \ 36 asn1_hdb_entry_alias.x \ 37 asn1_hdb_keyset.x \ 38 asn1_Keys.x 39 40CLEANFILES = $(BUILT_SOURCES) $(gen_files_hdb) \ 41 hdb_asn1{,-priv}.h* hdb_asn1_files hdb_asn1-template.[cx] 42 43LDADD = libhdb.la \ 44 ../krb5/libkrb5.la \ 45 ../asn1/libasn1.la \ 46 $(LIB_hcrypto) \ 47 $(LIB_roken) \ 48 $(LIB_openldap) \ 49 $(LIB_libintl) \ 50 $(LIB_ldopen) 51 52 53if OPENLDAP_MODULE 54 55ldap_so = hdb_ldap.la 56hdb_ldap_la_SOURCES = hdb-ldap.c 57hdb_ldap_la_LDFLAGS = -module -avoid-version 58hdb_ldap_la_LIBADD = $(LIB_openldap) libhdb.la 59 60else 61 62ldap = hdb-ldap.c 63ldap_lib = $(LIB_openldap) 64 65endif 66 67 68lib_LTLIBRARIES = libhdb.la $(ldap_so) 69libhdb_la_LDFLAGS = -version-info 11:0:2 70 71if versionscript 72libhdb_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map 73endif 74 75noinst_PROGRAMS = test_dbinfo test_hdbkeys test_mkey test_hdbplugin 76 77dist_libhdb_la_SOURCES = \ 78 common.c \ 79 db.c \ 80 db3.c \ 81 ext.c \ 82 $(ldap) \ 83 hdb.c \ 84 hdb-sqlite.c \ 85 hdb-keytab.c \ 86 hdb-mdb.c \ 87 hdb-mitdb.c \ 88 hdb_locl.h \ 89 keys.c \ 90 keytab.c \ 91 dbinfo.c \ 92 mkey.c \ 93 ndbm.c \ 94 print.c 95 96nodist_libhdb_la_SOURCES = $(BUILT_SOURCES) 97 98libhdb_la_DEPENDENCIES = version-script.map 99 100include_HEADERS = hdb.h $(srcdir)/hdb-protos.h 101nodist_include_HEADERS = hdb_err.h hdb_asn1.h 102 103noinst_HEADERS = $(srcdir)/hdb-private.h 104 105libhdb_la_LIBADD = \ 106 $(LIB_com_err) \ 107 ../krb5/libkrb5.la \ 108 ../asn1/libasn1.la \ 109 $(LIB_sqlite3) \ 110 $(LIBADD_roken) \ 111 $(ldap_lib) \ 112 $(LIB_dlopen) \ 113 $(DB3LIB) $(DB1LIB) $(LMDBLIB) $(NDBMLIB) 114 115HDB_PROTOS = $(srcdir)/hdb-protos.h $(srcdir)/hdb-private.h 116 117ALL_OBJECTS = $(libhdb_la_OBJECTS) 118ALL_OBJECTS += $(test_dbinfo_OBJECTS) 119ALL_OBJECTS += $(test_hdbkeys_OBJECTS) 120ALL_OBJECTS += $(test_mkey_OBJECTS) 121ALL_OBJECTS += $(test_hdbplugin_OBJECTS) 122 123$(ALL_OBJECTS): $(HDB_PROTOS) hdb_asn1.h hdb_asn1-priv.h hdb_err.h 124 125$(srcdir)/hdb-protos.h: $(dist_libhdb_la_SOURCES) 126 cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -o hdb-protos.h $(dist_libhdb_la_SOURCES) || rm -f hdb-protos.h 127 128$(srcdir)/hdb-private.h: $(dist_libhdb_la_SOURCES) 129 cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -p hdb-private.h $(dist_libhdb_la_SOURCES) || rm -f hdb-private.h 130 131$(gen_files_hdb) hdb_asn1.hx hdb_asn1-priv.hx: hdb_asn1_files 132 133hdb_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/hdb.asn1 134 $(ASN1_COMPILE) --sequence=HDB-Ext-KeySet --sequence=Keys $(srcdir)/hdb.asn1 hdb_asn1 135 136test_dbinfo_LIBS = libhdb.la 137 138test_hdbkeys_LIBS = ../krb5/libkrb5.la libhdb.la 139test_mkey_LIBS = $(test_hdbkeys_LIBS) 140test_hdbplugin_LIBS = $(test_hdbkeys_LIBS) 141 142# to help stupid solaris make 143 144hdb_err.h: hdb_err.et 145 146EXTRA_DIST = \ 147 NTMakefile \ 148 libhdb-version.rc \ 149 libhdb-exports.def \ 150 hdb.asn1 \ 151 hdb_err.et \ 152 hdb.schema \ 153 version-script.map \ 154 data-mkey.mit.des3.le \ 155 data-mkey.mit.des3.be 156