aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-02-02 01:19:53 +0000
committerBill Meier <wmeier@newsguy.com>2011-02-02 01:19:53 +0000
commitd3efa3ed9f5955bbb5924ce6beeeeb9c082d0b22 (patch)
tree5d9b2fd59c1e3d5a929f07797195a7b93b88c549
parentfa5efc04e307dfbef2f991d2a9965707cb74d7a8 (diff)
A bit of Windows makefiles rework and cleanup:
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile; a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS; b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake) (This allows disabling "Warnings as Errors" by just changing config.nmake) c. CVARSDLL definitions (not usage) have been removed from the various makefiles. XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since: -DWIN32 and -DNULL=0 do not appear to be needed (any more); -D_MT and _D_DLL are not needed since /MP causes these definitions. d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled. E.G., 4295: array is too small to include a terminating null character - config.nmake: reformat some long lines for readability; - plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile); - dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ... svn path=/trunk/; revision=35747
-rw-r--r--Makefile.nmake20
-rw-r--r--codecs/Makefile.nmake9
-rw-r--r--config.nmake60
-rw-r--r--epan/Makefile.nmake9
-rw-r--r--epan/crc/Makefile.nmake7
-rw-r--r--epan/crypt/Makefile.nmake7
-rw-r--r--epan/dfilter/Makefile.nmake10
-rw-r--r--epan/dissectors/Makefile.nmake14
-rw-r--r--epan/ftypes/Makefile.nmake7
-rw-r--r--epan/wslua/Makefile.nmake8
-rw-r--r--epan/wspython/Makefile.nmake7
-rw-r--r--gtk/Makefile.nmake10
-rw-r--r--plugins/Makefile.nmake2
-rw-r--r--plugins/asn1/Makefile.nmake5
-rw-r--r--plugins/docsis/Makefile.nmake5
-rw-r--r--plugins/easy_codec/Makefile.nmake5
-rw-r--r--plugins/ethercat/Makefile.nmake5
-rw-r--r--plugins/giop/Makefile.nmake5
-rw-r--r--plugins/gryphon/Makefile.nmake5
-rw-r--r--plugins/interlink/Makefile.nmake5
-rw-r--r--plugins/irda/Makefile.nmake5
-rw-r--r--plugins/m2m/Makefile.nmake5
-rw-r--r--plugins/mate/Makefile.nmake9
-rw-r--r--plugins/opcua/Makefile.nmake5
-rw-r--r--plugins/profinet/Makefile.nmake5
-rw-r--r--plugins/sercosiii/Makefile.nmake5
-rw-r--r--plugins/stats_tree/Makefile.nmake5
-rw-r--r--plugins/tpg/Makefile.nmake5
-rw-r--r--plugins/unistim/Makefile.nmake5
-rw-r--r--plugins/wimax/Makefile.nmake5
-rw-r--r--plugins/wimaxasncp/Makefile.nmake10
-rw-r--r--tools/lemon/Makefile.nmake2
-rw-r--r--win32/Makefile.nmake9
-rw-r--r--wiretap/Makefile.nmake11
-rw-r--r--wsutil/Makefile.nmake7
35 files changed, 177 insertions, 121 deletions
diff --git a/Makefile.nmake b/Makefile.nmake
index 3281dd809c..3766637331 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -39,14 +39,15 @@ CHECK_TAG=
LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS)
# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
+GENERATED_CFLAGS=\
+ $(STANDARD_CFLAGS) \
+ -D_NEED_VAR_IMPORT_ \
+ /I. /Iwiretap $(GLIB_CFLAGS) \
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
$(C_ARES_CFLAGS) $(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) \
- $(PYTHON_CFLAGS) $(SMI_CFLAGS) $(GEOIP_CFLAGS) \
- -D_U_="" -D_NEED_VAR_IMPORT_
-CFLAGS=-WX $(GENERATED_CFLAGS)
+ $(PYTHON_CFLAGS) $(SMI_CFLAGS) $(GEOIP_CFLAGS)
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
@@ -439,7 +440,7 @@ text2pcap-scanner.obj : text2pcap-scanner.c
text2pcap.obj mergecap.obj capinfos.obj editcap.obj version_info.obj: svnversion.h
-clean-local: clean-deps
+clean-local:
rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
$(EXECUTABLES) *.pdb *.exe.manifest \
capinfos.obj editcap.obj mergecap.obj text2pcap.obj \
@@ -451,6 +452,7 @@ clean-local: clean-deps
$(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll \
libwsutil.dll \
wireshark.bsc
+ rm -rf $(INSTALL_DIR)
clean: clean-local
cd asn1
@@ -1081,12 +1083,6 @@ install-all: install-generated-files
xcopy "$(SMI_DIR)\mibs\*" $(INSTALL_DIR)\snmp\mibs /d
!ENDIF
-clean-deps:
- rm -rf $(INSTALL_DIR)
- cd plugins
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
- cd ..
-
checkapi_local:
$(PERL) tools/checkAPIs.pl \
$(wireshark_SOURCES) \
diff --git a/codecs/Makefile.nmake b/codecs/Makefile.nmake
index d080954dd4..43f2a7d13f 100644
--- a/codecs/Makefile.nmake
+++ b/codecs/Makefile.nmake
@@ -7,7 +7,8 @@ include ..\config.nmake
############### no need to modify below this line #########
-CFLAGS=-WX -DHAVE_CONFIG_H $(GLIB_CFLAGS) -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ $(GLIB_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
@@ -17,8 +18,8 @@ CODEC_OBJECTS= \
G711adecode.obj
-codecs.lib : $(CODEC_OBJECTS)
- link /lib /out:codecs.lib $(CODEC_OBJECTS)
+codecs.lib : $(CODEC_OBJECTS)
+ link /lib /out:codecs.lib $(CODEC_OBJECTS)
G711adecode.obj: G711a\G711adecode.c G711a\G711adecode.h G711a\G711atable.h
@@ -34,7 +35,7 @@ distclean: clean
maintainer-clean: distclean
-checkapi:
+checkapi:
$(PERL) ../tools/checkAPIs.pl -g abort -g termoutput \
G711a/G711adecode.c \
G711u/G711udecode.c
diff --git a/config.nmake b/config.nmake
index 4de176a9ec..fd70a8c46a 100644
--- a/config.nmake
+++ b/config.nmake
@@ -758,22 +758,47 @@ MANIFEST_INFO_REQUIRED=1
!ENDIF
# Compiler flags:
-# /W3 warning level 3 (0 less - 4 most, 1 default)
-# /Zi create .pdb file for debugging
-# /MD use "Multithreading Debug" libraries
-# /D_CRT_SECURE_NO_DEPRECATE Don't warn for "insecure" calls, see MSDN "Security Enhancements in the CRT"
+# /W3 Warning level 3 (0 less - 4 most, 1 default)
+# /Zi Create .pdb file for debugging
+# /MD Use "multithread- and DLL-specific version" of run-time libraries
+# msvc documentation states that /MD causes _MT and _DLL to be defined
+# See: http://msdn.microsoft.com/en-us/library/2kzt1wy3%28v=VS.90%29.aspx
+# /D_CRT_SECURE_NO_DEPRECATE Don't warn for "insecure" calls,
+# see MSDN "Security Enhancements in the CRT"
# /D_CRT_NONSTDC_NO_DEPRECATE Don't warn for "Deprecated CRT Functions" as MSDN calls this
-# /D_BIND_TO_CURRENT_CRT_VERSION=1 Make sure our CRT and manifest versions match (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
+# /D_BIND_TO_CURRENT_CRT_VERSION=1 Make sure our CRT and manifest versions match
+# (http://msdn.microsoft.com/en-us/library/cc664727.aspx)
# /DWIN32_LEAN_AND_MEAN Don't include unnecessary Windows include files (see windows.h)
-# /MANIFEST:no Don't create a SxS manifest. Makes sure our plugins don't load a second copy of the CRT.
-#
-!IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
+# /MANIFEST:no Don't create a SxS manifest. Makes sure our plugins don't load
+# a second copy of the CRT.
+#
+##Note: LOCAL_CFLAGS is used used for *all* compilations
+!IF "$(MSVC_VARIANT)" == "MSVC6" || \
+ "$(MSVC_VARIANT)" == "MSVC2002" || \
+ "$(MSVC_VARIANT)" == "DOTNET10" || \
+ "$(MSVC_VARIANT)" == "MSVC2003" || \
+ "$(MSVC_VARIANT)" == "DOTNET11"
LOCAL_CFLAGS=/Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED)
-!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE" || "$(MSVC_VARIANT)" == "MSVC2010" || "$(MSVC_VARIANT)" == "MSVC2010EE"
-LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED)
+
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || \
+ "$(MSVC_VARIANT)" == "MSVC2005EE" || \
+ "$(MSVC_VARIANT)" == "DOTNET20" || \
+ "$(MSVC_VARIANT)" == "MSVC2008" || \
+ "$(MSVC_VARIANT)" == "MSVC2008EE" || \
+ "$(MSVC_VARIANT)" == "MSVC2010" || \
+ "$(MSVC_VARIANT)" == "MSVC2010EE"
+LOCAL_CFLAGS=/Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
+ /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
+
!IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
!ENDIF
+
+# Additional compiler warnings to be treated as "Level 3"
+# when compiling Wireshark sources. (Selected from "level 4" warnings).
+## 4295: array is too small to include a terminating null character
+WARNINGS_CFLAGS=/w34295
+
!ELSE
!ERROR MSVC_VARIANT unknown
!ENDIF
@@ -791,17 +816,28 @@ LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
# * /showIncludes
# * /Yc
#
-!IF "$(MSVC_VARIANT)" == "MSVC2008" || "$(MSVC_VARIANT)" == "MSVC2008EE" || "$(MSVC_VARIANT)" == "MSVC2010" || "$(MSVC_VARIANT)" == "MSVC2010EE"
+!IF "$(MSVC_VARIANT)" == "MSVC2008" || \
+ "$(MSVC_VARIANT)" == "MSVC2008EE" || \
+ "$(MSVC_VARIANT)" == "MSVC2010" || \
+ "$(MSVC_VARIANT)" == "MSVC2010EE"
LOCAL_CFLAGS= $(LOCAL_CFLAGS) /MP
!ENDIF
# Optional: Static analysis. Only supported in the full-frontal MSVC editions.
# http://msdn.microsoft.com/en-us/library/ms182025.aspx
-#!IF "$(MSVC_VARIANT)" == "MSVC2010" && "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
+#!IF "$(MSVC_VARIANT)" == "MSVC2010" && "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
#LOCAL_CFLAGS= $(LOCAL_CFLAGS) /analyze
#!ENDIF
+#STANDARD_CFLAGS is used only for Wireshark source compiles
+STANDARD_CFLAGS=-DHAVE_CONFIG_H -D_U_="" $(LOCAL_CFLAGS) $(WARNINGS_CFLAGS)
+
+WARNINGS_ARE_ERRORS=-WX
+
+## XXX: _MT and _DLL are defined when /MD is used so CVARSDLL is apparently unneeded
+##CVARSDLL=-D_MT -D_DLL
+
# Linker flags:
# /DEBUG generate debug info
# /PROFILE generate map file(s) for profiling
diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake
index c1d69fb2c9..3cfa7ecda7 100644
--- a/epan/Makefile.nmake
+++ b/epan/Makefile.nmake
@@ -12,13 +12,14 @@ include Makefile.common
LINK= link
# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
+GENERATED_CFLAGS=\
+ $(STANDARD_CFLAGS) \
+ /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
$(ZLIB_CFLAGS) $(C_ARES_CFLAGS) $(ADNS_CFLAGS) $(PCRE_CFLAGS) \
$(LUA_CFLAGS) $(GNUTLS_CFLAGS) /I$(PCAP_DIR)\include \
- $(SMI_CFLAGS) $(GEOIP_CFLAGS) -D_U_="" $(LOCAL_CFLAGS)
-CFLAGS=-WX $(GENERATED_CFLAGS)
+ $(SMI_CFLAGS) $(GEOIP_CFLAGS)
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
!IFDEF LUA_DIR
WSLUA_LIB=wslua\wslua.lib
diff --git a/epan/crc/Makefile.nmake b/epan/crc/Makefile.nmake
index b4e37e2e7e..9b336d8040 100644
--- a/epan/crc/Makefile.nmake
+++ b/epan/crc/Makefile.nmake
@@ -8,15 +8,16 @@ include Makefile.common
############### no need to modify below this line #########
-CFLAGS=-WX -DHAVE_CONFIG_H $(GLIB_CFLAGS) -D_U_="" /I../.. $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
CRC_OBJECTS = $(CRC_SRC:.c=.obj)
-crc.lib: $(CRC_OBJECTS)
- link /lib /out:crc.lib $(CRC_OBJECTS)
+crc.lib: $(CRC_OBJECTS)
+ link /lib /out:crc.lib $(CRC_OBJECTS)
clean:
rm -f $(CRC_OBJECTS) crc.lib *.pdb
diff --git a/epan/crypt/Makefile.nmake b/epan/crypt/Makefile.nmake
index b05773a2cf..a9bde581ed 100644
--- a/epan/crypt/Makefile.nmake
+++ b/epan/crypt/Makefile.nmake
@@ -8,15 +8,16 @@ include Makefile.common
############### no need to modify below this line #########
-CFLAGS=-WX -DHAVE_CONFIG_H $(GLIB_CFLAGS) -D_U_="" /I../.. $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
AIRPDCAP_OBJECTS = $(LIBAIRPDCAP_SRC:.c=.obj)
-airpdcap.lib: $(AIRPDCAP_OBJECTS)
- link /lib /out:airpdcap.lib $(AIRPDCAP_OBJECTS)
+airpdcap.lib: $(AIRPDCAP_OBJECTS)
+ link /lib /out:airpdcap.lib $(AIRPDCAP_OBJECTS)
clean:
rm -f $(AIRPDCAP_OBJECTS) airpdcap.lib *.pdb
diff --git a/epan/dfilter/Makefile.nmake b/epan/dfilter/Makefile.nmake
index d79e33e3d7..388855205b 100644
--- a/epan/dfilter/Makefile.nmake
+++ b/epan/dfilter/Makefile.nmake
@@ -11,11 +11,13 @@ include Makefile.common
LEMON=..\..\tools\lemon
# We GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I..\.. /I$(LEMON) \
- $(GLIB_CFLAGS) $(PCRE_CFLAGS) /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
-CFLAGS=-WX $(GENERATED_CFLAGS)
+GENERATED_CFLAGS=\
+ $(STANDARD_CFLAGS) \
+ /I. /I.. /I..\.. $(GLIB_CFLAGS) \
+ /I$(LEMON) \
+ $(PCRE_CFLAGS) /I$(PCAP_DIR)\include
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
diff --git a/epan/dissectors/Makefile.nmake b/epan/dissectors/Makefile.nmake
index 7ca1b1cd9e..598b44898b 100644
--- a/epan/dissectors/Makefile.nmake
+++ b/epan/dissectors/Makefile.nmake
@@ -11,13 +11,12 @@ include Custom.nmake
include Makefile.common
-CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) \
+CFLAGS= $(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I. /I.. /I../.. $(GLIB_CFLAGS) \
$(ZLIB_CFLAGS) \
$(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(NETTLE_CFLAGS) \
$(KFW_CFLAGS) $(AIRPCAP_CFLAGS) $(GEOIP_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
-
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
@@ -32,7 +31,12 @@ dissectors.lib: register.obj packet-ncp2222.c $(GENERATED_HEADER_FILES) ../../co
@echo Linking dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
link /lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
-!IF "$(MSVC_VARIANT)" != "MSVC2005EE" && "$(MSVC_VARIANT)" != "MSVC2005" && "$(MSVC_VARIANT)" != "MSVC2008EE" && "$(MSVC_VARIANT)" != "MSVC2008"
+!IF "$(MSVC_VARIANT)" != "MSVC2005" && \
+ "$(MSVC_VARIANT)" != "MSVC2005EE" && \
+ "$(MSVC_VARIANT)" != "MSVC2008" && \
+ "$(MSVC_VARIANT)" != "MSVC2008EE" && \
+ "$(MSVC_VARIANT)" != "MSVC2010" && \
+ "$(MSVC_VARIANT)" != "MSVC2010EE"
# Disable debug for large dissectors
packet-rrc.obj : packet-rrc.c
$(CC) $(CVARSDLL) $(CFLAGS) /Zd /Fd.\ -c $?
diff --git a/epan/ftypes/Makefile.nmake b/epan/ftypes/Makefile.nmake
index 17475cbd90..f980bf273a 100644
--- a/epan/ftypes/Makefile.nmake
+++ b/epan/ftypes/Makefile.nmake
@@ -9,10 +9,9 @@ include Makefile.common
############### no need to modify below this line #########
-CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) \
- $(PCRE_CFLAGS) /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
-
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I. /I.. /I../.. $(GLIB_CFLAGS) \
+ $(PCRE_CFLAGS) /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
diff --git a/epan/wslua/Makefile.nmake b/epan/wslua/Makefile.nmake
index 8f0656d4d0..fda9a0d2ce 100644
--- a/epan/wslua/Makefile.nmake
+++ b/epan/wslua/Makefile.nmake
@@ -6,10 +6,10 @@ include ..\..\config.nmake
############### no need to modify below this line #########
-CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) $(LUA_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
-
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I. /I.. /I../.. $(GLIB_CFLAGS) \
+ $(LUA_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
diff --git a/epan/wspython/Makefile.nmake b/epan/wspython/Makefile.nmake
index bebe50ccf6..021d9c7164 100644
--- a/epan/wspython/Makefile.nmake
+++ b/epan/wspython/Makefile.nmake
@@ -7,10 +7,9 @@ include Makefile.common
############### no need to modify below this line #########
-CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) $(PYTHON_CFLAGS) \
- -D_U_="" $(LOCAL_CFLAGS)
-
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I. /I.. /I../.. $(GLIB_CFLAGS) \
+ $(PYTHON_CFLAGS)
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
diff --git a/gtk/Makefile.nmake b/gtk/Makefile.nmake
index f73ee53ebc..00832525bb 100644
--- a/gtk/Makefile.nmake
+++ b/gtk/Makefile.nmake
@@ -9,17 +9,17 @@ include ..\Makefile.nmake.inc
############### no need to modify below this line #########
# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=-DHAVE_CONFIG_H /I.. /I../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \
+GENERATED_CFLAGS=\
+ $(STANDARD_CFLAGS) \
+ -D_NEED_VAR_IMPORT_ /Zm800 \
+ /I.. /I../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \
/I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
/I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
/I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
- /Zm800 -D_U_="" -D_NEED_VAR_IMPORT_ $(LOCAL_CFLAGS) \
$(PORTAUDIO_CFLAGS) \
$(HHC_CFLAGS)
-
-CFLAGS=-WX $(GENERATED_CFLAGS)
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) $(WSUG_CFLAGS) -Fd.\ -c $<
diff --git a/plugins/Makefile.nmake b/plugins/Makefile.nmake
index 259c5e1e2d..d90971f459 100644
--- a/plugins/Makefile.nmake
+++ b/plugins/Makefile.nmake
@@ -74,8 +74,6 @@ install-plugins:
if exist Custom.nmake $(MAKE) /$(MAKEFLAGS) -f Custom.nmake install-plugins
!ENDIF
-clean-deps:
-
####
_FORCE_: ## Assumption: no file named _FORCE_ exists in the current directory
diff --git a/plugins/asn1/Makefile.nmake b/plugins/asn1/Makefile.nmake
index ec975503a7..b759db2b03 100644
--- a/plugins/asn1/Makefile.nmake
+++ b/plugins/asn1/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/docsis/Makefile.nmake b/plugins/docsis/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/docsis/Makefile.nmake
+++ b/plugins/docsis/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/easy_codec/Makefile.nmake b/plugins/easy_codec/Makefile.nmake
index 1d874407a8..42c3a70fc1 100644
--- a/plugins/easy_codec/Makefile.nmake
+++ b/plugins/easy_codec/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
CPPFLAGS = $(CFLAGS) -TP
diff --git a/plugins/ethercat/Makefile.nmake b/plugins/ethercat/Makefile.nmake
index 2d485e1622..5a9810bd91 100644
--- a/plugins/ethercat/Makefile.nmake
+++ b/plugins/ethercat/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/giop/Makefile.nmake b/plugins/giop/Makefile.nmake
index 77cb68e354..ec34c47b92 100644
--- a/plugins/giop/Makefile.nmake
+++ b/plugins/giop/Makefile.nmake
@@ -6,8 +6,9 @@ include ..\..\config.nmake
############### no need to modify below this line #########
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
LDFLAGS = $(PLUGIN_LDFLAGS)
diff --git a/plugins/gryphon/Makefile.nmake b/plugins/gryphon/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/gryphon/Makefile.nmake
+++ b/plugins/gryphon/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/interlink/Makefile.nmake b/plugins/interlink/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/interlink/Makefile.nmake
+++ b/plugins/interlink/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/irda/Makefile.nmake b/plugins/irda/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/irda/Makefile.nmake
+++ b/plugins/irda/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/m2m/Makefile.nmake b/plugins/m2m/Makefile.nmake
index cf34ebbcd3..5b2e7c214f 100644
--- a/plugins/m2m/Makefile.nmake
+++ b/plugins/m2m/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. /I../wimax $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. /I../wimax $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/mate/Makefile.nmake b/plugins/mate/Makefile.nmake
index 8e11dd6439..e56c2ec7ec 100644
--- a/plugins/mate/Makefile.nmake
+++ b/plugins/mate/Makefile.nmake
@@ -14,9 +14,12 @@ include Makefile.common
LEMON=..\..\tools\lemon
# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=/DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) /I$(LEMON)\
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
-CFLAGS=/WX $(GENERATED_CFLAGS)
+GENERATED_CFLAGS=\
+ $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) /I$(LEMON) \
+ /I$(PCAP_DIR)\include
+
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/opcua/Makefile.nmake b/plugins/opcua/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/opcua/Makefile.nmake
+++ b/plugins/opcua/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/profinet/Makefile.nmake b/plugins/profinet/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/profinet/Makefile.nmake
+++ b/plugins/profinet/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/sercosiii/Makefile.nmake b/plugins/sercosiii/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/sercosiii/Makefile.nmake
+++ b/plugins/sercosiii/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/stats_tree/Makefile.nmake b/plugins/stats_tree/Makefile.nmake
index ac66236bd9..b5077080ad 100644
--- a/plugins/stats_tree/Makefile.nmake
+++ b/plugins/stats_tree/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fdstats_tree.pdb -c $<
diff --git a/plugins/tpg/Makefile.nmake b/plugins/tpg/Makefile.nmake
index 8085c54f85..ea11ef0681 100644
--- a/plugins/tpg/Makefile.nmake
+++ b/plugins/tpg/Makefile.nmake
@@ -9,8 +9,9 @@ include <win32.mak>
LEMON=..\..\tools\lemon
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) /I$(LEMON)\
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) /I$(LEMON) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fdmate.pdb -c $<
diff --git a/plugins/unistim/Makefile.nmake b/plugins/unistim/Makefile.nmake
index d02da2ad4f..46034a0448 100644
--- a/plugins/unistim/Makefile.nmake
+++ b/plugins/unistim/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/wimax/Makefile.nmake b/plugins/wimax/Makefile.nmake
index a89b9b6a3a..f37e894d55 100644
--- a/plugins/wimax/Makefile.nmake
+++ b/plugins/wimax/Makefile.nmake
@@ -9,8 +9,9 @@ include moduleinfo.nmake
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/plugins/wimaxasncp/Makefile.nmake b/plugins/wimaxasncp/Makefile.nmake
index 209f2e8ec6..51b52a9af5 100644
--- a/plugins/wimaxasncp/Makefile.nmake
+++ b/plugins/wimaxasncp/Makefile.nmake
@@ -11,12 +11,12 @@ include ..\..\Makefile.nmake.inc
include Makefile.common
# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=/DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
-CFLAGS=/WX $(GENERATED_CFLAGS)
-
-
+GENERATED_CFLAGS=\
+ $(STANDARD_CFLAGS) \
+ /I../.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/tools/lemon/Makefile.nmake b/tools/lemon/Makefile.nmake
index 6cffca9d82..20344a8adb 100644
--- a/tools/lemon/Makefile.nmake
+++ b/tools/lemon/Makefile.nmake
@@ -5,7 +5,7 @@
include ..\..\config.nmake
-CFLAGS=-WX -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=$(WARNINGS_ARE_ERRORS) -D_U_="" $(LOCAL_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
diff --git a/win32/Makefile.nmake b/win32/Makefile.nmake
index ad528a1cd3..575171bbd6 100644
--- a/win32/Makefile.nmake
+++ b/win32/Makefile.nmake
@@ -8,13 +8,12 @@ include ..\Makefile.nmake.inc
############### no need to modify below this line #########
-CFLAGS=-WX -DHAVE_CONFIG_H /I.. /I../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ -D_NEED_VAR_IMPORT_ /Zm800 \
+ /I.. /I../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \
/I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
/I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
- /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
- /Zm800 -D_U_="" -D_NEED_VAR_IMPORT_ $(LOCAL_CFLAGS) \
-
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+ /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS)
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) $(WSUG_CFLAGS) -Fd.\ -c $<
diff --git a/wiretap/Makefile.nmake b/wiretap/Makefile.nmake
index 456d7a9ed5..f320369597 100644
--- a/wiretap/Makefile.nmake
+++ b/wiretap/Makefile.nmake
@@ -9,12 +9,13 @@ include ..\Makefile.nmake.inc
include Makefile.common
# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
-GENERATED_CFLAGS=-DYYMALLOC=malloc -DYYFREE=free -DHAVE_CONFIG_H /I. /I.. \
- $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
- -D_U_="" $(LOCAL_CFLAGS)
-CFLAGS=-WX $(GENERATED_CFLAGS)
+GENERATED_CFLAGS=\
+ $(STANDARD_CFLAGS) \
+ -DYYMALLOC=malloc -DYYFREE=free \
+ /I. /I.. $(GLIB_CFLAGS) \
+ $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
diff --git a/wsutil/Makefile.nmake b/wsutil/Makefile.nmake
index 67ebe8f0cb..8d4c376b9c 100644
--- a/wsutil/Makefile.nmake
+++ b/wsutil/Makefile.nmake
@@ -11,10 +11,9 @@ include ..\Makefile.nmake.inc
include Makefile.common
-CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. $(GLIB_CFLAGS) \
- /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
-
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
+ /I. /I.. $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<