Update tag value for tizen 2.0 build
[external/libidn.git] / lib / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson.
3 # Copyright (C) 2004 Free Software Foundation, Inc.
4 #
5 # This file is part of GNU Libidn.
6 #
7 # GNU Libidn is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation; either version 2.1 of
10 # the License, or (at your option) any later version.
11 #
12 # GNU Libidn is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with GNU Libidn; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20
21 EXTRA_DIST = gen-stringprep-tables.pl gen-unicode-tables.pl gen-tld-tables.pl
22
23 AM_CPPFLAGS = -I$(srcdir)/gl -Igl -DLIBIDN_BUILDING
24 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS)
25 AM_CFLAGS += $(CFLAG_VISIBILITY)
26 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
27
28 lib_LTLIBRARIES = libidn.la
29
30 idn_int = idn-int.h
31
32 BUILT_SOURCES = $(idn_int) gunibreak.h gunicomp.h gunidecomp.h rfc3454.c tlds.c
33 DISTCLEANFILES = $(idn_int)
34 include_HEADERS = stringprep.h idna.h punycode.h idn-free.h pr29.h
35 if TLD
36 include_HEADERS += tld.h
37 endif
38 nodist_include_HEADERS = $(idn_int)
39
40 idn-int.h:
41         if test -n "$(STDINT_H)"; then \
42                 sed -e s/include_next/include/ gl/stdint.h > idn-int.h; \
43         else \
44                 echo '#include <stdint.h>' > idn-int.h; \
45         fi
46
47 libidn_la_SOURCES = libidn.map \
48         gunibreak.h gunicomp.h gunidecomp.h \
49         nfkc.c toutf8.c version.c \
50         stringprep.h stringprep.c rfc3454.c profiles.c \
51         punycode.h punycode.c \
52         idna.h idna.c \
53         pr29.h pr29.c \
54         idn-free.h idn-free.c \
55         strerror-idna.c strerror-pr29.c strerror-punycode.c \
56         strerror-stringprep.c strerror-tld.c
57
58 if TLD
59 libidn_la_SOURCES += tld.h tld.c tlds.c
60 endif
61 libidn_la_LIBADD = $(LTLIBICONV) $(LTLIBINTL) gl/libgnu.la
62 libidn_la_LDFLAGS = \
63         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined
64
65 if HAVE_LD_VERSION_SCRIPT
66 libidn_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libidn.map
67 else
68 libidn_la_LDFLAGS += -export-symbols-regex \
69                         '^(idn|pr29_|punycode_|stringprep|tld_).*'
70 endif
71
72 if HAVE_LD_OUTPUT_DEF
73 libidn_la_LDFLAGS += -Wl,--output-def,libidn-$(DLL_VERSION).def
74 defexecdir = $(bindir)
75 defexec_DATA = libidn-$(DLL_VERSION).def
76 DISTCLEANFILES += $(defexec_DATA)
77 endif
78
79 nfkc.c: gunibreak.h gunicomp.h gunidecomp.h
80
81 SPEC = $(top_srcdir)/doc/specifications
82
83 gunibreak.h gunicomp.h gunidecomp.h: gen-unicode-tables.pl $(SPEC)/UnicodeData-3.2.0.txt $(SPEC)/LineBreak-3.2.0.txt $(SPEC)/SpecialCasing-3.2.0.txt $(SPEC)/CaseFolding-3.2.0.txt $(SPEC)/CompositionExclusions-3.2.0.txt
84         $(PERL) $(srcdir)/gen-unicode-tables.pl -decomp 3.2 $(SPEC)
85
86 rfc3454.c: gen-stringprep-tables.pl
87         $(PERL) $(srcdir)/gen-stringprep-tables.pl $(SPEC)/rfc3454.txt
88
89 tlds.c: gen-tld-tables.pl
90         $(PERL) $(srcdir)/gen-tld-tables.pl $(top_srcdir)/doc/tld/*.tld > tlds.c