If something is only supposed to be included if we have libpcap, don't
[obnox/wireshark/wip.git] / Makefile.common
1 # Makefile.common
2 #     Contains the stuff from Makefile.am and Makefile.nmake that is
3 #     a) common to both files and
4 #     b) portable between both files
5 #
6 # $Id$
7 #
8 # Wireshark - Network traffic analyzer
9 # By Gerald Combs <gerald@wireshark.org>
10 # Copyright 1998 Gerald Combs
11 #
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License
14 # as published by the Free Software Foundation; either version 2
15 # of the License, or (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
26 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
27 BUILT_HEADER_FILES =    \
28         svnversion.h
29
30 BUILT_C_FILES =         \
31         ps.c
32
33 BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
34
35 # Header files generated from source files.
36 GENERATED_HEADER_FILES = \
37         $(BUILT_HEADER_FILES)
38
39 # C source files generated from source files.
40 GENERATED_C_FILES = \
41         $(BUILT_C_FILES)        \
42         tshark-tap-register.c
43
44 # All the generated files.
45 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
46
47 # sources common for wireshark, tshark, and rawshark
48 WIRESHARK_COMMON_SRC =  \
49         $(PLATFORM_SRC) \
50         capture-pcap-util.c     \
51         cfile.c \
52         clopts_common.c \
53         disabled_protos.c       \
54         packet-range.c  \
55         print.c \
56         ps.c    \
57         sync_pipe_write.c       \
58         timestats.c     \
59         util.c  \
60         tap-megaco-common.c     \
61         tap-rtp-common.c        \
62         version_info.c
63
64 # corresponding headers
65 WIRESHARK_COMMON_INCLUDES =     \
66         svnversion.h            \
67         capture-pcap-util.h     \
68         capture-pcap-util-int.h \
69         cfile.h \
70         clopts_common.h \
71         cmdarg_err.h    \
72         console_io.h    \
73         color.h \
74         disabled_protos.h       \
75         file.h  \
76         fileset.h       \
77         isprint.h       \
78         packet-range.h  \
79         print.h \
80         ps.h    \
81         register.h      \
82         tempfile.h      \
83         timestats.h     \
84         util.h  \
85         tap-megaco-common.h     \
86         tap-rtp-common.h        \
87         version_info.h
88
89 # sources common for wireshark and tshark, but not rawshark;
90 # these are for programs that capture traffic by running dumpcap
91 SHARK_COMMON_CAPTURE_SRC =      \
92         capture_errs.c          \
93         capture_ifinfo.c        \
94         capture_ui_utils.c
95
96 # corresponding headers
97 SHARK_COMMON_CAPTURE_INCLUDES = \
98         capture_errs.h  \
99         capture_ifinfo.h        \
100         capture_ui_utils.h
101
102 # sources for TShark taps
103 TSHARK_TAP_SRC =        \
104         tap-afpstat.c   \
105         tap-ansi_astat.c        \
106         tap-bootpstat.c \
107         tap-camelcounter.c      \
108         tap-camelsrt.c  \
109         tap-comparestat.c       \
110         tap-dcerpcstat.c        \
111         tap-diameter-avp.c \
112         tap-funnel.c \
113         tap-gsm_astat.c \
114         tap-h225counter.c       \
115         tap-h225rassrt.c        \
116         tap-httpstat.c  \
117         tap-iostat.c    \
118         tap-iousers.c   \
119         tap-mgcpstat.c  \
120         tap-megacostat.c        \
121         tap-protocolinfo.c      \
122         tap-protohierstat.c     \
123         tap-radiusstat.c        \
124         tap-rpcstat.c   \
125         tap-rpcprogs.c  \
126         tap-rtp.c       \
127         tap-sctpchunkstat.c     \
128         tap-sipstat.c \
129         tap-smbsids.c   \
130         tap-smbstat.c   \
131         tap-stats_tree.c        \
132         tap-wspstat.c
133
134 # helpers already available on some platforms (and on others not)
135 EXTRA_wireshark_SOURCES =       \
136         wsgetopt.c      \
137         inet_ntop.c     \
138         inet_pton.c     \
139         strerror.c      \
140         strncasecmp.c   \
141         strptime.c
142
143 # corresponding headers
144 EXTRA_wireshark_INCLUDES =      \
145         wsgetopt.h      \
146         inet_v6defs.h   \
147         strerror.h      \
148         strptime.h
149
150 # wireshark specifics
151 wireshark_SOURCES =     \
152         $(WIRESHARK_COMMON_SRC) \
153         $(SHARK_COMMON_CAPTURE_SRC) \
154         airpcap_loader.c \
155         alert_box.c     \
156         capture.c       \
157         capture_info.c  \
158         capture_opts.c \
159         capture_sync.c  \
160         color_filters.c \
161         file.c  \
162         fileset.c       \
163         filters.c       \
164         g711.c \
165         merge.c \
166         proto_hier_stats.c      \
167         summary.c       \
168         tempfile.c
169
170 # corresponding headers
171 wireshark_INCLUDES =    \
172         airpcap.h       \
173         airpcap_loader.h \
174         alert_box.h     \
175         capture.h       \
176         capture_info.h  \
177         capture_opts.h  \
178         capture_sync.h  \
179         color_filters.h \
180         filters.h       \
181         g711.h  \
182         globals.h       \
183         log.h   \
184         merge.h \
185         progress_dlg.h  \
186         proto_hier_stats.h      \
187         simple_dialog.h \
188         stat_menu.h     \
189         summary.h       \
190         sync_pipe.h     \
191         ui_util.h
192
193 # tshark specifics
194 tshark_SOURCES =        \
195         $(WIRESHARK_COMMON_SRC) \
196         $(SHARK_COMMON_CAPTURE_SRC) \
197         $(TSHARK_TAP_SRC)       \
198         capture_opts.c          \
199         capture_sync.c          \
200         tempfile.c              \
201         tshark-tap-register.c   \
202         tshark.c
203
204 # rawshark specifics
205 rawshark_SOURCES =      \
206         $(WIRESHARK_COMMON_SRC) \
207         rawshark.c
208
209 # text2pcap specifics
210 text2pcap_SOURCES = \
211         text2pcap.c \
212         text2pcap-scanner.l
213
214 # mergecap specifics
215 mergecap_SOURCES = \
216         mergecap.c \
217         merge.c \
218         svnversion.h
219
220 # editcap specifics
221 editcap_SOURCES = \
222         editcap.c       \
223         epan/crypt/crypt-md5.c \
224         epan/nstime.c \
225         $(WTAP_PLUGIN_SOURCES)
226
227 capinfos_SOURCES = \
228         capinfos.c \
229         $(WTAP_PLUGIN_SOURCES)
230
231 # dftest specifics
232 dftest_SOURCES =        \
233         dftest.c        \
234         util.c
235
236 # randpkt specifics
237 randpkt_SOURCES = \
238         randpkt.c
239
240 # dumpcap specifics
241 dumpcap_SOURCES =       \
242         $(PLATFORM_SRC) \
243         capture_opts.c \
244         capture-pcap-util.c     \
245         capture_stop_conditions.c       \
246         clopts_common.c \
247         conditions.c    \
248         dumpcap.c       \
249         pcapio.c        \
250         ringbuffer.c    \
251         sync_pipe_write.c       \
252         tempfile.c      \
253         version_info.c
254
255 # corresponding headers
256 dumpcap_INCLUDES = \
257         capture_stop_conditions.h       \
258         conditions.h    \
259         pcapio.h        \
260         ringbuffer.h
261
262 # this target needed for distribution only
263 noinst_HEADERS =        \
264         $(WIRESHARK_COMMON_INCLUDES) \
265         $(SHARK_COMMON_CAPTURE_INCLUDES) \
266         $(wireshark_INCLUDES) \
267         $(EXTRA_wireshark_INCLUDES) \
268         $(dumpcap_INCLUDES)