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