Rational Developer for System z
PL/I for Windows, Version 7.6, プログラミング・ガイド

MAKE ファイルでリンク

MAKE ファイルを使用して、プロジェクトの作成に必要な一連の操作 (コンパイルとリンクなど) を整理してまとめます。 これにより、すべての操作を 1 回で呼び出すことができます。 NMAKE ユーティリティーを使用すると、変更を受けたファイル、および変更を受けたファイルに依存するファイルまたはその中に 組み込まれたファイルのみに操作が実行されるため、変更時間の節約になります。

以下の図に基本的な MAKE ファイルの例を示します。

図 4. MAKE ファイルの例
#--------------------------------------------------------
#
#  fun.mak - sample makefile
#
#    Usage:  nmake fun.mak
#
#    The following commands are done only when needed:
#
#       - Compiles fun, text, table, care,
#                   xlib1, and xlib2
#       - Adds xlib1 and xlib2 to library xlib
#       - Links fun, text, table, care, and xlib
#          to build fun.exe
#
#    Each block is as follows:
#      <target>: <list of dependencies for target>
#           <action(s) required to build target>
#
#--------------------------------------------------------

OBJS = fun.obj text.obj table.obj care.obj
LIBS = xlib.lib

fun.exe: $(OBJS) $(LIBS)
  ilink /MAP:funlist $(OBJS) $(LIBS)

xlib.lib: xlib1.obj xlib2.obj
  ilib /OUT:xlib.lib xlib1.obj xlib2.obj
fun.obj:  fun.pli
  pli fun.pli

text.obj:  text.pli
  pli text.pli

table.obj:  table.pli
  pli table.pli

care.obj:  care.pli
  pli care.pli

xlib1.obj:  xlib1.pli
  pli xlib1.pli

xlib2.obj:  xlib2.pli
  pli xlib2.pli

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)