]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - crypto/heimdal/lib/roken/Makefile.am
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / crypto / heimdal / lib / roken / Makefile.am
1 # $Id$
2
3 include $(top_srcdir)/Makefile.am.common
4
5 ACLOCAL_AMFLAGS = -I ../../cf
6
7 CLEANFILES = roken.h make-roken.c $(XHEADERS)
8
9 lib_LTLIBRARIES = libroken.la
10
11 libroken_la_LDFLAGS = -version-info 19:0:1
12 libroken_la_CPPFLAGS = -DBUILD_ROKEN_LIB
13
14 if versionscript
15 libroken_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
16 endif
17
18 AM_CPPFLAGS += $(libroken_la_CPPFLAGS)
19 if HAVE_DBHEADER
20 AM_CPPFLAGS += -I$(DBHEADER)
21 endif
22
23 noinst_PROGRAMS = snprintf-test resolve-test rkpty
24
25 check_PROGRAMS =                                \
26                 base64-test                     \
27                 getaddrinfo-test                \
28                 getifaddrs-test                 \
29                 hex-test                        \
30                 test-readenv                    \
31                 parse_bytes-test                \
32                 parse_reply-test                \
33                 parse_time-test                 \
34                 snprintf-test                   \
35                 strpftime-test                  \
36                 tsearch-test
37
38 TESTS = $(check_PROGRAMS)
39
40 LDADD = libroken.la
41 make_roken_LDADD = 
42
43 noinst_LTLIBRARIES = libtest.la
44 libtest_la_SOURCES = strftime.c strptime.c snprintf.c tsearch.c
45 libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME
46
47 parse_reply_test_SOURCES = parse_reply-test.c resolve.c
48 parse_reply_test_CFLAGS  = -DTEST_RESOLVE
49
50 test_readenv_SOURCES = test-readenv.c test-mem.c
51
52 rkpty_LDADD = $(LIB_openpty) $(LDADD)
53
54 parse_time_test_SOURCES = parse_time-test.c test-mem.c
55
56 strpftime_test_SOURCES  = strpftime-test.c strpftime-test.h
57 strpftime_test_LDADD = libtest.la $(LDADD)
58 strpftime_test_CFLAGS = -DTEST_STRPFTIME
59 snprintf_test_SOURCES   = snprintf-test.c
60 snprintf_test_LDADD = libtest.la $(LDADD)
61 snprintf_test_CFLAGS    = -DTEST_SNPRINTF
62 tsearch_test_SOURCES    = tsearch-test.c
63 tsearch_test_LDADD = libtest.la $(LDADD)
64 tsearch_test_CFLAGS     = -DTEST_TSEARCH
65
66 resolve_test_SOURCES = resolve-test.c
67
68 libroken_la_SOURCES =           \
69         base64.c                \
70         bswap.c                 \
71         concat.c                \
72         cloexec.c               \
73         ct.c                    \
74         doxygen.c               \
75         dumpdata.c              \
76         environment.c           \
77         eread.c                 \
78         esetenv.c               \
79         ewrite.c                \
80         getaddrinfo_hostspec.c  \
81         get_default_username.c  \
82         get_window_size.c       \
83         getarg.c                \
84         getnameinfo_verified.c  \
85         getprogname.c           \
86         h_errno.c               \
87         hex.c                   \
88         hostent_find_fqdn.c     \
89         issuid.c                \
90         k_getpwnam.c            \
91         k_getpwuid.c            \
92         mini_inetd.c            \
93         net_read.c              \
94         net_write.c             \
95         parse_bytes.c           \
96         parse_time.c            \
97         parse_units.c           \
98         qsort.c                 \
99         rand.c                  \
100         realloc.c               \
101         resolve.c               \
102         roken_gethostby.c       \
103         rtbl.c                  \
104         rtbl.h                  \
105         setprogname.c           \
106         signal.c                \
107         simple_exec.c           \
108         snprintf.c              \
109         socket.c                \
110         strcollect.c            \
111         strerror_r.c            \
112         strpool.c               \
113         timeval.c               \
114         tm2time.c               \
115         unvis.c                 \
116         verify.c                \
117         vis.c                   \
118         warnerr.c               \
119         write_pid.c             \
120         xfree.c                 \
121         xdbm.h
122
123 EXTRA_libroken_la_SOURCES =     \
124         err.hin                 \
125         glob.hin                \
126         fnmatch.hin             \
127         ifaddrs.hin             \
128         search.hin              \
129         vis.hin 
130
131 libroken_la_LIBADD = @LTLIBOBJS@ $(LIB_crypt)
132
133 $(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS)
134
135 BUILT_SOURCES = roken.h
136
137 if have_err_h
138 err_h =
139 else
140 err_h = err.h
141 endif
142
143 if have_fnmatch_h
144 fnmatch_h =
145 else
146 fnmatch_h = fnmatch.h
147 endif
148
149 if have_glob_h
150 glob_h =
151 else
152 glob_h = glob.h
153 endif
154
155 if have_ifaddrs_h
156 ifaddrs_h =
157 else
158 ifaddrs_h = ifaddrs.h
159 endif
160
161 if have_search_h
162 search_h = 
163 else
164 search_h = search.h
165 endif
166
167 if have_vis_h
168 vis_h = 
169 else
170 vis_h = vis.h
171 endif
172
173 ## these are controlled by configure
174 XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(search_h) $(vis_h)
175 CLEANFILES += err.h fnmatch.h glob.h ifaddrs.h search.h vis.h
176
177 dist_include_HEADERS =                          \
178         base64.h                                \
179         getarg.h                                \
180         hex.h                                   \
181         parse_bytes.h                           \
182         parse_time.h                            \
183         parse_units.h                           \
184         resolve.h                               \
185         roken-common.h                          \
186         rtbl.h                                  \
187         xdbm.h
188
189 if have_socket_wrapper
190 libroken_la_SOURCES += socket_wrapper.c socket_wrapper.h
191 dist_include_HEADERS += socket_wrapper.h
192 endif
193
194 build_HEADERZ = test-mem.h $(XHEADERS)
195
196 nodist_include_HEADERS = roken.h
197 rokenincludedir = $(includedir)/roken
198 nodist_rokeninclude_HEADERS = $(XHEADERS)
199
200 man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3
201
202 SUFFIXES += .hin
203 .hin.h:
204         cp $< $@
205
206 # Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works
207 if !CROSS_COMPILE
208
209 noinst_PROGRAMS += make-roken
210 BUILT_SOURCES += make-roken.c
211
212 nodist_make_roken_SOURCES = make-roken.c
213
214 roken.h: make-roken$(EXEEXT)
215         @./make-roken$(EXEEXT) > tmp.h ;\
216         if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
217         else rm -f roken.h; mv tmp.h roken.h; fi
218
219 make-roken.c: roken.h.in roken.awk
220         $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
221
222 else
223
224 roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in
225         perl $(top_srcdir)/cf/roken-h-process.pl \
226         -c $(top_builddir)/include/config.h  \
227         -p $(srcdir)/roken.h.in -o roken.h
228
229 endif
230
231
232 EXTRA_DIST = \
233         NTMakefile \
234         roken.awk roken.h.in \
235         $(man_MANS) \
236         test-mem.h \
237         ndbm_wrap.c \
238         ndbm_wrap.h \
239         version-script.map