aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.nmake
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 /Makefile.nmake
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
Diffstat (limited to 'Makefile.nmake')
-rw-r--r--Makefile.nmake20
1 files changed, 8 insertions, 12 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) \