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