1 # Id: Makefile.in,v 1.2 2004/07/20 07:13:39 marka Exp
2 # Copyright (c) 2000, 2002 Japan Network Information Center.
5 # By using this file, you agree to the terms and conditions set forth bellow.
7 # LICENSE TERMS AND CONDITIONS
9 # The following License Terms and Conditions apply, unless a different
10 # license is obtained from Japan Network Information Center ("JPNIC"),
11 # a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
12 # Chiyoda-ku, Tokyo 101-0047, Japan.
14 # 1. Use, Modification and Redistribution (including distribution of any
15 # modified or derived work) in source and/or binary forms is permitted
16 # under this License Terms and Conditions.
18 # 2. Redistribution of source code must retain the copyright notices as they
19 # appear in each source code file, this License Terms and Conditions.
21 # 3. Redistribution in binary form must reproduce the Copyright Notice,
22 # this License Terms and Conditions, in the documentation and/or other
23 # materials provided with the distribution. For the purposes of binary
24 # distribution the "Copyright Notice" refers to the following language:
25 # "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
27 # 4. The name of JPNIC may not be used to endorse or promote products
28 # derived from this Software without specific prior written approval of
31 # 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
32 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
34 # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
35 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
38 # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
40 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
41 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
58 exec_prefix = @
exec_prefix@
61 sysconfdir
= @sysconfdir@
63 mapdir
= $(datadir)/idnkit
64 utf8_name
= @UTF8_NAME@
72 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
73 INSTALL_DATA
= @INSTALL_DATA@
74 MKINSTALLDIRS
= @top_srcdir@
/mkinstalldirs
80 INCS
= -I
$(srcdir)/..
/include -I..
/include $(ICONVINC
)
81 DEFS
= -DIDN_RESCONF_DIR
="\"$(sysconfdir)\""
83 CFLAGS
= $(OPTS
) $(INCS
) $(DEFS
) @CPPFLAGS@ @CFLAGS@
100 nameprep_template.c \
153 LITELIBCFLAGS
= $(CFLAGS
) -DWITHOUT_ICONV
183 LITELIB
= libidnkitlite
184 TESTLITELIB
= libidntestlite
186 SAMPLES
= idn.conf.sample idnalias.conf.sample
189 $(LIBTOOL
) --mode
=compile
$(CC
) $(CFLAGS
) -c
$<
192 $(CC
) -o
$@
-DTEST
$(CFLAGS
) $(LDFLAGS
) -c
$<
194 all: all-localdir all-subdirs
195 @LITEONLY_TRUE@all-localdir
: $(LITELIB
).la
$(SAMPLES
)
196 @LITEONLY_FALSE@all-localdir
: $(LIB
).la
$(LITELIB
).la
$(SAMPLES
)
199 $(LIBTOOL
) --mode
=link
$(LD
) $(LDFLAGS
) -o
$@ \
200 -version-info
$(LIB_CURRENT
):$(LIB_REVISION
):$(LIB_AGE
) \
201 -rpath
$(libdir) $(OBJS
)
203 $(TESTLIB
).la
: $(OBJS
)
204 $(LIBTOOL
) --mode
=link
$(LD
) $(LDFLAGS
) -o
$@ \
205 -version-info
$(LIB_CURRENT
):$(LIB_REVISION
):$(LIB_AGE
) \
206 -rpath
$(libdir) $(OBJS
)
209 $(LIBTOOL
) --mode
=compile
$(CC
) $(LITELIBCFLAGS
) -o
$@ \
211 converterlite.lo
: converter.c
212 $(LIBTOOL
) --mode
=compile
$(CC
) $(LITELIBCFLAGS
) -o
$@ \
213 -c
$(srcdir)/converter.c
215 $(LIBTOOL
) --mode
=compile
$(CC
) $(LITELIBCFLAGS
) -o
$@ \
217 resconflite.lo
: resconf.c
218 $(LIBTOOL
) --mode
=compile
$(CC
) $(LITELIBCFLAGS
) -o
$@ \
219 -c
$(srcdir)/resconf.c
221 $(LITELIB
).la
: $(LITELIB_OBJS
)
222 $(LIBTOOL
) --mode
=link
$(LD
) $(LDFLAGS
) -o
$@ \
223 -version-info
$(LIB_CURRENT
):$(LIB_REVISION
):$(LIB_AGE
) \
224 -rpath
$(libdir) $(LITELIB_OBJS
)
226 $(TESTLITELIB
).la
: $(LITELIB_OBJS
)
227 $(LIBTOOL
) --mode
=link
$(LD
) $(LDFLAGS
) -o
$@ \
228 -version-info
$(LIB_CURRENT
):$(LIB_REVISION
):$(LIB_AGE
) \
229 -rpath
$(libdir) $(LITELIB_OBJS
)
231 idn.conf.sample
: idn.conf.sample.in
232 sed
-e
's%[@]mapdir[@]%$(mapdir)%' \
233 < $(srcdir)/idn.conf.sample.in
> $@
235 idnalias.conf.sample
: Makefile
236 $(SHELL
) $(srcdir)/aliaslist.sh
$(build
) $(utf8_name
) > $@
238 install: install-localdir install-subdirs
239 @LITEONLY_TRUE@install-localdir
: all install-common
240 @LITEONLY_FALSE@install-localdir
: all install-common install-nolite
243 $(MKINSTALLDIRS
) $(DESTDIR
)$(libdir)
244 $(LIBTOOL
) $(INSTALL_DATA
) $(LITELIB
).la \
245 $(DESTDIR
)$(libdir)/$(LITELIB
).la
246 -[ -f
$(DESTDIR
)$(libdir)/$(LITELIB
).a
] \
247 && $(RANLIB
) $(DESTDIR
)$(libdir)/$(LITELIB
).a
248 $(MKINSTALLDIRS
) $(DESTDIR
)$(sysconfdir
)
249 $(INSTALL_DATA
) idn.conf.sample \
250 $(DESTDIR
)$(sysconfdir
)/idn.conf.sample
251 $(INSTALL_DATA
) idnalias.conf.sample \
252 $(DESTDIR
)$(sysconfdir
)/idnalias.conf.sample
253 @if
[ ! -f
$(DESTDIR
)$(sysconfdir
)/idn.conf
]; then \
254 echo
"** installing default idn.conf"; \
255 $(INSTALL_DATA
) idn.conf.sample
$(DESTDIR
)$(sysconfdir
)/idn.conf
; \
257 @if
[ ! -f
$(DESTDIR
)$(sysconfdir
)/idnalias.conf
]; then \
258 echo
"** installing default idnalias.conf"; \
259 $(INSTALL_DATA
) idnalias.conf.sample \
260 $(DESTDIR
)$(sysconfdir
)/idnalias.conf
; \
264 $(MKINSTALLDIRS
) $(DESTDIR
)$(libdir)
265 $(LIBTOOL
) $(INSTALL_DATA
) $(LIB
).la \
266 $(DESTDIR
)$(libdir)/$(LIB
).la
267 -[ -f
$(DESTDIR
)$(libdir)/$(LIB
).a
] \
268 && $(RANLIB
) $(DESTDIR
)$(libdir)/$(LIB
).a
271 @if
[ -f
$(DESTDIR
)$(sysconfdir
)/idn.conf
]; then \
272 echo
"** backing up old idn.conf as idn.conf.old"; \
273 mv
-f
$(DESTDIR
)$(sysconfdir
)/idn.conf \
274 $(DESTDIR
)$(sysconfdir
)/idn.conf.old
; \
276 @echo
"** installing default idn.conf forcibly"
277 $(INSTALL_DATA
) idn.conf.sample
$(DESTDIR
)$(sysconfdir
)/idn.conf
278 @if
[ -f
$(DESTDIR
)$(sysconfdir
)/idnalias.conf
]; then \
279 echo
"** backing up old idnalias.conf as idnalias.conf.old"; \
280 mv
-f
$(DESTDIR
)$(sysconfdir
)/idnalias.conf \
281 $(DESTDIR
)$(sysconfdir
)/idnalias.conf.old
; \
283 @echo
"** installing default idnalias.conf forcibly"
284 $(INSTALL_DATA
) idnalias.conf.sample \
285 $(DESTDIR
)$(sysconfdir
)/idnalias.conf
287 clean: clean-localdir clean-subdirs
288 clean-localdir
: force
289 rm -f
*.o
*.lo
*.la
*.a core
*.core
*~
290 rm -f
*.to
*_test.c
*_test
291 rm -f idn.conf.sample idnalias.conf.sample
294 distclean: distclean-localdir distclean-subdirs
295 distclean-localdir
: force clean-localdir
298 test check: test-localdir test-subdirs
300 @LITEONLY_TRUE@test-localdir
: $(TESTLITELIB
).la
$(SAMPLES
)
301 @LITEONLY_FALSE@test-localdir
: $(TESTLIB
).la
$(TESTLITELIB
).la
$(SAMPLES
)
303 all-subdirs install-subdirs clean-subdirs distclean-subdirs test-subdirs
:
304 @target
=`echo $@ | sed 's/-subdirs$$//'`; \
305 for d in
$(SUBDIRS
) ; do \
306 (cd
$$d; $(MAKE
) DESTDIR
=$(DESTDIR
) $$target); \