Remove an extraneous backslash
[obnox/wireshark/wip.git] / wsutil / Makefile.am
1 # Makefile.am
2 #
3 # $Id$
4 #
5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 1998 Gerald Combs
8 #
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
23 ACLOCAL_AMFLAGS = `../aclocal-flags`
24
25 # Optional objects that I know how to build. These will be
26 # linked into libwsutil.
27 wsutil_optional_objects =
28
29 # filters for symbols to be omitted from libwsutil.sym
30 # symbols defined only on windows
31 def_sym_filter_symbols = /^getenv_utf8/ || /^ws_stdio/ || /^ws_init_dll_search_path/ || /^ws_load_library/ || /^ws_module_open/ || /^utf_[168]*to[168]/ || /^arg_list_utf_16to8/ || /^npf_sys_is_running/
32
33 if NEED_GETOPT_LO
34 wsutil_optional_objects += @GETOPT_LO@
35 else
36 def_sym_filter_symbols += || /^getopt/ || /^optarg/ || /^optind/ || /^opterr/ || /^optopt/
37 endif
38  
39 if NEED_INET_ATON_LO
40 wsutil_optional_objects += @INET_ATON_LO@
41 else
42 def_sym_filter_symbols += || /^inet_aton/
43 endif
44  
45 if NEED_INET_NTOP_LO
46 wsutil_optional_objects += @INET_NTOP_LO@
47 else
48 def_sym_filter_symbols += || /^ws_inet_ntop/
49 endif
50  
51 if NEED_INET_PTON_LO
52 wsutil_optional_objects += @INET_PTON_LO@
53 else
54 def_sym_filter_symbols += || /^ws_inet_pton/
55 endif
56
57 if NEED_STRNCASECMP_LO
58 wsutil_optional_objects += @STRNCASECMP_LO@
59 else
60 def_sym_filter_symbols += || /^strncasecmp/
61 endif
62
63 if NEED_STRPTIME_LO
64 wsutil_optional_objects += @STRPTIME_LO@
65 else
66 def_sym_filter_symbols += || /^strptime/
67 endif
68
69 def_sym_filter_symbols += {next;};
70
71 include ../Makefile.am.inc
72
73 include Makefile.common
74
75 if HAVE_WARNINGS_AS_ERRORS
76 AM_CFLAGS = -Werror
77 endif
78
79 lib_LTLIBRARIES = libwsutil.la
80 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
81 libwsutil_la_LDFLAGS = -version-info 0:0:0 -export-symbols libwsutil.sym @LDFLAGS_SHAREDLIB@
82
83 INCLUDES = -I$(srcdir)/..
84
85 libwsutil_la_SOURCES =          \
86         $(LIBWSUTIL_SRC)        \
87         $(LIBWSUTIL_INCLUDES)
88
89 EXTRA_libwsutil_la_SOURCES=     \
90         inet_aton.c             \
91         inet_aton.h             \
92         inet_ntop.c             \
93         inet_pton.c             \
94         inet_v6defs.h           \
95         strncasecmp.c           \
96         strptime.c              \
97         strptime.h              \
98         wsgetopt.c              \
99         wsgetopt.h
100
101 libwsutil_la_DEPENDENCIES=      \
102         $(wsutil_optional_objects) \
103         libwsutil.sym
104
105 libwsutil_la_LIBADD =           \
106         @GLIB_LIBS@             \
107         $(wsutil_optional_objects)
108
109 EXTRA_DIST =            \
110         Makefile.common \
111         Makefile.nmake  \
112         file_util.c     \
113         file_util.h     \
114         libwsutil.def   \
115         unicode-utils.c \
116         unicode-utils.h
117
118 CLEANFILES = \
119         libwsutil.a     \
120         libwsutil.la    \
121         libwsutil.sym   \
122         *~
123
124 MAINTAINERCLEANFILES = \
125         Makefile.in
126
127 # ABI compliance checker can be obtained from
128 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
129 # Checked using version 1.21.12
130 dumpabi: all abi-descriptor.xml
131         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz; \
132         mkdir abi-check-headers; cp ../config.h *.h abi-check-headers/; \
133         abi-compliance-checker -l libwsutil -v1 `ls  .libs/libwsutil.so.?.?.?|sed 's/.*\.so\.//'` \
134                 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml && \
135         cp -f abi_dumps/libwsutil/libwsutil_* .libs/; \
136         cd .libs; ln -sf libwsutil_*.abi.tar.gz libwsutil.abi.tar.gz
137
138 checkapi:
139 #       $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput \
140         $(PERL) ../tools/checkAPIs.pl -g termoutput \
141         $(LIBWSUTIL_SRC)
142 #       file_util.c unicode-utils.c