]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - crypto/heimdal/lib/roken/Makefile.am
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / crypto / heimdal / lib / roken / Makefile.am
1 # $Id: Makefile.am 22409 2008-01-12 05:53:37Z lha $
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 libroken_la_LDFLAGS = -version-info 19:0:1
11 libroken_la_CPPFLAGS = -DBUILD_ROKEN_LIB
12
13 # XXX this is needed for the LIBOBJS objects
14 CPPFLAGS = $(libroken_la_CPPFLAGS)
15
16 noinst_PROGRAMS = make-roken snprintf-test resolve-test
17
18 nodist_make_roken_SOURCES = make-roken.c
19
20 check_PROGRAMS =                                \
21                 base64-test                     \
22                 getaddrinfo-test                \
23                 hex-test                        \
24                 test-readenv                    \
25                 parse_bytes-test                \
26                 parse_reply-test                \
27                 parse_time-test                 \
28                 snprintf-test                   \
29                 strpftime-test
30
31 TESTS = $(check_PROGRAMS)
32
33 LDADD = libroken.la $(LIB_crypt)
34 make_roken_LDADD = 
35
36 noinst_LTLIBRARIES = libtest.la
37 libtest_la_SOURCES = strftime.c strptime.c snprintf.c
38 libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME
39
40 parse_reply_test_SOURCES = parse_reply-test.c resolve.c
41 parse_reply_test_CFLAGS  = -DTEST_RESOLVE
42
43 test_readenv_SOURCES = test-readenv.c test-mem.c
44
45 parse_time_test_SOURCES = parse_time-test.c test-mem.c
46
47 strpftime_test_SOURCES  = strpftime-test.c strpftime-test.h
48 strpftime_test_LDADD = libtest.la $(LDADD)
49 strpftime_test_CFLAGS = -DTEST_STRPFTIME
50 snprintf_test_SOURCES   = snprintf-test.c snprintf-test.h
51 snprintf_test_LDADD = libtest.la $(LDADD)
52 snprintf_test_CFLAGS    = -DTEST_SNPRINTF
53
54 resolve_test_SOURCES = resolve-test.c
55
56 libroken_la_SOURCES =           \
57         base64.c                \
58         bswap.c                 \
59         concat.c                \
60         dumpdata.c              \
61         environment.c           \
62         eread.c                 \
63         esetenv.c               \
64         ewrite.c                \
65         getaddrinfo_hostspec.c  \
66         get_default_username.c  \
67         get_window_size.c       \
68         getarg.c                \
69         getnameinfo_verified.c  \
70         getprogname.c           \
71         h_errno.c               \
72         hex.c                   \
73         hostent_find_fqdn.c     \
74         issuid.c                \
75         k_getpwnam.c            \
76         k_getpwuid.c            \
77         mini_inetd.c            \
78         net_read.c              \
79         net_write.c             \
80         parse_bytes.c           \
81         parse_time.c            \
82         parse_units.c           \
83         realloc.c               \
84         resolve.c               \
85         roken_gethostby.c       \
86         rtbl.c                  \
87         rtbl.h                  \
88         setprogname.c           \
89         signal.c                \
90         simple_exec.c           \
91         snprintf.c              \
92         socket.c                \
93         strcollect.c            \
94         strpool.c               \
95         timeval.c               \
96         tm2time.c               \
97         unvis.c                 \
98         verify.c                \
99         vis.c                   \
100         vis.h                   \
101         warnerr.c               \
102         write_pid.c             \
103         xdbm.h
104
105 EXTRA_libroken_la_SOURCES =     \
106         err.hin                 \
107         glob.hin                \
108         fnmatch.hin             \
109         ifaddrs.hin             \
110         vis.hin 
111
112 libroken_la_LIBADD = @LTLIBOBJS@
113
114 $(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS)
115
116 BUILT_SOURCES = make-roken.c roken.h
117
118 if have_err_h
119 err_h =
120 else
121 err_h = err.h
122 endif
123
124 if have_fnmatch_h
125 fnmatch_h =
126 else
127 fnmatch_h = fnmatch.h
128 endif
129
130 if have_glob_h
131 glob_h =
132 else
133 glob_h = glob.h
134 endif
135
136 if have_ifaddrs_h
137 ifaddrs_h =
138 else
139 ifaddrs_h = ifaddrs.h
140 endif
141
142 if have_vis_h
143 vis_h = 
144 else
145 vis_h = vis.h
146 endif
147
148 ## these are controlled by configure
149 XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(vis_h)
150 CLEANFILES += err.h fnmatch.h glob.h ifaddrs.h vis.h
151
152 dist_include_HEADERS =                          \
153         base64.h                                \
154         getarg.h                                \
155         hex.h                                   \
156         parse_bytes.h                           \
157         parse_time.h                            \
158         parse_units.h                           \
159         resolve.h                               \
160         roken-common.h                          \
161         rtbl.h                                  \
162         xdbm.h
163
164 if have_socket_wrapper
165 libroken_la_SOURCES += socket_wrapper.c socket_wrapper.h
166 dist_include_HEADERS += socket_wrapper.h
167 endif
168
169 build_HEADERZ = test-mem.h $(XHEADERS)
170
171 nodist_include_HEADERS = roken.h
172 rokenincludedir = $(includedir)/roken
173 nodist_rokeninclude_HEADERS = $(XHEADERS)
174
175 man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3
176
177 SUFFIXES += .hin
178 .hin.h:
179         cp $< $@
180
181 roken.h: make-roken$(EXEEXT)
182         @./make-roken$(EXEEXT) > tmp.h ;\
183         if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
184         else rm -f roken.h; mv tmp.h roken.h; fi
185
186 make-roken.c: roken.h.in roken.awk
187         $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
188
189 EXTRA_DIST = \
190         roken.awk roken.h.in \
191         $(man_MANS) \
192         test-mem.h \
193         ndbm_wrap.c \
194         ndbm_wrap.h