right; this is going badly.

Let's take a different tack: include only the bare minimum, and set up stubs for everything else.

svn path=/trunk/; revision=21379
This commit is contained in:
Richard van der Hoff 2007-04-11 00:22:58 +00:00
parent 161c7f8b8c
commit d1f795d28e
3 changed files with 47 additions and 41 deletions

View File

@ -108,8 +108,12 @@ MAINTAINERCLEANFILES = \
libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SNMP_LIBS@ @SSL_LIBS@ -lm
libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib)
EXTRA_PROGRAMS = reassemble_test
reassemble_test_LDADD = $(GLIB_LIBS) @LIBGCRYPT_LIBS@ libwireshark.la
#EXTRA_PROGRAMS = reassemble_test
#reassemble_test_LDADD = $(GLIB_LIBS)
reassemble_test: reassemble_test.o tvbuff.o except.o strutil.o emem.o \
reassemble.o
$(LINK) $^ $(GLIB_LIBS) -lz
tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o
$(LINK) $^ $(GLIB_LIBS) -lz

View File

@ -192,21 +192,6 @@ exntest: exntest.exe
reassemble_test: reassemble_test.exe
tvbtest: tvbtest.exe
# don't really understand why we need all this extra guff - shouldn't
# they be in libwireshark.lib, otherwise how does tshark.exe link?
REASSEMBLE_TEST_LIBS=\
$(NET_SNMP_LIBS) \
dissectors\dissectors.lib \
crypt\airpdcap.lib \
dfilter\dfilter.lib \
ftypes\ftypes.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(GLIB_LIBS) \
$(GNUTLS_LIBS) \
$(WSLUA_LIB) \
libwireshark.lib
exntest.exe: exntest.obj except.obj
@ -219,11 +204,12 @@ tvbtest.exe: tvbtest.obj tvbuff.obj except.obj strutil.obj emem.obj
$(LINK) /OUT:$@ $(LOCAL_LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console \
$(GLIB_LIBS) tvbtest.obj tvbuff.obj except.obj strutil.obj emem.obj
reassemble_test.exe: reassemble_test.obj $(REASSEMBLE_TEST_LIBS)
reassemble_test.exe: reassemble_test.obj tvbuff.o except.o strutil.o emem.o \
reassemble.o
@echo Linking $@
$(LINK) /OUT:$@ $(LOCAL_LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console \
wsock32.lib user32.lib \
$(REASSEMBLE_TEST_LIBS) reassemble_test.obj
$(GLIB_LIBS) $(ZLIB_LIBS) reassemble_test.obj tvbuff.o except.o strutil.o emem.o \
reassemble.o
# (Windows only) Copy some sources from /trunk to /trunk/epan.
# It is a cleaner to compile these sources seperately with this makefile than

View File

@ -1057,31 +1057,47 @@ int main(int argc, char **argv)
}
/* the following are used by packet-mpeg-audio.c; define them here to avoid
* pulling in libwiretap. */
const int mpa_versions[4];
const int mpa_layers[4];
const unsigned mpa_samples[3][3];
const unsigned mpa_bitrates[3][3][16];
const unsigned mpa_frequencies[3][4];
const unsigned mpa_padding[3];
/* stubs */
void add_new_data_source(packet_info *pinfo _U_, tvbuff_t *tvb _U_,
const char *name _U_)
{}
#include "wiretap/file_util.h"
proto_item *
proto_tree_add_uint(proto_tree *tree _U_, int hfindex _U_, tvbuff_t *tvb _U_,
gint start _U_, gint length _U_, guint32 value _U_)
{ return NULL; }
/* these are used by the wiretap file_util stuffs under win32 */
int eth_stdio_stat (const gchar *filename _U_, struct stat *buf _U_)
{ return -1; }
void proto_item_append_text(proto_item *ti _U_, const char *format _U_, ...)
{}
FILE *eth_stdio_fopen (const gchar *filename _U_, const gchar *mode _U_)
proto_item *proto_tree_add_uint_format(proto_tree *tree _U_, int hfindex _U_,
tvbuff_t *tvb _U_, gint start _U_,
gint length _U_, guint32 value _U_,
const char *format _U_, ...)
{ return NULL; }
proto_tree* proto_item_add_subtree(proto_item *ti _U_, gint idx _U_)
{ return NULL; }
proto_item *proto_tree_add_boolean(proto_tree *tree _U_, int hfindex _U_,
tvbuff_t *tvb _U_, gint start _U_,
gint length _U_, guint32 value _U_)
{ return NULL; }
proto_item *proto_tree_add_item(proto_tree *tree _U_, int hfindex _U_,
tvbuff_t *tvb _U_, gint start _U_,
gint length _U_, gboolean little_endian _U_)
{ return NULL; }
gint check_col(column_info *cinfo _U_, gint col _U_)
{ return 0; }
int eth_stdio_mkdir (const gchar *filename _U_, int mode _U_)
{ return -1; }
int eth_stdio_unlink (const gchar *filename _U_)
{ return -1; }
void col_add_fstr(column_info *cinfo _U_, gint col _U_, const gchar *format _U_,
...)
{}