1 ## Makefile for building wireshark.exe with Microsoft C and nmake
2 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
6 include ..\..\config.nmake
7 include ..\..\Makefile.nmake.inc
9 include Makefile.common
11 LEMON=..\..\tools\lemon
13 # We GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
16 /I. /I.. /I..\.. $(GLIB_CFLAGS) \
20 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
23 $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
25 OBJECTS=$(NONGENERATED_C_FILES:.c=.obj) $(GENERATED_C_FILES:.c=.obj)
27 dfilter.lib : $(OBJECTS)
28 link /lib /out:dfilter.lib $(OBJECTS)
30 $(OBJECTS): ..\..\config.h
32 ..\..\config.h: ..\..\config.h.win32 ..\..\config.nmake
34 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake config.h
38 rm -f $(OBJECTS) dfilter.lib *.pdb *.sbr
41 # We remove the generated files with "distclean" because one of them,
42 # "scanner.c", needs different #includes for UN*X and Windows
43 # (UN*X versions of Flex make it include <unistd.h>, but that's a
44 # UN*X-only header), so if you're going to build from source, you need
45 # to build "scanner.c" from "scanner.l" with Flex.
46 # This might not be necessary for "grammar.{c,h}", but we handle them
50 rm -f $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES) grammar.out
52 maintainer-clean: distclean
54 RUNLEX=..\..\tools\runlex.sh
56 scanner_lex.h : scanner.c
57 scanner.obj : scanner.c grammar.h
58 $(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c scanner.c
61 grammar.c : $(LEMON)\lemon.exe $(LEMON)\lempar.c grammar.lemon
62 $(LEMON)\lemon.exe t=$(LEMON)\lempar.c grammar.lemon
66 $(MAKE) /$(MAKEFLAGS) -f makefile.nmake lemon
70 $(PERL) ../../tools/checkAPIs.pl -g termoutput \
72 $(NONGENERATED_C_FILES)