Windows: Enable weak crypto by default
[heimdal.git] / lib / roken / Makefile.am
blob7e521842a63b575d0c23e337c4d6b0ce13996fb1
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 ACLOCAL_AMFLAGS = -I ../../cf
7 CLEANFILES = roken.h make-roken.c $(XHEADERS)
9 lib_LTLIBRARIES = libroken.la
11 libroken_la_LDFLAGS = -version-info 19:0:1
12 libroken_la_CPPFLAGS = -DBUILD_ROKEN_LIB
14 if versionscript
15 libroken_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
16 endif
18 AM_CPPFLAGS += $(libroken_la_CPPFLAGS)
19 if HAVE_DBHEADER
20 AM_CPPFLAGS += -I$(DBHEADER)
21 endif
23 noinst_PROGRAMS = snprintf-test resolve-test rkpty
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
37 TESTS = $(check_PROGRAMS)
39 LDADD = libroken.la
40 make_roken_LDADD = 
42 noinst_LTLIBRARIES = libtest.la
43 libtest_la_SOURCES = strftime.c strptime.c snprintf.c
44 libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME
46 parse_reply_test_SOURCES = parse_reply-test.c resolve.c
47 parse_reply_test_CFLAGS  = -DTEST_RESOLVE
49 test_readenv_SOURCES = test-readenv.c test-mem.c
51 rkpty_LDADD = $(LIB_openpty) $(LDADD)
53 parse_time_test_SOURCES = parse_time-test.c test-mem.c
55 strpftime_test_SOURCES  = strpftime-test.c strpftime-test.h
56 strpftime_test_LDADD = libtest.la $(LDADD)
57 strpftime_test_CFLAGS = -DTEST_STRPFTIME
58 snprintf_test_SOURCES   = snprintf-test.c
59 snprintf_test_LDADD = libtest.la $(LDADD)
60 snprintf_test_CFLAGS    = -DTEST_SNPRINTF
62 resolve_test_SOURCES = resolve-test.c
64 libroken_la_SOURCES =           \
65         base64.c                \
66         bswap.c                 \
67         concat.c                \
68         cloexec.c               \
69         ct.c                    \
70         doxygen.c               \
71         dumpdata.c              \
72         environment.c           \
73         eread.c                 \
74         esetenv.c               \
75         ewrite.c                \
76         getaddrinfo_hostspec.c  \
77         get_default_username.c  \
78         get_window_size.c       \
79         getarg.c                \
80         getnameinfo_verified.c  \
81         getprogname.c           \
82         h_errno.c               \
83         hex.c                   \
84         hostent_find_fqdn.c     \
85         issuid.c                \
86         k_getpwnam.c            \
87         k_getpwuid.c            \
88         mini_inetd.c            \
89         net_read.c              \
90         net_write.c             \
91         parse_bytes.c           \
92         parse_time.c            \
93         parse_units.c           \
94         qsort.c                 \
95         realloc.c               \
96         resolve.c               \
97         roken_gethostby.c       \
98         rtbl.c                  \
99         rtbl.h                  \
100         setprogname.c           \
101         signal.c                \
102         simple_exec.c           \
103         snprintf.c              \
104         socket.c                \
105         strcollect.c            \
106         strerror_r.c            \
107         strpool.c               \
108         timeval.c               \
109         tm2time.c               \
110         unvis.c                 \
111         verify.c                \
112         vis.c                   \
113         warnerr.c               \
114         write_pid.c             \
115         xfree.c                 \
116         xdbm.h
118 EXTRA_libroken_la_SOURCES =     \
119         err.hin                 \
120         glob.hin                \
121         fnmatch.hin             \
122         ifaddrs.hin             \
123         vis.hin 
125 libroken_la_LIBADD = @LTLIBOBJS@ $(LIB_crypt)
127 $(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS)
129 BUILT_SOURCES = roken.h
131 if have_err_h
132 err_h =
133 else
134 err_h = err.h
135 endif
137 if have_fnmatch_h
138 fnmatch_h =
139 else
140 fnmatch_h = fnmatch.h
141 endif
143 if have_glob_h
144 glob_h =
145 else
146 glob_h = glob.h
147 endif
149 if have_ifaddrs_h
150 ifaddrs_h =
151 else
152 ifaddrs_h = ifaddrs.h
153 endif
155 if have_vis_h
156 vis_h = 
157 else
158 vis_h = vis.h
159 endif
161 ## these are controlled by configure
162 XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(vis_h)
163 CLEANFILES += err.h fnmatch.h glob.h ifaddrs.h vis.h
165 dist_include_HEADERS =                          \
166         base64.h                                \
167         getarg.h                                \
168         hex.h                                   \
169         parse_bytes.h                           \
170         parse_time.h                            \
171         parse_units.h                           \
172         resolve.h                               \
173         roken-common.h                          \
174         rtbl.h                                  \
175         xdbm.h
177 if have_socket_wrapper
178 libroken_la_SOURCES += socket_wrapper.c socket_wrapper.h
179 dist_include_HEADERS += socket_wrapper.h
180 endif
182 build_HEADERZ = test-mem.h $(XHEADERS)
184 nodist_include_HEADERS = roken.h
185 rokenincludedir = $(includedir)/roken
186 nodist_rokeninclude_HEADERS = $(XHEADERS)
188 man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3
190 SUFFIXES += .hin
191 .hin.h:
192         cp $< $@
194 # Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works
195 if !CROSS_COMPILE
197 noinst_PROGRAMS += make-roken
198 BUILT_SOURCES += make-roken.c
200 nodist_make_roken_SOURCES = make-roken.c
202 roken.h: make-roken$(EXEEXT)
203         @./make-roken$(EXEEXT) > tmp.h ;\
204         if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
205         else rm -f roken.h; mv tmp.h roken.h; fi
207 make-roken.c: roken.h.in roken.awk
208         $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
210 else
212 roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in
213         perl $(top_srcdir)/cf/roken-h-process.pl \
214         -c $(top_builddir)/include/config.h  \
215         -p $(srcdir)/roken.h.in -o roken.h
217 endif
220 EXTRA_DIST = \
221         roken.awk roken.h.in \
222         $(man_MANS) \
223         test-mem.h \
224         ndbm_wrap.c \
225         ndbm_wrap.h \
226         version-script.map