diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-02-09 05:31:15 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-02-09 05:31:15 +0000 |
commit | e30d2b5001ae68f7d71e20f290f5a6116243994f (patch) | |
tree | 2d000509f1b77ca60727b9d7340df7b73128ad80 /plugins/wimaxasncp/Makefile.nmake | |
parent | 4aae84271d346f95a68225aefd84207aa4505679 (diff) |
Make the other plugin makefiles use the new style introduced in the MATE
makefiles.
svn path=/trunk/; revision=47579
Diffstat (limited to 'plugins/wimaxasncp/Makefile.nmake')
-rw-r--r-- | plugins/wimaxasncp/Makefile.nmake | 65 |
1 files changed, 40 insertions, 25 deletions
diff --git a/plugins/wimaxasncp/Makefile.nmake b/plugins/wimaxasncp/Makefile.nmake index cc42df4172..ebca1697fd 100644 --- a/plugins/wimaxasncp/Makefile.nmake +++ b/plugins/wimaxasncp/Makefile.nmake @@ -1,22 +1,23 @@ # Makefile.nmake -# nmake file for Wireshark plugin +# nmake file for wimaxasncp plugin # # $Id$ # include ..\..\config.nmake -include moduleinfo.nmake include ..\..\Makefile.nmake.inc +include moduleinfo.nmake + include Makefile.common -# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output -GENERATED_CFLAGS=\ +# We use DIRTY_CFLAGS to get around flex's non-LLP64-compliant output +DIRTY_CFLAGS=\ $(STANDARD_CFLAGS) \ - /I../.. $(GLIB_CFLAGS) \ + /I../.. $(GLIB_CFLAGS) /I$(LEMON) \ /I$(PCAP_DIR)\include -CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS) +CFLAGS=$(WARNINGS_ARE_ERRORS) $(DIRTY_CFLAGS) .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< @@ -27,11 +28,7 @@ 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_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj) - -OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj +OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj RESOURCE=$(PLUGIN_NAME).res @@ -66,7 +63,7 @@ $(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. +# REGISTER_SRC_FILES is 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 @@ -85,33 +82,51 @@ $(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: $(REGISTER_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 $(REGISTER_SRC_FILES) $(NODIST_REGISTER_SRC_FILES) !ELSE -plugin.c: $(DISSECTOR_SRC) moduleinfo.h Makefile.common ../../tools/make-dissector-reg +plugin.c: $(REGISTER_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 $(REGISTER_SRC_FILES) $(NODIST_REGISTER_SRC_FILES) !ENDIF !ENDIF - -RUNLEX = ..\..\tools\runlex.sh - -wimaxasncp_dict_lex.h : wimaxasncp_dict.c -wimaxasncp_dict.obj : wimaxasncp_dict.c - $(CC) $(GENERATED_CFLAGS) -Fd.\ -c $? - clean: rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb *.sbr \ $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \ $(PLUGIN_NAME).exp $(PLUGIN_NAME).rc +# +# We remove the Flex-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. +# distclean: clean - rm -f wimaxasncp_dict.c wimaxasncp_dict_lex.h + rm -f $(FLEX_GENERATED_SRC_FILES) \ + $(FLEX_GENERATED_HEADER_FILES) maintainer-clean: distclean +RUNLEX = ..\..\tools\runlex.sh + +# +# In order to generate wimaxasncp_dict_lex.h, we need to run Flex on +# wimaxasncp_dict.l; that's done by generating wimaxasncp_dict.c. +# +wimaxasncp_dict_lex.h : wimaxasncp_dict.c + +# +# We compile this specially because it's Flex-generated and thus +# "warnings are errors" will fail because there's a bunch of +# warnings we can't eliminate. +# +wimaxasncp_dict.obj : wimaxasncp_dict.c + $(CC) $(DIRTY_CFLAGS) -Fd.\ -c $? + checkapi: - $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build $(DISSECTOR_SRC) $(DISSECTOR_INCLUDES) + $(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput -build \ + $(CLEAN_SRC_FILES) $(CLEAN_HEADER_FILES) |