More Windows compiler flag cleanups. Fix a problem with my last commit
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 2 Mar 2009 21:33:11 +0000 (21:33 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 2 Mar 2009 21:33:11 +0000 (21:33 +0000)
that would break compilation for older compilers. Create a "DLL_LDFLAGS"
variable and use it in DLLs and plugins. Use PLUGIN_LDFLAGS and
DLL_LDFLAGS where needed. Don't force i386 code in the TPG plugin.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27582 f5534014-38df-0310-8fa8-9805f1628bb7

config.nmake
epan/Makefile.nmake
plugins/tpg/Makefile.nmake
wiretap/Makefile.nmake
wsutil/Makefile.nmake

index 1e81d8d0b085d6dae2dc90dd37fc6ef75c9a9990..b59148a264d7ad1150f0bd14f67fde5be00dbc9f 100644 (file)
@@ -498,12 +498,13 @@ LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 # /NODEFAULTLIB:xxx don't use xxx as the standard C library
 #
 LOCAL_LDFLAGS=/DEBUG /MACHINE:$(TARGET_MACHINE)
-
-PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS)
+DLL_LDFLAGS = 
 !IF $(MSC_VER_REQUIRED) >= 1400
-PLUGIN_LDFLAGS = /MANIFEST:no
+DLL_LDFLAGS = /MANIFEST:no
 !ENDIF
 
+PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS) $(DLL_LDFLAGS)
+
 #
 # According to http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=403
 # XCOPY under Windows NT doesn't support the "/Y" flag.  This works
index d3b1451008db5b27a46aeb23fc0b8f2e124c16dc..fe0c1cd2ab76fa2927755fb11883ba1c6c9b5ddb 100644 (file)
@@ -88,16 +88,12 @@ libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crypt fty
                  crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib dissectors\dissectors.lib $(WSLUA_LIB) ..\image\libwireshark.res
        @echo Linking libwireshark.dll
        $(link) $(dlllflags) $(conlibsdll) shell32.lib \
-               $(LOCAL_LDFLAGS) \
+               $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
                /DEF:libwireshark.def /OUT:libwireshark.dll \
                /IMPLIB:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \
                $(libwireshark_LIBS) ..\image\libwireshark.res \
                dissectors\register.obj \
                $(EXTRA_OBJECTS)
-!IF $(MSC_VER_REQUIRED) >= 1400
-       mt.exe -nologo -manifest "libwireshark.dll.manifest" -outputresource:libwireshark.dll;2
-!ENDIF
-
 
 libwireshark.lib       : ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \
                   crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib $(WSLUA_LIB) dissectors\dissectors.lib
index d9112f14e3e51022998fe1ed73141d3cf61468ad..a25c840f073cf9b4c51e1b03559e5a9f3f16e977 100644 (file)
@@ -15,7 +15,7 @@ CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) /I$(LEMON)\
 .c.obj::
        $(CC) $(CFLAGS) -Fdmate.pdb -c $<
 
-LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
+LDFLAGS = $(PLUGIN_LDFLAGS)
 
 !IFDEF ENABLE_LIBWIRESHARK
 LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
index 40ebb967eabcd3bb001ecd1878fd46c437b6cc42..a8e15b33dbfc1cb9523a270fd4e894c7f3ef285b 100644 (file)
@@ -31,14 +31,11 @@ wiretap-$(WTAP_VERSION).exp: wiretap-$(WTAP_VERSION).dll
 
 wiretap-$(WTAP_VERSION).dll : $(OBJECTS) wtap.def ..\image\wiretap.res
        $(link) $(dlllflags) $(conlibsdll) \
-               $(LOCAL_LDFLAGS) \
+               $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
                /DEF:wtap.def /OUT:wiretap-$(WTAP_VERSION).dll \
                /IMPLIB:wiretap-$(WTAP_VERSION).lib \
                ..\image\wiretap.res \
                $(OBJECTS) $(wiretap_LIBS)
-!IF $(MSC_VER_REQUIRED) >= 1400
-       mt.exe -nologo -manifest "wiretap-$(WTAP_VERSION).dll.manifest" -outputresource:wiretap-$(WTAP_VERSION).dll;2
-!ENDIF
 
 RUNLEX = ..\tools\runlex.sh
 
index be90c94aec028b075fdb357430e8ff41723e9d70..d12fe418634def781bc9ca430641d8208a605b3c 100644 (file)
@@ -31,14 +31,11 @@ libwsutil.exp: libwsutil.dll
 
 libwsutil.dll : $(OBJECTS) libwsutil.def ..\image\libwsutil.res
        $(link) $(dlllflags) $(conlibsdll) \
-               $(LOCAL_LDFLAGS) \
+               $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
                /DEF:libwsutil.def /OUT:libwsutil.dll \
                /IMPLIB:libwsutil.lib \
                ..\image\libwsutil.res \
                $(OBJECTS) $(libwsutil_LIBS)
-!IF $(MSC_VER_REQUIRED) >= 1400
-       mt.exe -nologo -manifest "libwsutil.dll.manifest" -outputresource:libwsutil.dll;2
-!ENDIF
 
 clean :
        rm -f $(OBJECTS) \