changeset 846:8bf039d894d8

* standalone/wxwin/appsettings.cpp, standalone/wxwin/makefile.gnu, standalone/wxwin/configtooldoc.cpp, standalone/wxwin/ecpch.h, standalone/wxwin/filename.cpp, standalone/wxwin/configtool.rc: Allow configtool to build against wxWindows 2.4.0 using Cygwin GCC.
author jld
date Wed, 19 Mar 2003 17:39:03 +0000
parents fa9a9d22a594
children def96a37f90d
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/appsettings.cpp host/tools/configtool/standalone/wxwin/configtool.rc host/tools/configtool/standalone/wxwin/configtooldoc.cpp host/tools/configtool/standalone/wxwin/ecpch.h host/tools/configtool/standalone/wxwin/filename.cpp host/tools/configtool/standalone/wxwin/makefile.gnu
diffstat 7 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -1,3 +1,13 @@
+2003-03-19  John Dallaway  <jld@ecoscentric.com>
+
+	* standalone/wxwin/appsettings.cpp,
+	  standalone/wxwin/configtooldoc.cpp,
+	  standalone/wxwin/ecpch.h,
+	  standalone/wxwin/filename.cpp,
+	  standalone/wxwin/configtool.rc,
+	  standalone/wxwin/makefile.gnu: Allow configtool to build against
+	wxWindows 2.4.0 using Cygwin GCC.
+
 2003-03-18  John Dallaway  <jld@ecoscentric.com>
 
 	* standalone/wxwin/appsettings.cpp,
--- a/host/tools/configtool/standalone/wxwin/appsettings.cpp
+++ b/host/tools/configtool/standalone/wxwin/appsettings.cpp
@@ -75,7 +75,7 @@
 #ifdef __WXMSW__
 #include <windows.h>
 #include "wx/msw/winundef.h"
-#if defined(GetTempPath) && !defined(__CYGWIN__)
+#ifdef GetTempPath
 #undef GetTempPath
 #endif
 #endif
--- a/host/tools/configtool/standalone/wxwin/configtool.rc
+++ b/host/tools/configtool/standalone/wxwin/configtool.rc
@@ -44,4 +44,4 @@ text                    ICON  "bitmaps/t
 text_dis                ICON  "bitmaps/text_dis.ico"
 
 #include "wx/msw/wx.rc"
-//#include "wx/html/msw/wxhtml.rc"
+
--- a/host/tools/configtool/standalone/wxwin/configtooldoc.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtooldoc.cpp
@@ -73,7 +73,7 @@
 #include <shlobj.h>
 #endif
 #include "wx/msw/winundef.h"
-#if defined(CreateDirectory) && !defined(__CYGWIN__)
+#ifdef CreateDirectory
 #undef CreateDirectory
 #endif
 #endif
--- a/host/tools/configtool/standalone/wxwin/ecpch.h
+++ b/host/tools/configtool/standalone/wxwin/ecpch.h
@@ -51,9 +51,12 @@
 #endif
 
 // include winsock2.h early to eliminate fd_set warning
-#ifdef __CYGWIN__
-#include <winsock2.h>
-#endif
+// FIXME: including winsock2.h early causes build failures
+// relating to the CreateDialog macro defined in the w32api.
+// Need to find a better point to #include <winsock2.h>
+//#ifdef __CYGWIN__
+//#include <winsock2.h>
+//#endif
 
 #include "wx/wx.h"
 #include "wx/splitter.h"
--- a/host/tools/configtool/standalone/wxwin/filename.cpp
+++ b/host/tools/configtool/standalone/wxwin/filename.cpp
@@ -48,7 +48,6 @@
 #include <shlwapi.h>
 
 #include "wx/msw/winundef.h"
-#ifndef __CYGWIN__
 #ifdef CreateDirectory
 #undef CreateDirectory
 #endif
@@ -64,7 +63,6 @@
 #ifdef GetTempPath
 #undef GetTempPath
 #endif
-#endif
 
 #else
 
--- a/host/tools/configtool/standalone/wxwin/makefile.gnu
+++ b/host/tools/configtool/standalone/wxwin/makefile.gnu
@@ -27,8 +27,8 @@ EXTRALDFLAGS=-L$(TCLDIR)/lib -L$(INSTALL
 
 ifeq "$(OSTYPE)" "cygwin"
   PROGRAM=configtool.exe
-  CPPFLAGS=-I$(WXDIR)/include -I$(WXDIR)/lib/wx/include -DSTRICT -DWINVER=0x0400 -D_WIN32 -D__GNUWIN32__ -D__WIN95__ -D__WIN32__ -D_X86_=1 -DWIN32
-  LDFLAGS=-L$(WXDIR)/lib -lwx -lstdc++ -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32 -lglu32 -lgdi32 -lcomdlg32 -lole32 -luuid -lshlwapi -lpng -lzlib
+  CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` -D_WIN32 -D__WIN32__ -DSTRICT
+  LDFLAGS=`$(WXDIR)/bin/wx-config --libs` -lshlwapi
   EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o
 else
   PROGRAM=configtool
@@ -118,7 +118,7 @@ install: $(CTBUILDDIR)/$(PROGRAM)
 	$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
 
 $(CTBUILDDIR)/configtoolres.o: $(CTDIR)/configtool.rc
-	$(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" --include-dir $(WXDIR)/include --include-dir $(CTDIR) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__
+	$(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" --include-dir $(WXDIR)/include --include-dir $(CTDIR) --define __GNUWIN32__
 
 clean:
 	rm -f $(CTBUILDDIR)/$(PROGRAM) $(CTBUILDDIR)/*.o