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) \
18 /I$(PCAP_DIR)\include \
21 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
24 $(CC) $(CFLAGS) -Fd.\ -c $<
27 $(NONGENERATED_C_FILES:.c=.obj) \
28 $(GENERATED_C_FILES:.c=.obj) \
29 $(NODIST_GENERATED_C_FILES:.c=.obj)
31 dfilter.lib : $(OBJECTS)
32 link /lib /out:dfilter.lib $(OBJECTS)
34 $(OBJECTS): ..\..\config.h
36 ..\..\config.h: ..\..\config.h.win32 ..\..\config.nmake
38 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake config.h
42 rm -f $(OBJECTS) dfilter.lib *.pdb *.sbr
45 # We remove the generated files with "distclean" because one of them,
46 # "scanner.c", needs different #includes for UN*X and Windows
47 # (UN*X versions of Flex make it include <unistd.h>, but that's a
48 # UN*X-only header), so if you're going to build from source, you need
49 # to build "scanner.c" from "scanner.l" with Flex.
50 # This might not be necessary for "grammar.{c,h}", but we handle them
54 rm -f $(GENERATED_C_FILES) \
55 $(NODIST_GENERATED_C_FILES) \
56 $(GENERATED_HEADER_FILES) \
57 $(NODIST_GENERATED_HEADER_FILES) \
60 maintainer-clean: distclean
62 RUNLEX=..\..\tools\runlex.sh
64 scanner_lex.h : scanner.c
65 scanner.obj : scanner.c grammar.h
66 $(CC) $(GENERATED_CFLAGS) -Fd.\ -c scanner.c
71 grammar.c : $(LEMON)\lemon.exe $(LEMON)\lempar.c grammar.lemon
72 $(LEMON)\lemon.exe t=$(LEMON)\lempar.c grammar.lemon
76 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake lemon
80 $(PERL) ../../tools/checkAPIs.pl -g termoutput -build \
82 $(NONGENERATED_C_FILES)