More includes.
[heimdal.git] / lib / hdb / Makefile.am
blob6a11f6b48ce1c7987b7fc860fa913f29ddb79214
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)\"
8 BUILT_SOURCES = \
9         $(gen_files_hdb:.x=.c)  \
10         hdb_err.c \
11         hdb_err.h
13 gen_files_hdb = \
14         asn1_Salt.x \
15         asn1_Key.x \
16         asn1_Event.x \
17         asn1_HDBFlags.x \
18         asn1_GENERATION.x \
19         asn1_HDB_Ext_PKINIT_acl.x \
20         asn1_HDB_Ext_PKINIT_hash.x \
21         asn1_HDB_Ext_Constrained_delegation_acl.x \
22         asn1_HDB_Ext_Lan_Manager_OWF.x \
23         asn1_HDB_Ext_Password.x \
24         asn1_HDB_Ext_Aliases.x \
25         asn1_HDB_extension.x \
26         asn1_HDB_extensions.x \
27         asn1_hdb_entry.x \
28         asn1_hdb_entry_alias.x
30 CLEANFILES = $(BUILT_SOURCES) $(gen_files_hdb) hdb_asn1.h hdb_asn1_files
32 LDADD = libhdb.la \
33         $(LIB_openldap) \
34         ../krb5/libkrb5.la \
35         ../asn1/libasn1.la \
36         $(LIB_hcrypto) \
37         $(LIB_roken) \
38         $(LIB_ldopen)
41 if OPENLDAP_MODULE
43 ldap_so = hdb_ldap.la
44 hdb_ldap_la_SOURCES = hdb-ldap.c
45 hdb_ldap_la_LDFLAGS = -module
47 else
49 ldap = hdb-ldap.c
51 endif
54 lib_LTLIBRARIES = libhdb.la $(ldap_so)
55 libhdb_la_LDFLAGS = -version-info 11:0:2
57 noinst_PROGRAMS = test_dbinfo
59 dist_libhdb_la_SOURCES =                        \
60         common.c                                \
61         db.c                                    \
62         db3.c                                   \
63         ext.c                                   \
64         $(ldap)                                 \
65         hdb.c                                   \
66         hdb_locl.h                              \
67         hdb-private.h                           \
68         keys.c                                  \
69         keytab.c                                \
70         dbinfo.c                                \
71         mkey.c                                  \
72         ndbm.c                                  \
73         print.c
75 nodist_libhdb_la_SOURCES = $(BUILT_SOURCES)
77 include_HEADERS = hdb.h hdb-protos.h
78 nodist_include_HEADERS =  hdb_err.h hdb_asn1.h
80 libhdb_la_LIBADD = \
81         $(LIB_com_err) \
82         ../krb5/libkrb5.la \
83         ../asn1/libasn1.la \
84         $(LIBADD_roken) \
85         $(LIB_openldap) \
86         $(LIB_dlopen) \
87         $(DBLIB) \
88         $(LIB_NDBM)
90 $(libhdb_la_OBJECTS): $(srcdir)/hdb-protos.h $(srcdir)/hdb-private.h
92 $(srcdir)/hdb-protos.h:
93         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -o hdb-protos.h $(dist_libhdb_la_SOURCES) || rm -f hdb-protos.h
95 $(srcdir)/hdb-private.h:
96         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -p hdb-private.h $(dist_libhdb_la_SOURCES) || rm -f hdb-private.h
98 $(gen_files_hdb) hdb_asn1.h: hdb_asn1_files
100 hdb_asn1_files: ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1
101         ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1 hdb_asn1
103 $(libhdb_la_OBJECTS): hdb_asn1.h hdb_err.h
105 test_dbinfo_SOURCES = test_dbinfo.c
107 test_dbinfo_LIBS = libhdb.la
109 # to help stupid solaris make
111 hdb_err.h: hdb_err.et
113 EXTRA_DIST = hdb.asn1 hdb_err.et hdb.schema