From Ivan Sy via bug 4555:
[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         color.h \
73         disabled_protos.h       \
74         file.h  \
75         fileset.h       \
76         isprint.h       \
77         packet-range.h  \
78         print.h \
79         ps.h    \
80         register.h      \
81         tempfile.h      \
82         timestats.h     \
83         util.h  \
84         tap-megaco-common.h     \
85         tap-rtp-common.h        \
86         version_info.h
87
88 # sources common for wireshark and tshark, but not rawshark;
89 # these are for programs that capture traffic by running dumpcap
90 SHARK_COMMON_CAPTURE_SRC =      \
91         capture_errs.c          \
92         capture_ifinfo.c        \
93         capture_ui_utils.c
94
95 # corresponding headers
96 SHARK_COMMON_CAPTURE_INCLUDES = \
97         capture_errs.h  \
98         capture_ifinfo.h        \
99         capture_ui_utils.h
100
101 # sources for TShark taps
102 TSHARK_TAP_SRC =        \
103         tap-afpstat.c   \
104         tap-ansi_astat.c        \
105         tap-bootpstat.c \
106         tap-camelcounter.c      \
107         tap-camelsrt.c  \
108         tap-comparestat.c       \
109         tap-dcerpcstat.c        \
110         tap-funnel.c \
111         tap-gsm_astat.c \
112         tap-h225counter.c       \
113         tap-h225rassrt.c        \
114         tap-httpstat.c  \
115         tap-iostat.c    \
116         tap-iousers.c   \
117         tap-mgcpstat.c  \
118         tap-megacostat.c        \
119         tap-protocolinfo.c      \
120         tap-protohierstat.c     \
121         tap-radiusstat.c        \
122         tap-rpcstat.c   \
123         tap-rpcprogs.c  \
124         tap-rtp.c       \
125         tap-sctpchunkstat.c     \
126         tap-sipstat.c \
127         tap-smbsids.c   \
128         tap-smbstat.c   \
129         tap-stats_tree.c        \
130         tap-wspstat.c
131
132 # helpers already available on some platforms (and on others not)
133 EXTRA_wireshark_SOURCES =       \
134         wsgetopt.c      \
135         inet_ntop.c     \
136         inet_pton.c     \
137         strerror.c      \
138         strncasecmp.c   \
139         strptime.c
140
141 # corresponding headers
142 EXTRA_wireshark_INCLUDES =      \
143         wsgetopt.h      \
144         inet_v6defs.h   \
145         strerror.h      \
146         strptime.h
147
148 # wireshark specifics
149 wireshark_SOURCES =     \
150         $(WIRESHARK_COMMON_SRC) \
151         $(SHARK_COMMON_CAPTURE_SRC) \
152         airpcap_loader.c \
153         alert_box.c     \
154         capture.c       \
155         capture_info.c  \
156         capture_opts.c \
157         capture_sync.c  \
158         color_filters.c \
159         file.c  \
160         fileset.c       \
161         filters.c       \
162         g711.c \
163         merge.c \
164         proto_hier_stats.c      \
165         summary.c       \
166         tempfile.c
167
168 # corresponding headers
169 wireshark_INCLUDES =    \
170         airpcap.h       \
171         airpcap_loader.h \
172         alert_box.h     \
173         capture.h       \
174         capture_info.h  \
175         capture_opts.h  \
176         capture_sync.h  \
177         color_filters.h \
178         filters.h       \
179         g711.h  \
180         globals.h       \
181         log.h   \
182         merge.h \
183         progress_dlg.h  \
184         proto_hier_stats.h      \
185         simple_dialog.h \
186         stat_menu.h     \
187         summary.h       \
188         sync_pipe.h     \
189         ui_util.h
190
191 # tshark specifics
192 tshark_SOURCES =        \
193         $(WIRESHARK_COMMON_SRC) \
194         $(SHARK_COMMON_CAPTURE_SRC) \
195         $(TSHARK_TAP_SRC)       \
196         capture_opts.c          \
197         capture_sync.c          \
198         tempfile.c              \
199         tshark-tap-register.c   \
200         tshark.c
201
202 # rawshark specifics
203 rawshark_SOURCES =      \
204         $(WIRESHARK_COMMON_SRC) \
205         rawshark.c
206
207 # text2pcap specifics
208 text2pcap_SOURCES = \
209         text2pcap.c \
210         text2pcap-scanner.l
211
212 # mergecap specifics
213 mergecap_SOURCES = \
214         mergecap.c \
215         merge.c \
216         svnversion.h
217
218 # editcap specifics
219 editcap_SOURCES = \
220         editcap.c       \
221         epan/crypt/crypt-md5.c \
222         epan/nstime.c \
223         $(WTAP_PLUGIN_SOURCES)
224
225 capinfos_SOURCES = \
226         capinfos.c \
227         $(WTAP_PLUGIN_SOURCES)
228
229 # dftest specifics
230 dftest_SOURCES =        \
231         dftest.c        \
232         util.c
233
234 # randpkt specifics
235 randpkt_SOURCES = \
236         randpkt.c
237
238 # dumpcap specifics
239 dumpcap_SOURCES =       \
240         $(PLATFORM_SRC) \
241         capture_opts.c \
242         capture-pcap-util.c     \
243         capture_stop_conditions.c       \
244         clopts_common.c \
245         conditions.c    \
246         dumpcap.c       \
247         pcapio.c        \
248         ringbuffer.c    \
249         sync_pipe_write.c       \
250         tempfile.c      \
251         version_info.c
252
253 # corresponding headers
254 dumpcap_INCLUDES = \
255         capture_stop_conditions.h       \
256         conditions.h    \
257         pcapio.h        \
258         ringbuffer.h
259
260 # this target needed for distribution only
261 noinst_HEADERS =        \
262         $(WIRESHARK_COMMON_INCLUDES) \
263         $(SHARK_COMMON_CAPTURE_INCLUDES) \
264         $(wireshark_INCLUDES) \
265         $(EXTRA_wireshark_INCLUDES) \
266         $(dumpcap_INCLUDES)