wireshark/epan/dfilter/Makefile.nmake
Bill Meier d3efa3ed9f A bit of Windows makefiles rework and cleanup:
- 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
2011-02-02 01:19:53 +00:00

73 lines
1.9 KiB
Makefile

## Makefile for building wireshark.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id$
include ..\..\config.nmake
include ..\..\Makefile.nmake.inc
include Makefile.common
LEMON=..\..\tools\lemon
# We GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
GENERATED_CFLAGS=\
$(STANDARD_CFLAGS) \
/I. /I.. /I..\.. $(GLIB_CFLAGS) \
/I$(LEMON) \
$(PCRE_CFLAGS) /I$(PCAP_DIR)\include
CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
OBJECTS=$(NONGENERATED_C_FILES:.c=.obj) $(GENERATED_C_FILES:.c=.obj)
dfilter.lib : $(OBJECTS)
link /lib /out:dfilter.lib $(OBJECTS)
$(OBJECTS): ..\..\config.h
..\..\config.h: ..\..\config.h.win32 ..\..\config.nmake
cd ..\..
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake config.h
cd epan\dfilter
clean:
rm -f $(OBJECTS) dfilter.lib *.pdb
#
# We remove the generated files with "distclean" because one of them,
# "scanner.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 "scanner.c" from "scanner.l" with Flex.
# This might not be necessary for "grammar.{c,h}", but we handle them
# the same for now.
#
distclean: clean
rm -f $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES) grammar.out
maintainer-clean: distclean
RUNLEX=..\..\tools\runlex.sh
scanner_lex.h : scanner.c
scanner.obj : scanner.c grammar.h
$(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c scanner.c
grammar.h : grammar.c
grammar.c : $(LEMON)\lemon.exe $(LEMON)\lempar.c grammar.lemon
$(LEMON)\lemon.exe t=$(LEMON)\lempar.c grammar.lemon
$(LEMON)\lemon.exe:
cd ../../tools
$(MAKE) /$(MAKEFLAGS) -f makefile.nmake lemon
cd ../epan/dfilter
checkapi:
$(PERL) ../../tools/checkAPIs.pl -g termoutput \
$(GENERATOR_FILES) \
$(NONGENERATED_C_FILES)