From: Craig R. <cr...@po...> - 2006-06-14 03:16:57
|
Ryan D'Baisse wrote: >> You can find a standalone 'make' here: >> http://mingw.org/download.shtml > > Cool, but which one? If I grab "mingw32-make-3.80.0-3.exe" will it > be compatible with the version of MinGW [and its tools] that I am > running? I installed MinGW using "MinGW-5.0.2.exe". It should be. mingw32-make is modified to use cmd.exe for its shell, by the way (it doesn't depend on a UNIX/POSIX shell) so Makefiles written for it many not work under UNIX/Linux unless very, very carefully written. >> You've said you want to do cross-platform work. How will you >> write, say, a 'clean' rule? You could use 'del' in a makefile >> for msw only. But if you want to be platform independent, then >> you'll want 'rm', which MSYS provides, along with 'make' and >> many other utilities that you may find you do need after all. > > To answer your question honestly, I have absolutely no clue. Before > you asked the question I did not even know that I HAD to concern > myself with this. That's why I suggested using a Makefile generator. You also get `configure'-like functionality (or `configure' its self, with autotools) which lets you detect things like endianness and word sizes and special case parts of your program for them if necessary. > Until this point, I was under the impression that I would install > MinGW and that it would provide EVERYTHING (aka "every single > command, utility, and tool") that I would need to create, build, > compile, etc., etc., a C++ application on a Windows box... to include > any make utilities. It does provide the minimal tools to do exactly that. mingw32-make, gcc, as, ld, etc. If you want to produce an easy-to-build portable project, you need to do some more work. > Also, from what I read on the MinGW site that the whole goal of the > project was to replicate what GNU had created with GCC... which would > include things like "make." Unfortunately, Makefiles tend to depend on a UNIX shell and utilities. That's not exactly ideal under MinGW, so it provides a modified Make that uses cmd.exe. You can use that and be very careful with your Makefiles, you can maintain two sets of Makefiles (one for MinGW, one for *NIX), or you can use a Makefile generator to do it for you. -- Craig Ringer |