Dimitrie O. Paun wrote:
On December 31, 2002 03:43 pm, Manu wrote:
that Visual-MinGW should not depend on cygwin, no? If so, it makes sense to make this explicit with -mno-cygwin.
If MinGW doesn't complain, I agree.
It shouldn't, it's documented to do so, try it out.
It works.
-fvtable-thunks is problematic. I use gcc version 2.95.3-6 (mingw special), (faster, smaller binaries) -fvtable-thunks is required with gcc 2, but gcc 3 outputs a warning. Any workaround?
The best thing would be to determine the version of gcc dynamically in the makefile, like so:
GCC_VER_2 := 'gcc version 2.' CFLAGS = -mno-cygwin -W -Wall -fno-exceptions -fno-rtti ifeq ($(findstring $(GCC_VER_2), $(shell gcc -v)),$(GCC_VER_2)) CFLAGS += -fvtable-thunks endif ifeq ($(MAKECMDGOALS),debug) CFLAGS += -g else CFLAGS += $(OPTIMIZ) else
This would require GNU make, but your current makefile requires GNU make anyway, so...
I tried -Wno-deprecated, but it doesn't suppress warnings. Annoying :(
In this case, it would be better to rename makefile -> Makefile, it's more standard for GNU make files.
Ok, added to /Todo.
Visual-MinGW generates the right makefile indeed, from user parameters in the ".prj" file. There is three possibilities:
- makefile.wine
- configure.in/Makefile.am > configure script.
- modifying params in ".prj" files.
I will change the parameters in ".prj" files, then generated makefiles should work for both MinGW and Wine. Though, I don't have a solution for -fvtable-thunks.
There shouldn't be a any need for modifying parameters in .prj files. Look, what we can do is this:
ifdef WINE CC = winegcc CXX = winegcc -xc++ WRES = wrc else CC = g++ WRES = windres endif
And then, to compile on Wine you just make sure you define WINE before invoking make, like so: WINE=1 make or make WINE=1
Makefiles are standard Visual-MinGW generated makefiles, meanwhile configure.in, Makefile.am are available, I suggest "cvs add Makefile.wine".
About configuration files, I started a new project called MSYS Here, which is a MSYS loader. With it, MSYS can be launched from Windows Explorer, the same way than the "DOS Prompt Here" power toy.
Having a configure script can help, but let's get this one fixed first. Once this works, we can look at the configuration stuff.
Manu.