use client-amel
[heimdal.git] / lib / hdb / Makefile.am
blob45d543f4f64dc04ad6b460363795fd7939a7dea9
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AM_CPPFLAGS += -I../asn1 -I$(srcdir)/../asn1 $(INCLUDE_hcrypto)
6 AM_CPPFLAGS += $(INCLUDE_openldap) -DHDB_DB_DIR=\"$(DIR_hdbdir)\"
7 AM_CPPFLAGS += -I$(srcdir)/../krb5
8 AM_CPPFLAGS += $(INCLUDE_sqlite3)
9 AM_CPPFLAGS += $(INCLUDE_libintl)
10 if HAVE_DBHEADER
11 AM_CPPFLAGS += -I$(DBHEADER)
12 endif
14 BUILT_SOURCES = \
15         $(gen_files_hdb:.x=.c)  \
16         hdb_err.c \
17         hdb_err.h
19 gen_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_extension.x \
33         asn1_HDB_extensions.x \
34         asn1_hdb_entry.x \
35         asn1_hdb_entry_alias.x \
36         asn1_hdb_keyset.x
38 CLEANFILES = $(BUILT_SOURCES) $(gen_files_hdb) \
39         hdb_asn1{,-priv}.h* hdb_asn1_files hdb_asn1-template.c*
41 LDADD = libhdb.la \
42         $(LIB_openldap) \
43         $(LIB_libintl) \
44         ../krb5/libkrb5.la \
45         ../asn1/libasn1.la \
46         $(LIB_hcrypto) \
47         $(LIB_roken) \
48         $(LIB_ldopen)
51 if OPENLDAP_MODULE
53 ldap_so = hdb_ldap.la
54 hdb_ldap_la_SOURCES = hdb-ldap.c
55 hdb_ldap_la_LDFLAGS = -module -avoid-version
56 hdb_ldap_la_LIBADD = $(LIB_openldap) libhdb.la
58 else
60 ldap = hdb-ldap.c
61 ldap_lib = $(LIB_openldap)
63 endif
66 lib_LTLIBRARIES = libhdb.la $(ldap_so)
67 libhdb_la_LDFLAGS = -version-info 11:0:2
69 if versionscript
70 libhdb_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
71 endif
73 noinst_PROGRAMS = test_dbinfo test_hdbkeys test_mkey
75 dist_libhdb_la_SOURCES =                        \
76         common.c                                \
77         db.c                                    \
78         db3.c                                   \
79         ext.c                                   \
80         $(ldap)                                 \
81         hdb.c                                   \
82         hdb-sqlite.c                            \
83         hdb-keytab.c                            \
84         hdb-mitdb.c                             \
85         hdb_locl.h                              \
86         hdb-private.h                           \
87         keys.c                                  \
88         keytab.c                                \
89         dbinfo.c                                \
90         mkey.c                                  \
91         ndbm.c                                  \
92         print.c
94 nodist_libhdb_la_SOURCES = $(BUILT_SOURCES)
96 include_HEADERS = hdb.h hdb-protos.h
97 nodist_include_HEADERS =  hdb_err.h hdb_asn1.h
99 libhdb_la_LIBADD = \
100         $(LIB_com_err) \
101         ../krb5/libkrb5.la \
102         ../asn1/libasn1.la \
103         $(LIB_sqlite3) \
104         $(LIBADD_roken) \
105         $(ldap_lib) \
106         $(LIB_dlopen) \
107         $(DBLIB) \
108         $(LIB_NDBM)
110 $(libhdb_la_OBJECTS): $(srcdir)/hdb-protos.h $(srcdir)/hdb-private.h
111 $(libhdb_la_OBJECTS): hdb_asn1.h hdb_asn1-priv.h hdb_err.h
113 $(srcdir)/hdb-protos.h:
114         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -o hdb-protos.h $(dist_libhdb_la_SOURCES) || rm -f hdb-protos.h
116 $(srcdir)/hdb-private.h:
117         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -p hdb-private.h $(dist_libhdb_la_SOURCES) || rm -f hdb-private.h
119 $(gen_files_hdb) hdb_asn1.hx hdb_asn1-priv.hx: hdb_asn1_files
121 hdb_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/hdb.asn1
122         $(ASN1_COMPILE) $(srcdir)/hdb.asn1 hdb_asn1
124 test_dbinfo_LIBS = libhdb.la
126 test_hdbkeys_LIBS = ../krb5/libkrb5.la libhdb.la
127 test_mkey_LIBS = $(test_hdbkeys_LIBS)
129 # to help stupid solaris make
131 hdb_err.h: hdb_err.et
133 EXTRA_DIST = \
134         hdb.asn1 \
135         hdb_err.et \
136         hdb.schema \
137         version-script.map \
138         data-mkey.mit.des3.le \
139         data-mkey.mit.des3.be