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