![Bill Meier](/assets/img/avatar_default.png)
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile; a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS; b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake) (This allows disabling "Warnings as Errors" by just changing config.nmake) c. CVARSDLL definitions (not usage) have been removed from the various makefiles. XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since: -DWIN32 and -DNULL=0 do not appear to be needed (any more); -D_MT and _D_DLL are not needed since /MP causes these definitions. d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled. E.G., 4295: array is too small to include a terminating null character - config.nmake: reformat some long lines for readability; - plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile); - dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ... svn path=/trunk/; revision=35747
70 lines
1.7 KiB
Makefile
70 lines
1.7 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
include ..\..\config.nmake
|
|
include <win32.mak>
|
|
|
|
############### no need to modify below this line #########
|
|
|
|
LEMON=..\..\tools\lemon
|
|
|
|
CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
|
|
/I../.. $(GLIB_CFLAGS) /I$(LEMON) \
|
|
/I$(PCAP_DIR)\include
|
|
|
|
.c.obj::
|
|
$(CC) $(CFLAGS) -Fdmate.pdb -c $<
|
|
|
|
LDFLAGS = $(PLUGIN_LDFLAGS)
|
|
|
|
!IFDEF ENABLE_LIBWIRESHARK
|
|
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
|
|
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
|
|
|
|
OBJECTS=packet-mate.obj\
|
|
mate_setup.obj\
|
|
mate_runtime.obj\
|
|
mate_util.obj\
|
|
mate_plugin.obj\
|
|
mate_grammar.obj\
|
|
mate_parser.obj
|
|
|
|
mate.dll mate.exp mate.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
|
|
link -dll /out:mate.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
|
|
$(GLIB_LIBS)
|
|
|
|
!ENDIF
|
|
|
|
clean:
|
|
rm -f $(OBJECTS) mate.dll mate.exp mate.lib *.pdb
|
|
|
|
#
|
|
# We remove the generated files with "distclean" because one of them,
|
|
# "mate_parser.c", needs different #includes for UN*X and Windows
|
|
# (UN*X versions of Flex make it include <unistd.h>, but that's a
|
|
# UN*X-only header), so if you're going to build from source, you need
|
|
# to build "mate_parser.c" from "mate_parser.l" with Flex.
|
|
# This might not be necessary for "mate_grammar.{c,h}", but we handle them
|
|
# the same for now.
|
|
#
|
|
distclean: clean
|
|
rm -f mate_parser.c mate_grammar.c mate_grammar.h mate_grammar.out
|
|
|
|
maintainer-clean: distclean
|
|
|
|
mate_parser.c : mate_parser.l
|
|
$(LEX) -Pdf_ -omate_parser.c mate_parser.l
|
|
|
|
mate_grammar.h : mate_grammar.c
|
|
mate_grammar.c : mate_grammar.lemon $(LEMON)\lemon.exe
|
|
$(LEMON)\lemon.exe t=$(LEMON)\lempar.c mate_grammar.lemon
|
|
|
|
$(LEMON)\lemon.exe:
|
|
cd ../../tools
|
|
$(MAKE) /$(MAKEFLAGS) -f makefile.nmake lemon
|
|
cd ../plugins/mate
|
|
|
|
checkapi:
|
|
$(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
|