/temp         lpg.c(主プログラム)
	/temp/input   init.c input.c
	/temp/output  output.c
	/temp/sim     basho_n.c plan.c
(ディレクトリ /temp にある Makefile )
#
#     全体の制御
#
LIBS   = -L/temp -llpg -lm
SUBDIR = input sim output
all: lpg.o ${SUBDIR}
	gcc lpg.o $(LIBS) -o lpg
${SUBDIR}: FRC
	cd $@; make
FRC:
(ディレクトリ /temp/input にある Makefile.プログラム input.c がデ
ィレクトリ /temp/include にあるヘッダファイル command.h を必要と
しているものとします)
#
#     入力と初期設定プログラム
#
LIB    = /temp/liblpg.a
CFLAGS = -I /temp/include
OBJECT = $(LIB)(input.o) $(LIB)(init.o)
in: $(OBJECT)
$(LIB)(input.o): /temp/include/command.h
(ディレクトリ /temp/output にある Makefile )
#
#     出力プログラム
#
LIB    = /temp/liblpg.a
OBJECT = $(LIB)(output.o)
out: $(OBJECT)
(ディレクトリ /temp/sim にある Makefile )
#
#     シミュレーションの実行プログラム
#
LIB    = /temp/liblpg.a
OBJECT = $(LIB)(basho_n.o) $(LIB)(plan.o)
sim: $(OBJECT)