Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland MAKE v4.0 - .suffixes http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
.suffixes
---------
The .suffixes directive tells MAKE the order (by file extensions) for
building implicit rules.

The syntax of the .suffixes directive is:

  .suffixes: .ext [.ext]  [.ext] . . . [.ext]

.ext represents the dependent file extension in implicit rules. For
example, you could include the line ".suffixes: .asm .c .cpp" to tell
MAKE to interpret implicit rules beginning with the ones dependent on
.ASM files, then .C files, then .CPP files, regardless of what order
they appear in the makefile.

The following example shows a makefile containing a .suffixes
directive that tells MAKE to look for a source file (MYPROG.EXE) first
with an .ASM extension, next with a .C extension, and finally with a
.CPP extension. If MAKE finds MYPROG.ASM, it builds MYPROG.OBJ from
the assembler file by calling TASM. MAKE then calls TLINK; otherwise,
MAKE searches for MYPROG.C to build the .OBJ file, and so on.

  .suffixes: .asm .c .cpp

  myprog.exe: myprog.obj
  tlink myprog.obj

  .cpp.obj:
        bcc -P $<
  .asm.obj:
        tasm /mx $<
  .c.obj:
        bcc -P- $<

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson