_MSC_VERs 1400 and greater require manifests. Check against
[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 CFLAGS=-WX -DYYMALLOC=malloc -DYYFREE=free -DHAVE_CONFIG_H /I. /I.. \
12         $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
13         -D_U_="" $(LOCAL_CFLAGS)
14
15 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
16
17 .c.obj::
18         $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
19
20 OBJECTS=$(NONGENERATED_C_FILES:.c=.obj) $(GENERATED_C_FILES:.c=.obj)
21
22 wiretap_LIBS = \
23         $(GLIB_LIBS)    \
24         ..\wsutil\libwsutil.lib \
25         $(ZLIB_LIBS)
26
27 all: wiretap-$(WTAP_VERSION).dll
28
29 wiretap-$(WTAP_VERSION).lib: wiretap-$(WTAP_VERSION).dll
30 wiretap-$(WTAP_VERSION).exp: wiretap-$(WTAP_VERSION).dll
31
32 wiretap-$(WTAP_VERSION).dll : $(OBJECTS) wtap.def ..\image\wiretap.res
33         $(link) $(dlllflags) $(conlibsdll) \
34                 $(LOCAL_LDFLAGS) \
35                 /DEF:wtap.def /OUT:wiretap-$(WTAP_VERSION).dll \
36                 /IMPLIB:wiretap-$(WTAP_VERSION).lib \
37                 ..\image\wiretap.res \
38                 $(OBJECTS) $(wiretap_LIBS)
39 !IF $(MSC_VER_REQUIRED) >= 1400
40         mt.exe -nologo -manifest "wiretap-$(WTAP_VERSION).dll.manifest" -outputresource:wiretap-$(WTAP_VERSION).dll;2
41 !ENDIF
42
43 RUNLEX = ..\tools\runlex.sh
44
45 ascend-scanner_lex.h : ascend-scanner.c
46 ascend-scanner.obj : ascend-scanner.c ascend-grammar.h
47
48 k12text_lex.h : k12text.c
49 k12text.obj : k12text.c
50
51 ascend-grammar.c ascend-grammar.h : ascend-grammar.y
52         $(YACC) $(YACC_OPTS) -d -p ascend ascend-grammar.y -o ascend-grammar.c
53
54 clean :
55         rm -f $(OBJECTS) \
56                 wiretap-*.lib \
57                 wiretap-*.exp \
58                 wiretap-*.dll \
59                 wiretap-*.dll.manifest \
60                 *.pdb
61
62 #
63 # We remove the generated files with "distclean" because one of them,
64 # "ascend-scanner.c", needs different #includes for UN*X and Windows
65 # (UN*X versions of Flex make it include <unistd.h>, but that's a
66 # UN*X-only header), so if you're going to build from source, you need
67 # to build "ascend-scanner.c" from "ascend-scanner.l" with Flex.
68 # This might not be necessary for "ascend-grammar.{c,h}", but as
69 # long as you need Flex, you might as well get Bison....
70 #
71 distclean: clean
72         rm -f $(GENERATED_FILES)
73
74 maintainer-clean: distclean
75
76 checkapi:
77 ## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
78 ##      $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)
79         $(PERL) ../tools/checkAPIs.pl -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)