Export libwireshark symbols using WS_DLL_PUBLIC define
[metze/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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 if NEED_GETOPT_LO
30 wsutil_optional_objects += @GETOPT_LO@
31 endif
32  
33 if NEED_INET_ATON_LO
34 wsutil_optional_objects += @INET_ATON_LO@
35 endif
36  
37 if NEED_INET_NTOP_LO
38 wsutil_optional_objects += @INET_NTOP_LO@
39 endif
40  
41 if NEED_INET_PTON_LO
42 wsutil_optional_objects += @INET_PTON_LO@
43 endif
44
45 if NEED_STRNCASECMP_LO
46 wsutil_optional_objects += @STRNCASECMP_LO@
47 endif
48
49 if NEED_STRPTIME_LO
50 wsutil_optional_objects += @STRPTIME_LO@
51 endif
52
53 include ../Makefile.am.inc
54
55 include Makefile.common
56
57 AM_CFLAGS =-DWS_BUILD_DLL
58
59 if HAVE_WARNINGS_AS_ERRORS
60 AM_CFLAGS += -Werror
61 endif
62
63 lib_LTLIBRARIES = libwsutil.la
64 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
65 libwsutil_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
66
67 INCLUDES = -I$(srcdir)/..
68
69 libwsutil_la_SOURCES =          \
70         $(LIBWSUTIL_SRC)        \
71         $(LIBWSUTIL_INCLUDES)
72
73 EXTRA_libwsutil_la_SOURCES=     \
74         inet_aton.c             \
75         inet_aton.h             \
76         inet_ntop.c             \
77         inet_pton.c             \
78         inet_v6defs.h           \
79         strncasecmp.c           \
80         strptime.c              \
81         strptime.h              \
82         wsgetopt.c              \
83         wsgetopt.h              \
84         wsgetopt_int.h
85
86 libwsutil_la_DEPENDENCIES=      \
87         $(wsutil_optional_objects)
88
89 libwsutil_la_LIBADD =           \
90         @GLIB_LIBS@             \
91         $(wsutil_optional_objects)
92
93 EXTRA_DIST =            \
94         Makefile.common \
95         Makefile.nmake  \
96         file_util.c     \
97         file_util.h     \
98         unicode-utils.c \
99         unicode-utils.h \
100         wsgcrypt.h
101
102 CLEANFILES = \
103         libwsutil.a     \
104         libwsutil.la    \
105         *~
106
107 MAINTAINERCLEANFILES = \
108         Makefile.in
109
110 # ABI compliance checker can be obtained from
111 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
112 # Checked using version 1.21.12
113 dumpabi-libwsutil: all abi-descriptor.xml
114         rm -rf abi-check-headers abi_dumps .libs/*.abi.tar.gz
115         mkdir abi-check-headers
116         cp ../config.h ../ws_symbol_export.h *.h abi-check-headers/
117         abi-compliance-checker -l libwsutil -v1 `readlink .libs/libwsutil.so | sed 's/.*\.so\.//'` \
118                 -relpath $(abs_srcdir) -dump-abi abi-descriptor.xml || \
119                 cat logs/libwsutil/[0-9]*/log.txt
120         cp -f abi_dumps/libwsutil/libwsutil_* .libs/
121         cd .libs && ln -sf libwsutil_*.abi.tar.gz libwsutil.abi.tar.gz
122
123 checkapi:
124 #       $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput \
125         $(PERL) ../tools/checkAPIs.pl -g termoutput -build \
126         $(LIBWSUTIL_SRC)
127 #       file_util.c unicode-utils.c