add missing mt.exe calls, to include manifest files into exe / dll files
[obnox/wireshark/wip.git] / plugins / tpg / Makefile.nmake
1 #
2 # $Id$
3 #
4
5 include ..\..\config.nmake
6 include <win32.mak>
7
8 ############### no need to modify below this line #########
9
10 LEMON=..\..\tools\lemon
11
12 CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) /I$(LEMON)\
13         /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
14
15 .c.obj::
16         $(CC) $(CFLAGS) -Fdmate.pdb -c $<
17
18 LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
19
20 !IFDEF ENABLE_LIBWIRESHARK
21 LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
22 CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
23
24 OBJECTS=packet-mate.obj\
25                 mate_setup.obj\
26                 mate_runtime.obj\
27                 mate_util.obj\
28                 mate_plugin.obj\
29                 mate_grammar.obj\
30                 mate_parser.obj
31
32 mate.dll mate.exp mate.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
33         link -dll /out:mate.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
34         $(GLIB_LIBS)
35 !IF $(MSC_VER_REQUIRED) >= 1400
36         mt.exe -nologo -manifest "mate.dll.manifest" -outputresource:mate.dll;2
37 !ENDIF
38
39 !ENDIF
40
41 clean:
42         rm -f $(OBJECTS) mate.dll mate.exp mate.lib *.pdb
43
44 #
45 # We remove the generated files with "distclean" because one of them,
46 # "mate_parser.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 "mate_parser.c" from "mate_parser.l" with Flex.
50 # This might not be necessary for "mate_grammar.{c,h}", but we handle them
51 # the same for now.
52 #
53 distclean: clean
54         rm -f mate_parser.c mate_grammar.c mate_grammar.h mate_grammar.out
55
56 maintainer-clean: distclean
57
58 mate_parser.c : mate_parser.l
59         $(LEX) -Pdf_ -omate_parser.c mate_parser.l
60
61 mate_grammar.h : mate_grammar.c
62 mate_grammar.c : mate_grammar.lemon $(LEMON)\lemon.exe
63         $(LEMON)\lemon.exe t=$(LEMON)\lempar.c mate_grammar.lemon
64
65 $(LEMON)\lemon.exe:
66         cd ../../tools/lemon
67         $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
68         cd ../../plugins/mate
69
70 checkapi:
71         $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput $(DISSECTOR_SRC)