MAKE Utility for Windows (and Embedded Work)

What is the best "MAKE" (*) to use for Windows (using Cosmic compiler)?

I know that Microsoft's Visual C++ probably includes a "MAKE" (and I have this software, but I haven't checked to be sure "MAKE" was included).

However, I also suspect that there would be a "GNU" version of MAKE available (and the clarity of thinking characteristic of the Unix world is attractive).

Any advice plus stories of good/bad experiences would be appreciated.

Thanks, Dave.

(*) By "MAKE" I mean that classic utility that takes as input a file containing a set of dependency rules and runs compilers and linkers and so on to satisfy the dependencies.

Reply to
David T. Ashley
Loading thread data ...

Get the DJGPP system

formatting link
which includes gcc and make. The makefiles can be written to use any compiler you wish. The system runs in a command line window on all forms of Windoze. You can also use any editor you wish. It is especially powerful when combined with 4dos (jpsoft.com), which is again free. 4dos is an improved replacement for command.com (or cmd). 4nt is a non-free (but not necessary) equivalent for the nt family, including W2000 and WXP.

--
Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

I always make sure these tools are in my path:

formatting link

Includes make and other goodies.

Regards, Richard.

  • formatting link
  • formatting link
    for Cortex-M3, ARM7, ARM9, HCS12, H8S, MSP430 Microblaze, Coldfire, AVR, x86, 8051, PIC24 & dsPIC
Reply to
FreeRTOS.org

It's called NMAKE.

Whether using that is practical heavily depends on the port of GNU make you are using. I have found using the Cygwin version of GNU make together with native Win32 programs quite troublesome. The problem is that "\" is both the standard quote character under Unix, and the path separator under Windows. If I write "cc -c foo\file.c", Cygwin GNU make sometimes strips the "\" and the C compiler doesn't find its file. If I write "cc -c foo/file.c" instead, some Windows tools complain that they don't know the option "/file.c".

Therefore, I generally use a Make which is written natively for the universe I'm working in. If the compiler I'm invoking is a native Windows program, I use NMAKE or Borland MAKE, both native programs for Windows. If the compiler runs in Cygwin, I use a Cygwin make, etc.

All of them understand the basics, i.e. foo.o: foo.c foo.h $(CC) -c foo.c but the syntax to do advanced things differs. I.e. GNU has "if/else", Borland has "!if/!else". GNU has $(patsubst...), Borland only has $(a:b=c).

Stefan

Reply to
Stefan Reuther

I recommend Mingw-make, which is GNU make natively compiled under windows.

formatting link

Andy

Reply to
Andy Sinclair

... snip ...

All that is nicely handled by use of GNU make under DJGPP, as I recommended earlier.

--
Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

Cygwin "make" handles Cosmic, PC-Lint and Doxygen here without problems (after some initial tweaking).

You might need a variable containing the OS path separator, e.g. "SEP:=\\" and other conversions like srcdir := $(shell pwd | sed -r 's_^/cygdrive/(.)/_\1:/_')

(o.k., the latter can be done simpler with cygwin tools like cygpath, but is less fun).

Did you know that Activestate Perl inherited the daylight savings error from MS C? Cygwin Perl works fine. One more reason to use Cygwin.

Oliver

--
Oliver Betz, Muenchen (oliverbetz.de)
Reply to
Oliver Betz

That one has trouble passing commands longer than 128 characters to commands outside the DJGPP universe. The MS-DOS syscall interface doesn't allow more, and non-DJGPP programs don't known DJGPP's trick to work around that. This makefile A = $(B) $(B) $(B) $(B) B = 1234567890 test: cmd /c echo $(A) $(A) $(A) $(A) gives just "Error -1" for me with DJGPP make.

Stefan

Reply to
Stefan Reuther

I've found that the make that comes with Microsoft's own SFU (Windows Services for Unix) distribution works pretty nicely with the Windows-native development tools that I'm using at the moment. It seems to be a variant of Berkely PMake (as used in the *BSDs), which suits me just fine.

I've not found nmake to work very acceptably at all, over the years.

--
Andrew
Reply to
Andrew Reilly

Ditto from me too.

Don't touch cygwin with a 10-foot clown pole.

And mingw make is preferable over djgpp make. I vaguely recall the latter having problems with building very large projects (hundreds of files).

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, 
 Click to see the full signature
Reply to
Mark McDougall

There's a lot of useful utilities that come with mingw (or msys, it's partner). That's the make I use most of the time - it has all the functionality of gnu make (unlike Borland's more limited make), it works properly (MS's nmake works sort of backwards), and it has no problem with native windows programs, cygwin programs, or forward or backward slashes in file names (or a mixture). The only trouble I have seen with it is when using / for switches for windows programs, which mingw interprets as a file name.

Cygwin is sometimes useful - there are occasional *nix native programs that won't compile under mingw (for example, if they need fork support or more posix compatibility than mingw can provide). But it certainly has its headaches (cygwin1.dll hell being the main one), and as msys has matured, there is less and less need for cygwin.

Yes, djgpp is a little old and limited - mingw+msys has (IMHO) taken over as the most useful *nix environment and utility set for windows, with cygwin for those that need even closer compatibility.

Reply to
David Brown

I have always been very satisfied with Opus Make, if you are willing to pay...

--Gene

Reply to
Gene S. Berkowitz

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.