Simplify the test in a loop.
[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-hosts.c     \
117         tap-httpstat.c  \
118         tap-icmpstat.c  \
119         tap-icmpv6stat.c        \
120         tap-iostat.c    \
121         tap-iousers.c   \
122         tap-mgcpstat.c  \
123         tap-megacostat.c        \
124         tap-protocolinfo.c      \
125         tap-protohierstat.c     \
126         tap-radiusstat.c        \
127         tap-rpcstat.c   \
128         tap-rpcprogs.c  \
129         tap-rtp.c       \
130         tap-scsistat.c  \
131         tap-sctpchunkstat.c     \
132         tap-sipstat.c \
133         tap-smbsids.c   \
134         tap-smbstat.c   \
135         tap-stats_tree.c        \
136         tap-sv.c \
137         tap-wspstat.c
138
139 # wireshark specifics
140 wireshark_SOURCES =     \
141         $(WIRESHARK_COMMON_SRC) \
142         $(SHARK_COMMON_CAPTURE_SRC) \
143         airpcap_loader.c \
144         alert_box.c     \
145         capture.c       \
146         capture_info.c  \
147         capture_opts.c \
148         capture_sync.c  \
149         color_filters.c \
150         file.c  \
151         fileset.c       \
152         filters.c       \
153         g711.c \
154         merge.c \
155         proto_hier_stats.c      \
156         summary.c       \
157         tempfile.c      \
158         u3.c
159
160 # corresponding headers
161 wireshark_INCLUDES =    \
162         airpcap.h       \
163         airpcap_loader.h \
164         alert_box.h     \
165         capture.h       \
166         capture_info.h  \
167         capture_opts.h  \
168         capture_sync.h  \
169         color_filters.h \
170         filters.h       \
171         g711.h  \
172         globals.h       \
173         log.h   \
174         main_statusbar.h        \
175         merge.h \
176         progress_dlg.h  \
177         proto_hier_stats.h      \
178         simple_dialog.h \
179         stat_menu.h     \
180         summary.h       \
181         sync_pipe.h     \
182         u3.h    \
183         ui_util.h
184
185 # tshark specifics
186 tshark_SOURCES =        \
187         $(WIRESHARK_COMMON_SRC) \
188         $(SHARK_COMMON_CAPTURE_SRC) \
189         $(TSHARK_TAP_SRC)       \
190         capture_opts.c          \
191         capture_sync.c          \
192         tempfile.c              \
193         tshark-tap-register.c   \
194         tshark.c
195
196 # rawshark specifics
197 rawshark_SOURCES =      \
198         $(WIRESHARK_COMMON_SRC) \
199         rawshark.c
200
201 # text2pcap specifics
202 text2pcap_SOURCES = \
203         text2pcap.c \
204         text2pcap-scanner.l
205
206 # mergecap specifics
207 mergecap_SOURCES = \
208         mergecap.c \
209         merge.c \
210         svnversion.h
211
212 # editcap specifics
213 editcap_SOURCES = \
214         editcap.c       \
215         epan/crypt/crypt-md5.c \
216         epan/nstime.c \
217         $(WTAP_PLUGIN_SOURCES)
218
219 capinfos_SOURCES = \
220         capinfos.c \
221         $(WTAP_PLUGIN_SOURCES)
222
223 # dftest specifics
224 dftest_SOURCES =        \
225         dftest.c        \
226         util.c
227
228 # randpkt specifics
229 randpkt_SOURCES = \
230         randpkt.c
231
232 # dumpcap specifics
233 dumpcap_SOURCES =       \
234         $(PLATFORM_SRC) \
235         capture_opts.c \
236         capture-pcap-util.c     \
237         capture_stop_conditions.c       \
238         clopts_common.c \
239         conditions.c    \
240         dumpcap.c       \
241         pcapio.c        \
242         ringbuffer.c    \
243         sync_pipe_write.c       \
244         tempfile.c      \
245         version_info.c
246
247 # corresponding headers
248 dumpcap_INCLUDES = \
249         capture_stop_conditions.h       \
250         conditions.h    \
251         pcapio.h        \
252         ringbuffer.h
253
254 # this target needed for distribution only
255 noinst_HEADERS =        \
256         $(WIRESHARK_COMMON_INCLUDES) \
257         $(SHARK_COMMON_CAPTURE_INCLUDES) \
258         $(wireshark_INCLUDES) \
259         $(dumpcap_INCLUDES)