I am used to using Tasm and tlink, and am learning to use masm. How do I use a makefile to make a executable. I looked at the help provided with ml/h and and link/help but am still confused. Thanks.
Posted on 2002-07-25 08:07:02 by skywalker
Take a look in the *.bat files in the masm32/bin directory.
Posted on 2002-07-25 08:10:56 by bazik
andrew,

The command line options can be obtained from running either ML.EXE or LINK.EXE for the actual commands.


drv:\path\rc.exe /v yourres.rc

drv:\path\ml.exe /c /coff yourfile.asm

drv:\path\link.exe /SUBSYSTEM:WINDOWS yourfile.obj

These are the three basic command lines you need to build a source file into an EXE file.

With LINK.EXE, you can build the resources in a couple of different ways, RC will compile the resources into a RES file that you can either convert to OBJ format using CVTRES.EXE or you can add it to the end of the LINK command line so that link does it during the link stage.

drv:\path\link.exe /SUBSYSTEM:WINDOWS yourfile.obj yourres.res

The batch files in MASM32 already do this but its worth you understanding how it all works.

Regards,

hutch@movsd.com
Posted on 2002-07-25 08:23:19 by hutch--
I read every bat file in the bin directory. Makefile is not mentioned in any of them.
Posted on 2002-07-25 08:59:02 by skywalker
Andrew,

If you desperately want to use a make file, look around the Microsoft site or Iczelions site for the last version of NMAKE.EXE that was released then try and find some reference material old enough to make sense of it and you are there. I have the documentation for the version of NMAKE that came with masm611 and I doubt that the syntax has changed much.

Regards,

hutch@movsd.com
Posted on 2002-07-26 05:48:09 by hutch--
The basic syntax for make files is

# '#' starts a comment


targetfile: buildcomponentfile ...
build command line 1
build command line 2

A targetfile may be listed as the buildcomponentfile of another targetfile. Each buildcomponentfile may also be a build control file.

The first targetfile listed is, by default, the ultimate file you will build. The list of buildcomponentfile's are separated with spaces only. A blank line will end a list of command lines. Notice that the command lines are indented. The targetfile line is not indented.

A production quality MAKE, such as TMAKE or NMAKE, also has macros and suffix-based options which provide shorthand notation.
Posted on 2002-07-26 19:31:54 by tenkey