Don't try to g_strdup() a null value. Fixes bug 128.
[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 # Ethereal - Network traffic analyzer
9 # By Gerald Combs <gerald@ethereal.com>
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 # Header files for dissector helpers
27 # XXX - these should be moved to epan/dissectors
28 DISSECTOR_SUPPORT_INCLUDES =    \
29         aftypes.h       \
30         arcnet_pids.h   \
31         bridged_pids.h  \
32         chdlctypes.h    \
33         etypes.h        \
34         format-oid.h    \
35         greproto.h      \
36         iax2_codec_type.h       \
37         ip_opts.h       \
38         isprint.h       \
39         lapd_sapi.h     \
40         llcsaps.h       \
41         nlpid.h \
42         oui.h   \
43         ppptypes.h      \
44         rpc_defrag.h    \
45         rtp_pt.h        \
46         sctpppids.h     \
47         smb.h   \
48         x264_prt_id.h
49
50 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
51 BUILT_HEADER_FILES =    \
52         svnversion.h
53
54 BUILT_C_FILES =         \
55         ps.c
56
57 BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
58
59 # Header files generated from source files.
60 GENERATED_HEADER_FILES = \
61         $(BUILT_HEADER_FILES)
62
63 # C source files generated from source files.
64 GENERATED_C_FILES = \
65         $(BUILT_C_FILES)        \
66         tethereal-tap-register.c
67
68 # All the generated files.
69 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
70
71 # sources common for ethereal and tethereal
72 ETHEREAL_COMMON_SRC =   \
73         $(PLATFORM_SRC) \
74         capture_stop_conditions.c       \
75         capture_ui_utils.c      \
76         cfile.c \
77         clopts_common.c \
78         conditions.c    \
79         disabled_protos.c       \
80         packet-range.c  \
81         pcap-util.c     \
82         print.c \
83         ps.c    \
84         ringbuffer.c    \
85         timestats.c     \
86         util.c  \
87         version_info.c
88
89 # corresponding headers
90 ETHEREAL_COMMON_INCLUDES =      \
91         $(DISSECTOR_SUPPORT_INCLUDES)   \
92         svnversion.h            \
93         capture_stop_conditions.h       \
94         capture_ui_utils.h      \
95         cfile.h \
96         clopts_common.h \
97         color.h \
98         conditions.h    \
99         disabled_protos.h       \
100         file.h  \
101         packet-range.h  \
102         pcap-util.h     \
103         pcap-util-int.h \
104         print.h \
105         ps.h    \
106         register.h      \
107         ringbuffer.h    \
108         timestats.h     \
109         util.h  \
110         version_info.h
111
112 # sources for Tethereal taps
113 TETHEREAL_TAP_SRC =     \
114         tap-ansi_astat.c        \
115         tap-bootpstat.c \
116         tap-dcerpcstat.c        \
117         tap-gsm_astat.c \
118         tap-h225counter.c       \
119         tap-h225rassrt.c        \
120         tap-httpstat.c  \
121         tap-iostat.c    \
122         tap-iousers.c   \
123         tap-mgcpstat.c  \
124         tap-protocolinfo.c      \
125         tap-protohierstat.c     \
126         tap-rpcstat.c   \
127         tap-rpcprogs.c  \
128         tap-sctpchunkstat.c     \
129         tap-sipstat.c \
130         tap-smbsids.c   \
131         tap-smbstat.c   \
132         tap-stats_tree.c        \
133         tap-wspstat.c
134
135 # helpers alraedy available on some platforms (and on others not)
136 EXTRA_ethereal_SOURCES =        \
137         snprintf.c      \
138         strerror.c      \
139         strcasecmp.c    \
140         strncasecmp.c   \
141         mkstemp.c       \
142         strptime.c
143
144 # corresponding headers
145 EXTRA_ethereal_INCLUDES =       \
146         snprintf.h      \
147         snprintf-imp.h  \
148         strerror.h      \
149         mkstemp.h       \
150         strptime.h
151
152 # ethereal specifics
153 ethereal_SOURCES =      \
154         $(ETHEREAL_COMMON_SRC)  \
155         alert_box.c     \
156         capture.c       \
157     capture_opts.c \
158         capture_sync.c  \
159         capture_loop.c  \
160         color_filters.c \
161         file.c  \
162         filters.c       \
163         g711.c \
164         merge.c \
165         proto_hier_stats.c      \
166         summary.c
167
168 # corresponding headers
169 ethereal_INCLUDES =     \
170         alert_box.h     \
171         capture.h       \
172         capture_sync.h  \
173         color_filters.h \
174         filters.h       \
175         g711.h  \
176         globals.h       \
177         main_window.h   \
178         menu.h  \
179         merge.h \
180         progress_dlg.h  \
181         proto_hier_stats.h      \
182         simple_dialog.h \
183         statusbar.h     \
184         summary.h       \
185         tap_dfilter_dlg.h       \
186         ui_util.h
187
188 # tethereal specifics
189 tethereal_SOURCES =     \
190         $(ETHEREAL_COMMON_SRC)  \
191         $(TETHEREAL_TAP_SRC)    \
192     capture_opts.c \
193         tethereal-tap-register.c        \
194         tethereal.c
195
196 # text2pcap specifics
197 text2pcap_SOURCES = \
198         text2pcap.c \
199         text2pcap-scanner.l
200
201 # mergecap specifics
202 mergecap_SOURCES = \
203         mergecap.c \
204         merge.c \
205         svnversion.h
206
207 # editcap specifics
208 editcap_SOURCES = \
209         editcap.c
210
211 # dftest specifics
212 dftest_SOURCES =        \
213         dftest.c        \
214         util.c
215
216 # randpkt specifics
217 randpkt_SOURCES = \
218         randpkt.c
219
220 # this target needed for distribution only
221 noinst_HEADERS =        \
222         $(DISSECTOR_SUPPORT_INCLUDES) \
223         $(ETHEREAL_COMMON_INCLUDES) \
224         $(ethereal_INCLUDES) \
225         $(EXTRA_ethereal_INCLUDES)
226