aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate/Makefile.nmake
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mate/Makefile.nmake')
-rw-r--r--plugins/mate/Makefile.nmake57
1 files changed, 35 insertions, 22 deletions
diff --git a/plugins/mate/Makefile.nmake b/plugins/mate/Makefile.nmake
index 0ad0a7df02..3c20c8757e 100644
--- a/plugins/mate/Makefile.nmake
+++ b/plugins/mate/Makefile.nmake
@@ -30,16 +30,27 @@ LDFLAGS = $(PLUGIN_LDFLAGS)
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
+DISSECTOR_OBJECTS = \
+ $(DISSECTOR_C_FILES:.c=.obj) \
+ $(DISSECTOR_CPP_FILES:.cpp=.obj)
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
+NODIST_DISSECTOR_OBJECTS = \
+ $(NODIST_DISSECTOR_C_FILES:.c=.obj) \
+ $(NODIST_DISSECTOR_CPP_FILES:.cpp=.obj)
-DISSECTOR_SUPPORT_NODIST_OBJECTS = $(DISSECTOR_SUPPORT_NODIST_SRC:.c=.obj)
+SUPPORT_OBJECTS = \
+ $(SUPPORT_C_FILES:.c=.obj) \
+ $(SUPPORT_CPP_FILES:.cpp=.obj)
+
+NODIST_SUPPORT_OBJECTS = \
+ $(NODIST_SUPPORT_C_FILES:.c=.obj) \
+ $(NODIST_SUPPORT_CPP_FILES:.cpp=.obj)
OBJECTS = \
$(DISSECTOR_OBJECTS) \
- $(DISSECTOR_SUPPORT_OBJECTS) \
- $(DISSECTOR_SUPPORT_NODIST_OBJECTS) \
+ $(NODIST_DISSECTOR_OBJECTS) \
+ $(SUPPORT_OBJECTS) \
+ $(NODIST_SUPPORT_OBJECTS) \
plugin.obj
RESOURCE=$(PLUGIN_NAME).res
@@ -75,7 +86,8 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# preceded only by "void " starting in column zero, and must not be
# inside #if.
#
-# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
+# DISSECTOR_SRC_FILES and NODIST_DISSECTOR_SRC_FILES are assumed to have
+# all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the files doesn't work with some "make"s; they seem to
@@ -94,13 +106,13 @@ $(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLU
# All subsequent arguments are the files to scan.
#
!IFDEF PYTHON
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
+plugin.c: $(DISSECTOR_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg.py
@echo Making plugin.c (using python)
- @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC)
+ @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC_FILES) $(NODIST_DISSECTOR_SRC_FILES)
!ELSE
-plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
+plugin.c: $(DISSECTOR_SRC_FILES) moduleinfo.h Makefile.common ../../tools/make-dissector-reg
@echo Making plugin.c (using sh)
- @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC_FILES) $(NODIST_DISSECTOR_SRC_FILES)
!ENDIF
!ENDIF
@@ -110,20 +122,20 @@ clean:
$(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \
$(PLUGIN_NAME).exp $(PLUGIN_NAME).rc
-# We remove the generated files with "distclean" because one of them,
-# "mate_parser.c", needs different #includes for UN*X and Windows
-# (UN*X versions of Flex make it include <unistd.h>, but that's a
-# UN*X-only header), so if you're going to build from source, you need
-# to build "mate_parser.c" from "mate_parser.l" with Flex.
-# This might not be necessary for "mate_grammar.{c,h}", but we handle them
-# the same for now.
+# We remove the generated files with "distclean" because files generated
+# by Flex need different #includes for UN*X and Windows (UN*X versions of
+# Flex make it include <unistd.h>, but that's a UN*X-only header), so if
+# you're going to build from source, you need to re-generate the files
+# from the distribution that were generated by Flex.
+#
+# This might not be necessary for files generated by other tools not
+# distributed with Wireshark, but we handle them the same for now.
#
distclean: clean
- rm -f $(GENERATED_DISSECTOR_SRC) \
+ rm -f $(GENERATED_SRC_FILES) \
$(GENERATED_HEADER_FILES) \
- $(GENERATED_NODIST_DISSECTOR_SRC) \
- $(GENERATED_NODIST_DISSECTOR_SUPPORT_SRC) \
- $(GENERATED_NODIST_HEADER_FILES) \
+ $(NODIST_GENERATED_SRC_FILES) \
+ $(NODIST_GENERATED_HEADER_FILES) \
mate_grammar.out
maintainer-clean: distclean
@@ -145,4 +157,5 @@ $(LEMON)\lemon.exe:
cd ../plugins/mate
checkapi:
- $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES)
+ $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \
+ $(SRC_FILES) $(NODIST_SRC_FILES) $(HEADER_FILES)