Sync with TP.
[libidn.git] / csharp / Makefile.am
blob0caf0f887e3b725d3f26631f9fcecf215038f5dc
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2005, 2006, 2007 Simon Josefsson.
4 # This file is part of GNU Libidn.
6 # GNU Libidn is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of
9 # the License, or (at your option) any later version.
11 # GNU Libidn is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with GNU Libidn; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
21 CSHARPCOMP = $(SHELL) $(top_builddir)/csharpcomp.sh
22 CSHARPCOMPFLAGS =
24 SOURCES = AssemblyInfo.cs IDNA.cs RFC3454.cs CombiningClass.cs  \
25         IDNAException.cs Stringprep.cs Composition.cs NFKC.cs   \
26         StringprepException.cs DecompositionKeys.cs Punycode.cs \
27         DecompositionMappings.cs PunycodeException.cs
29 SOURCES_GENERATE = generate/AssemblyInfo.cs \
30         generate/GenerateNFKC.cs generate/GenerateRFC3454.cs \
31         generate/HashSet.cs generate/Program.cs generate/Tokenizer.cs
33 MSVSC = libidn.csproj libidn.csproj.user libidn_PPC.csdproj     \
34         libidn_PPC.csdproj.user libidn_PPC.sln libidn_PPC.suo   \
35         libidn.sln libidn.suo
37 EXTRA_DIST = $(SOURCES) $(SOURCES_GENERATE) $(MSVSC)
39 CLEANFILES = Libidn.dll
41 ALL_LOCAL_TARGETS =
42 INSTALLDIRS_LOCAL_TARGETS = 
43 INSTALL_DATA_LOCAL_TARGETS =
44 UNINSTALL_LOCAL_TARGETS =
46 if CSHARP
47 ALL_LOCAL_TARGETS += Libidn.dll
48 INSTALLDIRS_LOCAL_TARGETS += install-dll-dir
49 INSTALL_DATA_LOCAL_TARGETS += install-dll
50 UNINSTALL_LOCAL_TARGETS += uninstall-dll
52 Libidn.dll: $(SOURCES)
53         $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ \
54                 `for src in $(SOURCES); do echo $(srcdir)/$$src; done`
56 SPEC = $(top_srcdir)/doc/specifications
58 GenerateTables: $(SOURCES_GENERATE)
59         $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ \
60                 `for src in $(SOURCES_GENERATE); do echo $(srcdir)/$$src; done`
61         if ! test -f rfc3454.txt; then \
62                 ln -s $(SPEC)/rfc3454.txt . \
63                 || cp $(SPEC)/rfc3454.txt .; \
64         fi
65         if ! test -f UnicodeData.txt; then \
66                 ln -s $(SPEC)/UnicodeData-3.2.0.txt UnicodeData.txt \
67                 || cp $(SPEC)/UnicodeData-3.2.0.txt UnicodeData.txt; \
68         fi
69         if ! test -f CompositionExclusions.txt; then \
70                 ln -s $(SPEC)/CompositionExclusions-3.2.0.txt CompositionExclusions.txt \
71                 || cp $(SPEC)/CompositionExclusions-3.2.0.txt CompositionExclusions.txt; \
72         fi
74 RFC3454.cs CombiningClass.cs DecompositionKeys.cs DecompositionMappings.cs Composition.cs: $(GEN_SOURCES)
75         make GenerateTables
76         ./GenerateTables
78 install-dll-dir:
79         $(mkinstalldirs) $(DESTDIR)$(libdir)
81 install-dll: install-dll-dir
82         $(INSTALL_DATA) Libidn.dll $(DESTDIR)$(libdir)/Libidn.dll
84 uninstall-dll:
85         rm -f $(DESTDIR)$(libdir)/Libidn.dll
86 endif
88 all-local: $(ALL_LOCAL_TARGETS)
89 install-data-local: $(INSTALL_DATA_LOCAL_TARGETS)
90 installdirs-local: $(INSTALLDIRS_LOCAL_TARGETS)
91 uninstall-local: $(UNINSTALL_LOCAL_TARGETS)