FIXUP: WIP: verification_trailer
[wireshark-wip.git] / epan / dfilter / Makefile.nmake
blobeb2b45f6d1ee863411c85e32681fcf2547c85ec7
1 ## Makefile for building wireshark.exe with Microsoft C and nmake
2 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
4 # $Id$
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
14 GENERATED_CFLAGS=\
15         $(STANDARD_CFLAGS) \
16         /I. /I.. /I..\.. $(GLIB_CFLAGS) \
17         /I$(LEMON) \
18         /I$(PCAP_DIR)\include \
19         -DWS_BUILD_DLL
21 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
23 .c.obj::
24         $(CC) $(CFLAGS) -Fd.\ -c $<
26 OBJECTS=\
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
37         cd ..\..
38         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake config.h
39         cd epan\dfilter
41 clean:
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
51 # the same for now.
53 distclean: clean
54         rm -f $(GENERATED_C_FILES) \
55                 $(NODIST_GENERATED_C_FILES) \
56                 $(GENERATED_HEADER_FILES) \
57                 $(NODIST_GENERATED_HEADER_FILES) \
58                 grammar.out
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
68 scanner.c: grammar.h
70 grammar.h : grammar.c
71 grammar.c : $(LEMON)\lemon.exe $(LEMON)\lempar.c grammar.lemon
72         $(LEMON)\lemon.exe t=$(LEMON)\lempar.c grammar.lemon
74 $(LEMON)\lemon.exe:
75         cd ../../tools
76         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake lemon
77         cd ../epan/dfilter
79 checkapi:
80         $(PERL) ../../tools/checkAPIs.pl -g termoutput -build \
81                 $(GENERATOR_FILES)      \
82                 $(NONGENERATED_C_FILES)