hdb_asn1.h
[heimdal.git] / lib / hdb / Makefile.am
blobf9c0f299d353b25f66ecc8cdd5fbe04765d2aa8f
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
9 BUILT_SOURCES = \
10         $(gen_files_hdb:.x=.c)  \
11         hdb_err.c \
12         hdb_err.h
14 gen_files_hdb = \
15         asn1_Salt.x \
16         asn1_Key.x \
17         asn1_Event.x \
18         asn1_HDBFlags.x \
19         asn1_GENERATION.x \
20         asn1_HDB_Ext_PKINIT_acl.x \
21         asn1_HDB_Ext_PKINIT_cert.x \
22         asn1_HDB_Ext_PKINIT_hash.x \
23         asn1_HDB_Ext_Constrained_delegation_acl.x \
24         asn1_HDB_Ext_Lan_Manager_OWF.x \
25         asn1_HDB_Ext_Password.x \
26         asn1_HDB_Ext_Aliases.x \
27         asn1_HDB_extension.x \
28         asn1_HDB_extensions.x \
29         asn1_hdb_entry.x \
30         asn1_hdb_entry_alias.x \
31         asn1_hdb_keyset.x
33 CLEANFILES = $(BUILT_SOURCES) $(gen_files_hdb) hdb_asn1.h hdb_asn1_files
35 LDADD = libhdb.la \
36         $(LIB_openldap) \
37         ../krb5/libkrb5.la \
38         ../asn1/libasn1.la \
39         $(LIB_hcrypto) \
40         $(LIB_roken) \
41         $(LIB_ldopen)
44 if OPENLDAP_MODULE
46 ldap_so = hdb_ldap.la
47 hdb_ldap_la_SOURCES = hdb-ldap.c
48 hdb_ldap_la_LDFLAGS = -module
50 else
52 ldap = hdb-ldap.c
54 endif
57 lib_LTLIBRARIES = libhdb.la $(ldap_so)
58 libhdb_la_LDFLAGS = -version-info 11:0:2
60 if versionscript
61 libhdb_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
62 endif
64 noinst_PROGRAMS = test_dbinfo test_hdbkeys
66 dist_libhdb_la_SOURCES =                        \
67         common.c                                \
68         db.c                                    \
69         db3.c                                   \
70         ext.c                                   \
71         $(ldap)                                 \
72         hdb.c                                   \
73         hdb_locl.h                              \
74         hdb-private.h                           \
75         keys.c                                  \
76         keytab.c                                \
77         dbinfo.c                                \
78         mkey.c                                  \
79         ndbm.c                                  \
80         print.c
82 nodist_libhdb_la_SOURCES = $(BUILT_SOURCES)
84 include_HEADERS = hdb.h hdb-protos.h
85 nodist_include_HEADERS =  hdb_err.h hdb_asn1.h
87 libhdb_la_LIBADD = \
88         $(LIB_com_err) \
89         ../krb5/libkrb5.la \
90         ../asn1/libasn1.la \
91         $(LIBADD_roken) \
92         $(LIB_openldap) \
93         $(LIB_dlopen) \
94         $(DBLIB) \
95         $(LIB_NDBM)
97 $(libhdb_la_OBJECTS): $(srcdir)/hdb-protos.h $(srcdir)/hdb-private.h
98 $(libhdb_la_OBJECTS): hdb_asn1.h
100 $(srcdir)/hdb-protos.h:
101         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -o hdb-protos.h $(dist_libhdb_la_SOURCES) || rm -f hdb-protos.h
103 $(srcdir)/hdb-private.h:
104         cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -p hdb-private.h $(dist_libhdb_la_SOURCES) || rm -f hdb-private.h
106 $(gen_files_hdb) hdb_asn1.h: hdb_asn1_files
108 hdb_asn1_files: ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1
109         ../asn1/asn1_compile$(EXEEXT) $(srcdir)/hdb.asn1 hdb_asn1
111 $(libhdb_la_OBJECTS): hdb_asn1.h hdb_err.h
113 test_dbinfo_LIBS = libhdb.la
115 test_hdbkeys_LIBS = ../krb5/libkrb5.la libhdb.la
117 # to help stupid solaris make
119 hdb_err.h: hdb_err.et
121 EXTRA_DIST = hdb.asn1 hdb_err.et hdb.schema version-script.map