Creating makefiles

The make utility maintains all the parts of and dependencies for your application program. It uses a makefile, to keep your application parts (listed in it) up to date with one another. If one part changes, make updates all the other files that depend on the changed part.

A makefile is a z/OS® UNIX text file. You can use any text editor to create and edit the file. It describes the application program files, their locations, dependencies on other files, and rules for building the files into an executable file. When creating a makefile, remember that tabbing of information in the file is important and not all editors support tab characters the same way.

The make utility uses c89 or c++ to call the z/OS XL C/C++ compiler, and the binder, to recompile and rebind an updated application program.

See z/OS UNIX System Services Programming Tools and z/OS UNIX System Services Command Reference for a detailed discussion of the shell make utility.

Makedepend utility

The makedepend utility can also be used to create a makefile. The makedepend utility is used to analyze each source file to determine what dependency it has on other files. This information is then placed into a usable makefile. See z/OS UNIX System Services Command Reference for a detailed discussion of the makedepend utility.
Note: The stand-alone makedepend utility is no longer being enhanced in future release. Instead, this utility is superseded in favour of the xlc option -qmakedep. For more information about the new -qmakedep compiler option, see Compiler options and xlc — Compiler invocation using a customizable configuration file.