2006-06-07 22:57:54 +00:00
|
|
|
## Makefile for building wireshark.exe with Microsoft C and nmake
|
2004-07-18 18:06:47 +00:00
|
|
|
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
|
|
|
|
#
|
2004-07-27 02:52:49 +00:00
|
|
|
# $Id$
|
2004-07-18 18:06:47 +00:00
|
|
|
|
|
|
|
include ..\..\config.nmake
|
|
|
|
|
|
|
|
############### no need to modify below this line #########
|
|
|
|
|
2004-07-18 21:02:19 +00:00
|
|
|
include Makefile.common
|
|
|
|
|
2011-02-02 01:19:53 +00:00
|
|
|
CFLAGS= $(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
|
|
|
|
/I. /I.. /I../.. $(GLIB_CFLAGS) \
|
2007-09-24 06:59:40 +00:00
|
|
|
$(ZLIB_CFLAGS) \
|
2011-08-23 09:25:06 +00:00
|
|
|
$(GNUTLS_CFLAGS) $(NETTLE_CFLAGS) \
|
2008-12-23 18:56:31 +00:00
|
|
|
$(KFW_CFLAGS) $(AIRPCAP_CFLAGS) $(GEOIP_CFLAGS) \
|
2011-02-02 01:19:53 +00:00
|
|
|
/I$(PCAP_DIR)\include
|
2004-07-18 18:06:47 +00:00
|
|
|
|
|
|
|
.c.obj::
|
2012-02-24 16:23:38 +00:00
|
|
|
$(CC) $(CFLAGS) -Fd.\ -c $<
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2007-04-03 20:52:37 +00:00
|
|
|
DISSECTOR_OBJECTS = \
|
|
|
|
$(ALL_DISSECTORS_SRC:.c=.obj)
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2007-04-03 20:52:37 +00:00
|
|
|
DISSECTOR_SUPPORT_OBJECTS = \
|
|
|
|
$(DISSECTOR_SUPPORT_SRC:.c=.obj)
|
2004-07-19 21:18:40 +00:00
|
|
|
|
2006-12-28 17:22:12 +00:00
|
|
|
dissectors.lib: register.obj packet-ncp2222.c $(GENERATED_HEADER_FILES) ../../config.h $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
|
2009-09-12 23:02:34 +00:00
|
|
|
@echo Linking dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
|
|
|
|
link /lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2011-02-02 01:19:53 +00:00
|
|
|
!IF "$(MSVC_VARIANT)" != "MSVC2005" && \
|
|
|
|
"$(MSVC_VARIANT)" != "MSVC2005EE" && \
|
|
|
|
"$(MSVC_VARIANT)" != "MSVC2008" && \
|
|
|
|
"$(MSVC_VARIANT)" != "MSVC2008EE" && \
|
|
|
|
"$(MSVC_VARIANT)" != "MSVC2010" && \
|
2012-12-28 22:13:05 +00:00
|
|
|
"$(MSVC_VARIANT)" != "MSVC2010EE" && \
|
|
|
|
"$(MSVC_VARIANT)" != "MSVC2012" && \
|
|
|
|
"$(MSVC_VARIANT)" != "MSVC2012EE"
|
2008-08-14 20:56:34 +00:00
|
|
|
# Disable debug for large dissectors
|
2007-05-25 06:54:39 +00:00
|
|
|
packet-rrc.obj : packet-rrc.c
|
2012-02-24 16:23:38 +00:00
|
|
|
$(CC) $(CFLAGS) /Zd /Fd.\ -c $?
|
2008-08-14 20:56:34 +00:00
|
|
|
!ENDIF
|
2007-05-25 06:54:39 +00:00
|
|
|
|
2004-07-18 20:21:20 +00:00
|
|
|
#
|
2006-04-19 09:52:23 +00:00
|
|
|
# Build register.c, which contains a function register_all_protocols()
|
|
|
|
# that calls the register routines for all protocols and a function
|
|
|
|
# register_all_protocol_handoffs() that calls the handoff registration
|
|
|
|
# routines for all protocols.
|
2004-07-18 20:21:20 +00:00
|
|
|
#
|
2006-04-19 09:52:23 +00:00
|
|
|
# We do this by scanning through sources. If that turns out to be too slow,
|
2004-07-18 20:21:20 +00:00
|
|
|
# maybe we could just require every .o file to have an register routine
|
|
|
|
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
|
|
|
|
#
|
2008-07-27 23:09:37 +00:00
|
|
|
# Formatting conventions: The name of the proto_register_* routines and
|
2006-04-19 09:52:23 +00:00
|
|
|
# proto_reg_handoff_* routines must start in column zero, or must be
|
|
|
|
# preceded only by "void " starting in column zero, and must not be
|
|
|
|
# inside #if.
|
2004-07-18 20:21:20 +00:00
|
|
|
#
|
2006-04-19 09:52:23 +00:00
|
|
|
# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
|
2004-07-18 20:21:20 +00:00
|
|
|
#
|
|
|
|
# For some unknown reason, having a big "for" loop in the Makefile
|
2006-04-19 09:52:23 +00:00
|
|
|
# to scan all the 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.
|
2004-07-18 20:21:20 +00:00
|
|
|
#
|
2006-04-19 09:52:23 +00:00
|
|
|
# Therefore, we have a script to generate the register.c file.
|
|
|
|
# The shell script runs slowly, as multiple greps and seds are run
|
|
|
|
# for each input file; this is especially slow on Windows. Therefore,
|
|
|
|
# if Python is present (as indicated by PYTHON being defined), we run
|
|
|
|
# a faster Python script to do that work instead.
|
2004-07-18 20:21:20 +00:00
|
|
|
#
|
2006-04-19 09:52:23 +00:00
|
|
|
# The first argument is the directory in which the source files live.
|
|
|
|
# The second argument is "dissectors", to indicate that we should build
|
2006-05-31 00:23:01 +00:00
|
|
|
# a register.c file for libwireshark.
|
2004-07-18 20:21:20 +00:00
|
|
|
# All subsequent arguments are the files to scan.
|
|
|
|
#
|
2006-12-05 19:24:25 +00:00
|
|
|
|
2011-04-20 17:08:40 +00:00
|
|
|
register.c: $(ALL_DISSECTORS_SRC) Makefile.common ..\..\tools\make-dissector-reg.py ..\..\tools\make-dissector-reg
|
2004-07-18 20:21:20 +00:00
|
|
|
!IFDEF PYTHON
|
|
|
|
@echo Making register.c (using python)
|
2007-04-05 21:38:39 +00:00
|
|
|
@$(PYTHON) "../../tools/make-dissector-reg.py" . dissectors $(ALL_DISSECTORS_SRC)
|
2004-07-18 20:21:20 +00:00
|
|
|
!ELSE
|
|
|
|
@echo Making register.c (using sh)
|
2009-10-09 20:53:33 +00:00
|
|
|
@$(SH) ../../tools/make-dissector-reg . dissectors $(ALL_DISSECTORS_SRC)
|
2004-07-18 20:21:20 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2009-10-09 20:53:33 +00:00
|
|
|
packet-ncp2222.c: ..\..\tools/ncp2222.py
|
2004-07-18 20:21:20 +00:00
|
|
|
!IFDEF PYTHON
|
|
|
|
@echo Making packet-ncp2222.c
|
2009-09-13 02:12:03 +00:00
|
|
|
$(PYTHON) "../../tools/ncp2222.py" -o packet-ncp2222.c
|
2004-07-18 20:21:20 +00:00
|
|
|
!ELSE
|
|
|
|
@echo Faking packet-ncp2222.c...
|
|
|
|
@echo Python is required to build the NCP disector
|
|
|
|
@echo Hiding packet-ncp.c...
|
|
|
|
mv packet-ncp.c packet-ncp.c.save
|
|
|
|
touch packet-ncp.c $@
|
|
|
|
!ENDIF
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2008-07-27 23:09:37 +00:00
|
|
|
packet-ncp2222.obj: packet-ncp2222.inc
|
|
|
|
|
2009-09-12 23:02:34 +00:00
|
|
|
# Target to rebuild the X11 dissector header files.
|
|
|
|
# See README.X11 before using this--it requires the xcb and mesa source.
|
2009-09-13 02:12:03 +00:00
|
|
|
x11-dissector: ..\..\tools/process-x11-fields.pl x11-fields ..\..\tools/process-x11-xcb.pl
|
2009-09-12 23:02:34 +00:00
|
|
|
$(PERL) ../../tools/process-x11-fields.pl < x11-fields
|
|
|
|
$(PERL) ../../tools/process-x11-xcb.pl
|
|
|
|
|
2004-07-18 18:06:47 +00:00
|
|
|
clean:
|
2012-01-29 20:21:30 +00:00
|
|
|
rm -f dissectors.lib *.pdb *.sbr register.c-tmp register-cache.pkl \
|
2004-07-18 18:06:47 +00:00
|
|
|
$(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
|
|
|
|
|
|
|
|
distclean: clean
|
Make the "maintainer-clean" rules get rid of some additional generated
files. Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and
GENERATED_FILES macros in Makefile.common files, along the lines of what
wiretap/Makefile.common has.
Clean up "*~" files with "make clean" rather than only "make distclean"
in some additional places.
Add "maintainer-clean" rules to the Makefile.nmake files, paralelling
the ones in the automake-generated Makefile.in files, using the
GENERATED_FILES macros from Makefile.common files. In some cases, move
the cleanup of files from "make distclean" to "make maintainer-clean",
and in other cases, put in a comment indicating why we're not doing that
(because some files that are distributed in the source tarballs, namely
Flex output, were built with a UN*X Flex and won't compile on Windows,
so we get rid of them with "make distclean" so you can clean up stuff
that *has* to be re-generated for Windows).
Clean up some *CLEANFILES definitions - get rid of ones that no longer
apply as files were moved or that add to the definition a name that's
already there.
svn path=/trunk/; revision=13402
2005-02-14 20:33:57 +00:00
|
|
|
|
|
|
|
maintainer-clean: distclean
|
|
|
|
rm -f $(GENERATED_FILES)
|
2010-11-30 02:04:55 +00:00
|
|
|
|
|
|
|
checkapi:
|
2012-04-04 20:46:49 +00:00
|
|
|
$(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
|
2012-12-05 15:11:08 +00:00
|
|
|
$(ALL_DISSECTORS_SRC) $(DISSECTOR_INCLUDES) $(DISSECTOR_SUPPORT_SRC)
|