SQLite3 backend from Pontus Walck and Stockholm Univerity.
[heimdal.git] / lib / hdb / Makefile.am
blob563495292c67d9d02c41caf757efac9bb3716214
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)
10 BUILT_SOURCES = \
11         $(gen_files_hdb:.x=.c)  \
12         hdb_err.c \
13         hdb_err.h
15 gen_files_hdb = \
16         asn1_Salt.x \
17         asn1_Key.x \
18         asn1_Event.x \
19         asn1_HDBFlags.x \
20         asn1_GENERATION.x \
21         asn1_HDB_Ext_PKINIT_acl.x \
22         asn1_HDB_Ext_PKINIT_cert.x \
23         asn1_HDB_Ext_PKINIT_hash.x \
24         asn1_HDB_Ext_Constrained_delegation_acl.x \
25         asn1_HDB_Ext_Lan_Manager_OWF.x \
26         asn1_HDB_Ext_Password.x \
27         asn1_HDB_Ext_Aliases.x \
28         asn1_HDB_extension.x \
29         asn1_HDB_extensions.x \
30         asn1_hdb_entry.x \
31         asn1_hdb_entry_alias.x \
32         asn1_hdb_keyset.x
34 CLEANFILES = $(BUILT_SOURCES) $(gen_files_hdb) hdb_asn1.h hdb_asn1_files
36 LDADD = libhdb.la \
37         $(LIB_openldap) \
38         ../krb5/libkrb5.la \
39         ../asn1/libasn1.la \
40         $(LIB_hcrypto) \
41         $(LIB_roken) \
42         $(LIB_ldopen)
45 if OPENLDAP_MODULE
47 ldap_so = hdb_ldap.la
48 hdb_ldap_la_SOURCES = hdb-ldap.c
49 hdb_ldap_la_LDFLAGS = -module
51 else
53 ldap = hdb-ldap.c
55 endif
58 lib_LTLIBRARIES = libhdb.la $(ldap_so)
59 libhdb_la_LDFLAGS = -version-info 11:0:2
61 if versionscript
62 libhdb_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
63 endif
65 noinst_PROGRAMS = test_dbinfo test_hdbkeys
67 dist_libhdb_la_SOURCES =                        \
68         common.c                                \
69         db.c                                    \
70         db3.c                                   \
71         ext.c                                   \
72         $(ldap)                                 \
73         hdb.c                                   \
74         hdb-sqlite.c                            \
75         hdb_locl.h                              \
76         hdb-private.h                           \
77         keys.c                                  \
78         keytab.c                                \
79         dbinfo.c                                \
80         mkey.c                                  \
81         ndbm.c                                  \
82         print.c
84 nodist_libhdb_la_SOURCES = $(BUILT_SOURCES)
86 include_HEADERS = hdb.h hdb-protos.h
87 nodist_include_HEADERS =  hdb_err.h hdb_asn1.h
89 libhdb_la_LIBADD = \
90         $(LIB_com_err) \
91         ../krb5/libkrb5.la \
92         ../asn1/libasn1.la \
93         $(LIB_sqlite3) \
94         $(LIBADD_roken) \
95         $(LIB_openldap) \
96         $(LIB_dlopen) \
97         $(DBLIB) \
98         $(LIB_NDBM)
100 $(libhdb_la_OBJECTS): $(srcdir)/hdb-protos.h $(srcdir)/hdb-private.h
101 $(libhdb_la_OBJECTS): hdb_asn1.h
103 $(srcdir)/hdb-protos.h:
104         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -o hdb-protos.h $(dist_libhdb_la_SOURCES) || rm -f hdb-protos.h
106 $(srcdir)/hdb-private.h:
107         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -p hdb-private.h $(dist_libhdb_la_SOURCES) || rm -f hdb-private.h
109 $(gen_files_hdb) hdb_asn1.h: hdb_asn1_files
111 hdb_asn1_files: ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1
112         ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1 hdb_asn1
114 $(libhdb_la_OBJECTS): hdb_asn1.h hdb_err.h
116 test_dbinfo_LIBS = libhdb.la
118 test_hdbkeys_LIBS = ../krb5/libkrb5.la libhdb.la
120 # to help stupid solaris make
122 hdb_err.h: hdb_err.et
124 EXTRA_DIST = hdb.asn1 hdb_err.et hdb.schema version-script.map