Move th /MP flag setting to LOCAL_CFLAGS set in configure.nmake
[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=-DYYMALLOC=malloc -DYYFREE=free -DHAVE_CONFIG_H /I. /I.. \
13         $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
14         -D_U_="" $(LOCAL_CFLAGS)
15 CFLAGS=-WX $(GENERATED_CFLAGS)
16
17 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
18
19 .c.obj::
20         $(CC) $(CVARSDLL) $(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) wtap.def ..\image\wiretap.res
35         $(link) $(dlllflags) $(conlibsdll) \
36                 $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
37                 /DEF:wtap.def /OUT:wiretap-$(WTAP_VERSION).dll \
38                 /IMPLIB:wiretap-$(WTAP_VERSION).lib \
39                 ..\image\wiretap.res \
40                 $(OBJECTS) $(wiretap_LIBS)
41
42 RUNLEX = ..\tools\runlex.sh
43
44 ascend_scanner_lex.h : ascend_scanner.c
45 ascend_scanner.obj : ascend_scanner.c ascend.h
46         $(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c ascend_scanner.c
47
48 k12text_lex.h : k12text.c
49 k12text.obj : k12text.c
50         $(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c $?
51
52 ascend.c ascend.h : ascend.y
53         $(YACC) $(YACC_OPTS) -d -p ascend ascend.y -o ascend.c
54
55 clean :
56         rm -f $(OBJECTS) \
57                 wiretap-*.lib \
58                 wiretap-*.exp \
59                 wiretap-*.dll \
60                 wiretap-*.dll.manifest \
61                 *.pdb
62
63 #
64 # We remove the generated files with "distclean" because one of them,
65 # "ascend_scanner.c", needs different #includes for UN*X and Windows
66 # (UN*X versions of Flex make it include <unistd.h>, but that's a
67 # UN*X-only header), so if you're going to build from source, you need
68 # to build "ascend_scanner.c" from "ascend_scanner.l" with Flex.
69 # This might not be necessary for "ascend.{c,h}", but as
70 # long as you need Flex, you might as well get Bison....
71 #
72 distclean: clean
73         rm -f $(GENERATED_FILES)
74
75 maintainer-clean: distclean
76
77 checkapi:
78 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
79 ##      $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)
80         $(PERL) ../tools/checkAPIs.pl -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)