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
|
|
|
|
|
2007-03-27 02:14:56 +00:00
|
|
|
CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) \
|
2006-09-12 00:27:03 +00:00
|
|
|
$(NET_SNMP_CFLAGS) \
|
2006-02-06 09:09:06 +00:00
|
|
|
$(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(NETTLE_CFLAGS) \
|
2006-08-05 04:32:57 +00:00
|
|
|
$(KFW_CFLAGS) \
|
2004-10-15 15:36:12 +00:00
|
|
|
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
|
2004-07-18 18:06:47 +00:00
|
|
|
|
|
|
|
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
|
|
|
|
|
|
|
|
.c.obj::
|
|
|
|
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
|
|
|
|
|
|
|
|
DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
|
|
|
|
|
2004-07-19 21:18:40 +00:00
|
|
|
DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
|
|
|
|
|
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)
|
2004-07-25 09:58:08 +00:00
|
|
|
@echo Linking dissectors.lib
|
2006-12-28 17:22:12 +00:00
|
|
|
link /lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
|
2004-07-18 18:06:47 +00:00
|
|
|
|
2004-07-18 20:21:20 +00:00
|
|
|
#
|
|
|
|
# The header files listed here are built from x11-fields using Perl;
|
|
|
|
# we declare a dependency here so that they get built.
|
|
|
|
#
|
|
|
|
packet-x11.obj : packet-x11.c x11-declarations.h x11-register-info.h
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build various header files for the X11 dissector.
|
|
|
|
#
|
|
|
|
x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
|
|
|
|
$(PERL) process-x11-fields.pl <x11-fields
|
|
|
|
|
|
|
|
#
|
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.).
|
|
|
|
#
|
2006-04-19 09:52:23 +00:00
|
|
|
# Formatting conventions: The name of the proto_register_* routines an
|
|
|
|
# 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
|
|
|
|
2004-07-18 20:21:20 +00:00
|
|
|
register.c: $(DISSECTOR_SRC)
|
|
|
|
!IFDEF PYTHON
|
|
|
|
@echo Making register.c (using python)
|
2006-10-26 08:07:13 +00:00
|
|
|
@$(PYTHON) "../../tools/make-dissector-reg.py" . dissectors $(DISSECTOR_SRC)
|
2004-07-18 20:21:20 +00:00
|
|
|
!ELSE
|
|
|
|
@echo Making register.c (using sh)
|
2006-04-20 02:21:28 +00:00
|
|
|
@$(SH) ../../tools/make-dissector-reg . dissectors $(DISSECTOR_SRC)
|
2004-07-18 20:21:20 +00:00
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
packet-ncp2222.c : ncp2222.py
|
|
|
|
!IFDEF PYTHON
|
|
|
|
@echo Making packet-ncp2222.c
|
|
|
|
$(PYTHON) ncp2222.py -o packet-ncp2222.c
|
|
|
|
!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
|
|
|
|
|
|
|
clean:
|
2007-03-18 15:36:22 +00:00
|
|
|
rm -f dissectors.lib *.pdb \
|
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)
|