Use hdb_db_dir().
[heimdal.git] / lib / hdb / Makefile.am
blob3a55c0f632d6857d94f219cefb71de2a32aa901a
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AM_CPPFLAGS += -I../asn1 -I$(srcdir)/../asn1 $(INCLUDE_hcrypto)
7 BUILT_SOURCES = \
8         $(gen_files_hdb:.x=.c)  \
9         hdb_err.c \
10         hdb_err.h
12 gen_files_hdb = \
13         asn1_Salt.x \
14         asn1_Key.x \
15         asn1_Event.x \
16         asn1_HDBFlags.x \
17         asn1_GENERATION.x \
18         asn1_HDB_Ext_PKINIT_acl.x \
19         asn1_HDB_Ext_PKINIT_hash.x \
20         asn1_HDB_Ext_Constrained_delegation_acl.x \
21         asn1_HDB_Ext_Lan_Manager_OWF.x \
22         asn1_HDB_Ext_Password.x \
23         asn1_HDB_Ext_Aliases.x \
24         asn1_HDB_extension.x \
25         asn1_HDB_extensions.x \
26         asn1_hdb_entry.x \
27         asn1_hdb_entry_alias.x
29 CLEANFILES = $(BUILT_SOURCES) $(gen_files_hdb) hdb_asn1.h hdb_asn1_files
31 LDADD = libhdb.la \
32         $(LIB_openldap) \
33         ../krb5/libkrb5.la \
34         ../asn1/libasn1.la \
35         $(LIB_hcrypto) \
36         $(LIB_roken) \
37         $(LIB_ldopen)
39 if OPENLDAP_MODULE
41 ldap_so = hdb_ldap.la
42 hdb_ldap_la_SOURCES = hdb-ldap.c
43 hdb_ldap_la_LDFLAGS = -module
45 else
47 ldap = hdb-ldap.c
49 endif
52 lib_LTLIBRARIES = libhdb.la $(ldap_so)
53 libhdb_la_LDFLAGS = -version-info 11:0:2
55 noinst_PROGRAMS = test_dbinfo
57 dist_libhdb_la_SOURCES =                        \
58         common.c                                \
59         db.c                                    \
60         db3.c                                   \
61         ext.c                                   \
62         $(ldap)                                 \
63         hdb.c                                   \
64         hdb_locl.h                              \
65         hdb-private.h                           \
66         keys.c                                  \
67         keytab.c                                \
68         dbinfo.c                                \
69         mkey.c                                  \
70         ndbm.c                                  \
71         print.c
73 nodist_libhdb_la_SOURCES = $(BUILT_SOURCES)
75 AM_CPPFLAGS += $(INCLUDE_openldap)
77 include_HEADERS = hdb.h hdb-protos.h
78 nodist_include_HEADERS =  hdb_err.h hdb_asn1.h
80 libhdb_la_CPPFLAGS = -DHDB_DB_DIR=\"$(DIR_hdbdir)\"
82 libhdb_la_LIBADD = \
83         $(LIB_com_err) \
84         ../krb5/libkrb5.la \
85         ../asn1/libasn1.la \
86         $(LIBADD_roken) \
87         $(LIB_openldap) \
88         $(LIB_dlopen) \
89         $(DBLIB) \
90         $(LIB_NDBM)
92 $(libhdb_la_OBJECTS): $(srcdir)/hdb-protos.h $(srcdir)/hdb-private.h
94 CHECK_SYMBOLS = -lib hdb -asn1compile -com_err \
95         hdb_ _hdb HDBFlags2int initialize_hdb_error_table
97 $(srcdir)/hdb-protos.h:
98         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -o hdb-protos.h $(dist_libhdb_la_SOURCES) || rm -f hdb-protos.h
100 $(srcdir)/hdb-private.h:
101         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -p hdb-private.h $(dist_libhdb_la_SOURCES) || rm -f hdb-private.h
103 $(gen_files_hdb) hdb_asn1.h: hdb_asn1_files
105 hdb_asn1_files: ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1
106         ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1 hdb_asn1
108 $(libhdb_la_OBJECTS): hdb_asn1.h hdb_err.h
110 test_dbinfo_SOURCES = test_dbinfo.c
112 test_dbinfo_LIBS = libhdb.la
114 # to help stupid solaris make
116 hdb_err.h: hdb_err.et
118 EXTRA_DIST = hdb.asn1 hdb_err.et hdb.schema