wtap: Make default_filter static
[metze/wireshark/wip.git] / wiretap / Makefile.nmake
1 #
2
3 include ..\config.nmake
4 include <win32.mak>
5 include ..\Makefile.nmake.inc
6
7 include Makefile.common
8
9 # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
10 GENERATED_CFLAGS=\
11         $(STANDARD_CFLAGS) \
12         -DYYMALLOC=malloc -DYYFREE=free \
13         /I. /I.. $(GLIB_CFLAGS) \
14         $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
15         -DWS_BUILD_DLL
16
17 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
18
19 .c.obj::
20         $(CC) $(CFLAGS) -Fd.\ -c $<
21
22 OBJECTS=$(NONGENERATED_C_FILES:.c=.obj) $(GENERATED_C_FILES:.c=.obj)
23
24 wiretap_LIBS = \
25         $(GLIB_LIBS)    \
26         ..\wsutil\libwsutil.lib \
27         $(ZLIB_LIBS)
28
29 all: wiretap-$(WTAP_VERSION).dll
30
31 wiretap-$(WTAP_VERSION).lib: wiretap-$(WTAP_VERSION).dll
32 wiretap-$(WTAP_VERSION).exp: wiretap-$(WTAP_VERSION).dll
33
34 wiretap-$(WTAP_VERSION).dll : $(OBJECTS) ..\image\wiretap.res
35         $(link) $(dlllflags) $(conlibsdll) \
36                 $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
37                 /OUT:wiretap-$(WTAP_VERSION).dll \
38                 /IMPLIB:wiretap-$(WTAP_VERSION).lib \
39                 ..\image\wiretap.res \
40                 $(OBJECTS) ..\wsutil\ws_version_info.obj $(wiretap_LIBS)
41
42 RUNLEX = ../tools/runlex.sh
43
44 k12text_lex.h : k12text.c
45 k12text.obj : k12text.c
46         $(CC) $(GENERATED_CFLAGS) -Fd.\ -c $?
47
48 ascend_scanner_lex.h : ascend_scanner.c
49 ascend_scanner.obj : ascend_scanner.c ascend.h
50         $(CC) $(GENERATED_CFLAGS) -Fd.\ -c ascend_scanner.c
51
52 ascend_scanner.c : ascend.h
53
54 ascend.c ascend.h : ascend.y
55         $(YACC) $(YACC_OPTS) -d -p ascend ascend.y -o ascend.c
56
57 clean :
58         rm -f $(OBJECTS) \
59                 wiretap-*.lib \
60                 wiretap-*.exp \
61                 wiretap-*.dll \
62                 wiretap-*.dll.manifest \
63                 *.nativecodeanalysis.xml *.pdb *.sbr
64
65 #
66 # We remove the generated files with "distclean" because one of them,
67 # "ascend_scanner.c", needs different #includes for UN*X and Windows
68 # (UN*X versions of Flex make it include <unistd.h>, but that's a
69 # UN*X-only header), so if you're going to build from source, you need
70 # to build "ascend_scanner.c" from "ascend_scanner.l" with Flex.
71 # This might not be necessary for "ascend.{c,h}", but as
72 # long as you need Flex, you might as well get Bison....
73 #
74 distclean: clean
75         rm -f $(GENERATED_FILES)
76
77 maintainer-clean: distclean
78
79 checkapi:
80 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
81 ##      $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)
82         $(PERL) ../tools/checkAPIs.pl -g termoutput -build $(NONGENERATED_C_FILES)