Use G_STRINGIFY/G_PASTE
[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 and tshark
48 WIRESHARK_COMMON_SRC =  \
49         $(PLATFORM_SRC) \
50         capture_errs.c  \
51         capture-pcap-util.c     \
52         capture_ui_utils.c      \
53         cfile.c \
54         clopts_common.c \
55         disabled_protos.c       \
56         packet-range.c  \
57         print.c \
58         ps.c    \
59         sync_pipe_write.c       \
60         timestats.c     \
61         util.c  \
62         tap-megaco-common.c     \
63         tap-rtp-common.c        \
64         version_info.c
65
66 # corresponding headers
67 WIRESHARK_COMMON_INCLUDES =     \
68         svnversion.h            \
69         capture_errs.h  \
70         capture-pcap-util.h     \
71         capture-pcap-util-int.h \
72         capture_ui_utils.h      \
73         cfile.h \
74         clopts_common.h \
75         cmdarg_err.h    \
76         color.h \
77         disabled_protos.h       \
78         file.h  \
79         fileset.h       \
80         isprint.h       \
81         packet-range.h  \
82         print.h \
83         ps.h    \
84         register.h      \
85         tempfile.h      \
86         timestats.h     \
87         util.h  \
88         tap-megaco-common.h     \
89         tap-rtp-common.h        \
90         version_info.h
91
92 # sources for TShark taps
93 TSHARK_TAP_SRC =        \
94         tap-afpstat.c   \
95         tap-ansi_astat.c        \
96         tap-bootpstat.c \
97         tap-camelcounter.c      \
98         tap-camelsrt.c  \
99         tap-comparestat.c       \
100         tap-dcerpcstat.c        \
101         tap-funnel.c \
102         tap-gsm_astat.c \
103         tap-h225counter.c       \
104         tap-h225rassrt.c        \
105         tap-httpstat.c  \
106         tap-iostat.c    \
107         tap-iousers.c   \
108         tap-mgcpstat.c  \
109         tap-megacostat.c        \
110         tap-protocolinfo.c      \
111         tap-protohierstat.c     \
112         tap-radiusstat.c        \
113         tap-rpcstat.c   \
114         tap-rpcprogs.c  \
115         tap-rtp.c       \
116         tap-sctpchunkstat.c     \
117         tap-sipstat.c \
118         tap-smbsids.c   \
119         tap-smbstat.c   \
120         tap-stats_tree.c        \
121         tap-wspstat.c
122
123 # helpers already available on some platforms (and on others not)
124 EXTRA_wireshark_SOURCES =       \
125         getopt.c        \
126         inet_ntop.c     \
127         inet_pton.c     \
128         strerror.c      \
129         strcasecmp.c    \
130         strncasecmp.c   \
131         strptime.c
132
133 # corresponding headers
134 EXTRA_wireshark_INCLUDES =      \
135         getopt.h        \
136         inet_v6defs.h   \
137         strerror.h      \
138         strptime.h
139
140 # wireshark specifics
141 wireshark_SOURCES =     \
142         $(WIRESHARK_COMMON_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
159 # corresponding headers
160 wireshark_INCLUDES =    \
161         airpcap.h       \
162         airpcap_loader.h \
163         alert_box.h     \
164         capture.h       \
165         capture_info.h  \
166         capture_opts.h  \
167         capture_sync.h  \
168         color_filters.h \
169         filters.h       \
170         g711.h  \
171         globals.h       \
172         log.h   \
173         merge.h \
174         progress_dlg.h  \
175         proto_hier_stats.h      \
176         simple_dialog.h \
177         stat_menu.h     \
178         summary.h       \
179         sync_pipe.h     \
180         ui_util.h
181
182 # tshark specifics
183 tshark_SOURCES =        \
184         $(WIRESHARK_COMMON_SRC) \
185         $(TSHARK_TAP_SRC)       \
186         capture_opts.c          \
187         capture_sync.c          \
188         tempfile.c              \
189         tshark-tap-register.c   \
190         tshark.c
191
192 # rawshark specifics
193 rawshark_SOURCES =      \
194         $(WIRESHARK_COMMON_SRC) \
195         rawshark.c
196
197 # text2pcap specifics
198 text2pcap_SOURCES = \
199         text2pcap.c \
200         text2pcap-scanner.l
201
202 # mergecap specifics
203 mergecap_SOURCES = \
204         mergecap.c \
205         merge.c \
206         svnversion.h
207
208 # editcap specifics
209 editcap_SOURCES = \
210         editcap.c       \
211         epan/crypt/crypt-md5.c \
212         epan/nstime.c \
213         $(WTAP_PLUGIN_SOURCES)
214
215 capinfos_SOURCES = \
216         capinfos.c \
217         $(WTAP_PLUGIN_SOURCES)
218
219 # dftest specifics
220 dftest_SOURCES =        \
221         dftest.c        \
222         util.c
223
224 # randpkt specifics
225 randpkt_SOURCES = \
226         randpkt.c
227
228 # dumpcap specifics
229 dumpcap_SOURCES =       \
230         $(PLATFORM_SRC) \
231         capture_opts.c \
232         capture-pcap-util.c     \
233         capture_stop_conditions.c       \
234         clopts_common.c \
235         conditions.c    \
236         dumpcap.c       \
237         pcapio.c        \
238         ringbuffer.c    \
239         sync_pipe_write.c       \
240         tempfile.c      \
241         version_info.c
242
243 # corresponding headers
244 dumpcap_INCLUDES = \
245         capture_stop_conditions.h       \
246         conditions.h    \
247         pcapio.h        \
248         ringbuffer.h
249
250 # this target needed for distribution only
251 noinst_HEADERS =        \
252         $(WIRESHARK_COMMON_INCLUDES) \
253         $(wireshark_INCLUDES) \
254         $(EXTRA_wireshark_INCLUDES) \
255         $(dumpcap_INCLUDES)