s4:heimdal: import lorikeet-heimdal-202201172009 (commit 5a0b45cd723628b3690ea848548b...
[samba.git] / source4 / heimdal / lib / base / Makefile.am
1
2 include $(top_srcdir)/Makefile.am.common
3
4 if do_roken_rename
5 ES = base64.c
6 endif
7
8 IMPLEMENT_TLS=
9 if MAINTAINER_MODE
10 IMPLEMENT_TLS += dll.c
11 AM_CPPFLAGS += -DHEIM_BASE_MAINTAINER
12 endif
13
14 AM_CPPFLAGS += $(ROKEN_RENAME) -I../com_err -I$(srcdir)/../com_err
15
16 lib_LTLIBRARIES = libheimbase.la
17 check_PROGRAMS = test_base
18
19 libheimbase_la_LDFLAGS = -version-info 1:0:0
20
21 if FRAMEWORK_COREFOUNDATION
22 libheimbase_la_LDFLAGS += -framework CoreFoundation
23 endif
24
25 TESTS = test_base
26
27 if versionscript
28 libheimbase_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
29 endif
30
31 libheimbase_la_LIBADD = $(PTHREAD_LIBADD) $(LIB_dlopen) $(LIB_com_err)
32
33 include_HEADERS = heimbase.h common_plugin.h heimbase-atomics.h heimbase-svc.h
34
35 ERR_FILES = heim_err.c
36
37 dist_libheimbase_la_SOURCES =   \
38         array.c                 \
39         baselocl.h              \
40         bsearch.c               \
41         bool.c                  \
42         common_plugin.h         \
43         config_file.c           \
44         context.c               \
45         data.c                  \
46         db.c                    \
47         dict.c                  \
48         $(IMPLEMENT_TLS)        \
49         error.c                 \
50         error_string.c          \
51         expand_path.c           \
52         heimbase.c              \
53         heimbasepriv.h          \
54         json.c                  \
55         log.c                   \
56         null.c                  \
57         number.c                \
58         plugin.c                \
59         roken_rename.h          \
60         string.c                \
61         warn.c
62
63 nodist_libheimbase_la_SOURCES = $(ES) $(ERR_FILES)
64
65 $(libheimbase_la_OBJECTS): $(srcdir)/heimbase-protos.h heim_err.h
66
67 $(srcdir)/heimbase-protos.h: $(dist_libheimbase_la_SOURCES)
68         cd $(srcdir) && \
69             perl ../../cf/make-proto.pl -q -P comment -o heimbase-protos.h $(dist_libheimbase_la_SOURCES) || \
70             rm -f heimbase-protos.h
71
72 $(srcdir)/heimbase-private.h: $(dist_libheimbase_la_SOURCES)
73         cd $(srcdir) && \
74             perl ../../cf/make-proto.pl -q -P comment -p heimbase-private.h $(dist_libheimbase_la_SOURCES) || \
75             rm -f heimbase-private.h
76
77 # install these?
78
79 libheimbase_la_DEPENDENCIES = version-script.map
80
81 test_base_LDADD = libheimbase.la $(LIB_roken)
82
83 CLEANFILES = base64.c test_db.json heim_err.c heim_err.h
84
85 EXTRA_DIST = NTMakefile version-script.map config_reg.c heim_err.et
86
87 dist_include_HEADERS = heimbase-protos.h
88
89 nodist_include_HEADERS = heim_err.h
90
91 heim_err.h: heim_err.et
92
93 base64.c:
94         rm -f base64.c
95         $(LN_S) $(srcdir)/../roken/base64.c .