2002-02-27 09:42:52 +00:00
|
|
|
## Makefile for building ethereal.exe with Microsoft C and nmake
|
|
|
|
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
|
|
|
|
#
|
2004-05-13 10:10:28 +00:00
|
|
|
# $Id: Makefile.nmake,v 1.43 2004/05/13 10:10:28 ulfl Exp $
|
2002-02-27 09:42:52 +00:00
|
|
|
|
2000-10-11 07:35:02 +00:00
|
|
|
include ..\config.nmake
|
2004-05-09 10:03:41 +00:00
|
|
|
include <win32.mak>
|
2004-03-22 20:35:07 +00:00
|
|
|
include Makefile.common
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2004-05-09 10:03:41 +00:00
|
|
|
|
2000-10-11 07:35:02 +00:00
|
|
|
############### no need to modify below this line #########
|
|
|
|
|
2004-01-22 19:27:59 +00:00
|
|
|
CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
|
2004-05-06 20:48:36 +00:00
|
|
|
$(ZLIB_CFLAGS) $(ADNS_CFLAGS) $(PCRE_CFLAGS) /I$(PCAP_DIR)\include \
|
2003-12-07 00:04:32 +00:00
|
|
|
-D_U_="" $(LOCAL_CFLAGS)
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2001-03-23 02:05:29 +00:00
|
|
|
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
|
|
|
|
|
2004-05-09 10:03:41 +00:00
|
|
|
# For use when making libethereal.dll
|
2000-10-14 04:31:26 +00:00
|
|
|
libethereal_LIBS = \
|
2004-05-09 10:03:41 +00:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
$(ADNS_LIBS) \
|
|
|
|
$(PCRE_LIBS) \
|
|
|
|
$(ZLIB_LIBS) \
|
|
|
|
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib \
|
|
|
|
ftypes\ftypes.lib \
|
|
|
|
dfilter\dfilter.lib \
|
|
|
|
..\dissectors.lib
|
2000-10-14 04:31:26 +00:00
|
|
|
|
2001-12-12 01:29:13 +00:00
|
|
|
.c.obj::
|
2004-03-22 20:35:07 +00:00
|
|
|
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2004-03-06 03:25:10 +00:00
|
|
|
OBJECTS=addr_and_mask.obj \
|
|
|
|
atalk-utils.obj \
|
2001-03-23 02:05:29 +00:00
|
|
|
bitswap.obj \
|
2002-10-22 08:22:07 +00:00
|
|
|
circuit.obj \
|
2001-04-02 09:21:31 +00:00
|
|
|
column-utils.obj \
|
Move the table of bit-swapped byte values to "epan/bitswap.c", and
declare it, and define a "BIT_SWAP" macro that uses it, in
"epan/bitswap.h".
Use that macro to bit-swap bytes in the IEEE 802.11 dissector, rather
than the macro that was used (said macro used GCCisms and didn't compile
on Windows).
Make an "init_plugin()" routine to enable a plugin and call its init
routine, and call it from "check_plugin_status()" and
"plugins_enable_cb()", rather than having very similar code in two
places; "patable" is now part of libethereal, and, at least on Windows,
attempts to refer to it from "libui" failed. Make "patable" static to
"epan/plugins.c". (This may still not work, as now "libui" is calling a
routine in "libethereal"; if that fails, perhaps it's time to get rid of
the "enable/disable plugins" stuff completely, as new-style plugins, at
least, register themselves as protocols and should be controllable from
the "Edit->Protocols" window just as built-in dissectors are.)
svn path=/trunk/; revision=2649
2000-11-15 09:37:53 +00:00
|
|
|
conversation.obj \
|
2000-10-11 07:35:02 +00:00
|
|
|
epan.obj \
|
|
|
|
except.obj \
|
|
|
|
filesystem.obj \
|
2001-04-01 04:13:14 +00:00
|
|
|
frame_data.obj \
|
2000-10-14 04:31:26 +00:00
|
|
|
inet_aton.obj \
|
|
|
|
inet_pton.obj \
|
|
|
|
inet_ntop.obj \
|
2000-10-11 07:35:02 +00:00
|
|
|
ipv4.obj \
|
2001-11-24 21:51:40 +00:00
|
|
|
int-64bit.obj \
|
2001-04-01 05:49:31 +00:00
|
|
|
osi-utils.obj \
|
2000-10-11 07:35:02 +00:00
|
|
|
packet.obj \
|
|
|
|
plugins.obj \
|
|
|
|
proto.obj \
|
2004-03-22 20:35:07 +00:00
|
|
|
register.obj \
|
2000-10-11 07:35:02 +00:00
|
|
|
resolv.obj \
|
2001-03-23 02:05:29 +00:00
|
|
|
sna-utils.obj \
|
2000-10-11 07:35:02 +00:00
|
|
|
strutil.obj \
|
2004-03-18 19:04:33 +00:00
|
|
|
timestamp.obj \
|
2001-04-01 02:52:10 +00:00
|
|
|
to_str.obj \
|
2000-10-11 07:35:02 +00:00
|
|
|
tvbuff.obj \
|
2004-03-22 20:35:07 +00:00
|
|
|
value_string.obj
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2004-05-09 10:03:41 +00:00
|
|
|
!IFDEF ENABLE_LIBETHEREAL
|
|
|
|
all: ftypes dfilter libethereal.dll
|
|
|
|
!ELSE
|
2001-02-02 04:03:43 +00:00
|
|
|
all: ftypes dfilter ethereal.lib
|
2004-05-09 10:03:41 +00:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
# For use when making libethereal.dll
|
|
|
|
libethereal.lib: libethereal.dll
|
|
|
|
libethereal.exp: libethereal.dll
|
2001-02-02 04:03:43 +00:00
|
|
|
|
2004-05-11 00:53:12 +00:00
|
|
|
libethereal.dll: ..\config.h $(OBJECTS) libethereal.def ftypes dfilter doxygen
|
2004-05-09 10:03:41 +00:00
|
|
|
$(link) $(dlllflags) $(conlibsdll) \
|
|
|
|
$(LOCAL_LDFLAGS) \
|
|
|
|
/DEF:libethereal.def /OUT:libethereal.dll \
|
|
|
|
/IMPLIB:libethereal.lib $(OBJECTS) $(libethereal_LIBS)
|
|
|
|
|
2000-10-14 04:31:26 +00:00
|
|
|
|
2004-05-06 20:48:36 +00:00
|
|
|
ethereal.lib : ..\config.h $(OBJECTS)
|
2004-03-22 20:35:07 +00:00
|
|
|
lib /out:ethereal.lib $(OBJECTS)
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2004-05-06 20:48:36 +00:00
|
|
|
..\config.h : ..\config.h.win32 ..\config.nmake
|
|
|
|
cd ..
|
|
|
|
$(MAKE) -f Makefile.nmake config.h
|
|
|
|
cd epan
|
2000-10-11 07:35:02 +00:00
|
|
|
|
|
|
|
clean:
|
2004-05-13 10:10:28 +00:00
|
|
|
rm -f $(OBJECTS) ethereal.lib libethereal.dll libethereal.lib libethereal.exp $(PDB_FILE) doxygen.tmp
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ftypes
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ../dfilter
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
|
2003-10-13 19:04:56 +00:00
|
|
|
cd ..
|
2001-02-02 04:03:43 +00:00
|
|
|
|
2003-10-10 21:31:53 +00:00
|
|
|
distclean: clean
|
2004-03-02 18:55:30 +00:00
|
|
|
rm -f config.h register.c
|
2003-10-10 21:31:53 +00:00
|
|
|
cd ftypes
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
|
|
|
|
cd ../dfilter
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
|
2003-10-13 19:04:56 +00:00
|
|
|
cd ..
|
2001-02-02 04:03:43 +00:00
|
|
|
|
2004-05-06 20:48:36 +00:00
|
|
|
ftypes:: ..\config.h
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ftypes
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ..
|
|
|
|
|
2004-05-06 20:48:36 +00:00
|
|
|
dfilter:: ..\config.h
|
2001-02-02 04:03:43 +00:00
|
|
|
cd dfilter
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ..
|
2004-03-02 01:21:56 +00:00
|
|
|
|
2004-05-13 10:10:28 +00:00
|
|
|
doxygen.tmp: ..\config.nmake doxygen.cfg
|
|
|
|
sed -e s/@VERSION@/$(VERSION)/ \
|
|
|
|
< doxygen.cfg > $@
|
|
|
|
|
|
|
|
doxygen-run:
|
2004-05-11 00:53:12 +00:00
|
|
|
!IFDEF DOXYGEN
|
2004-05-13 10:10:28 +00:00
|
|
|
$(DOXYGEN) doxygen.tmp
|
2004-05-11 00:53:12 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2004-05-13 10:10:28 +00:00
|
|
|
doxygen: doxygen.tmp doxygen-run
|
|
|
|
|
2004-03-02 01:21:56 +00:00
|
|
|
#
|
|
|
|
# Build "register.c", which contains a function "register_all_protocols()"
|
|
|
|
# that calls the register routines for all protocols.
|
|
|
|
#
|
|
|
|
# We do this by grepping through sources. If that turns out to be too slow,
|
|
|
|
# maybe we could just require every .o file to have an register routine
|
|
|
|
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
|
|
|
|
#
|
|
|
|
# Formatting conventions: The name of the proto_register_* routines must
|
|
|
|
# start in column zero, or must be preceded only by "void " starting in
|
|
|
|
# column zero, and must not be inside #if.
|
|
|
|
#
|
|
|
|
# We assume that all dissector routines are in "packet-XXX.c" files.
|
|
|
|
#
|
|
|
|
# For some unknown reason, having a big "for" loop in the Makefile
|
|
|
|
# to scan all the "packet-XXX.c" files doesn't work with some "make"s;
|
|
|
|
# they seem to pass only the first few names in the list to the shell,
|
|
|
|
# for some reason.
|
|
|
|
#
|
|
|
|
# Therefore, we have a script to generate the "register.c" file.
|
|
|
|
#
|
|
|
|
# The first argument is the name of the file to write.
|
|
|
|
# The second argument is the directory in which the source files live.
|
|
|
|
# All subsequent arguments are the files to scan.
|
|
|
|
#
|
|
|
|
# On Windows, however, that script runs slowly, as multiple greps
|
|
|
|
# and seds are run for each input file, so, if Python is present
|
|
|
|
# (as indicated by PYTHON being defined), we run a faster Python
|
|
|
|
# script to do that work instead. That script doesn't take the name
|
|
|
|
# of the file to write as an argument; it always writes to
|
|
|
|
# "register.c".
|
|
|
|
#
|
|
|
|
register.c: $(DISSECTOR_SRC)
|
|
|
|
!IFDEF PYTHON
|
|
|
|
@echo Making register.c (using python)
|
2004-03-22 20:35:07 +00:00
|
|
|
@$(PYTHON) ..\make-reg-dotc.py . $(DISSECTOR_SRC)
|
2004-03-02 01:21:56 +00:00
|
|
|
!ELSE
|
|
|
|
@echo Making register.c (using sh)
|
|
|
|
@$(SH) ../make-reg-dotc register.c . $(DISSECTOR_SRC)
|
|
|
|
!ENDIF
|