root/doc_inner/gnu_global/S/2815.html

/* [<][>][^][v][top][bottom][index][help] */
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>src/Makefile</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.6.5' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/2932.html'>src</a>/Makefile</h2>
<em class='comment'>/* [&lt;][&gt;][^][v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a># ソースファイル。グループに分類
<a id='L2' name='L2'></a>CMDOBJ := casl2 comet2 dumpword casl2rev comet2monitor
<a id='L3' name='L3'></a>COMMONOBJ := word cmem cerr
<a id='L4' name='L4'></a>ASOBJ := assemble token label
<a id='L5' name='L5'></a>EXECOBJ := exec dump struct hash load disassemble monitor
<a id='L6' name='L6'></a>
<a id='L7' name='L7'></a># ヘッダファイル
<a id='L8' name='L8'></a>INCLUDEDIR := ../include
<a id='L9' name='L9'></a>
<a id='L10' name='L10'></a># コマンド
<a id='L11' name='L11'></a>CC := gcc
<a id='L12' name='L12'></a>CFLAGS := -g -Wall -Wextra -I$(INCLUDEDIR)
<a id='L13' name='L13'></a>CTAGS := ctags
<a id='L14' name='L14'></a>ETAGS := etags
<a id='L15' name='L15'></a>ECHO := echo
<a id='L16' name='L16'></a>SED := sed
<a id='L17' name='L17'></a>WHICH := which
<a id='L18' name='L18'></a>
<a id='L19' name='L19'></a>.PHONY: all build tag clean
<a id='L20' name='L20'></a>
<a id='L21' name='L21'></a>all: build tag
<a id='L22' name='L22'></a>
<a id='L23' name='L23'></a># casl2、comet2、dumpword、casl2rev、comet2monitorのビルド
<a id='L24' name='L24'></a>build: $(CMDOBJ)
<a id='L25' name='L25'></a>
<a id='L26' name='L26'></a>casl2: $(addsuffix .o,casl2 $(COMMONOBJ) $(ASOBJ) $(EXECOBJ))
<a id='L27' name='L27'></a>
<a id='L28' name='L28'></a>comet2: $(addsuffix .o,comet2 $(COMMONOBJ) $(ASOBJ) $(EXECOBJ))
<a id='L29' name='L29'></a>
<a id='L30' name='L30'></a>dumpword: $(addsuffix .o,dumpword $(COMMONOBJ))
<a id='L31' name='L31'></a>
<a id='L32' name='L32'></a>casl2rev:$(addsuffix .o,casl2rev $(COMMONOBJ) $(ASOBJ) $(EXECOBJ))
<a id='L33' name='L33'></a>
<a id='L34' name='L34'></a>comet2monitor:$(addsuffix .o,comet2monitor $(COMMONOBJ) $(ASOBJ) $(EXECOBJ))
<a id='L35' name='L35'></a>
<a id='L36' name='L36'></a># .dファイルからヘッダファイルの依存関係を取得する
<a id='L37' name='L37'></a># tags、check、clean、.d で終わるターゲットの場合は除く
<a id='L38' name='L38'></a>NODEP := %tags %check %clean %.d
<a id='L39' name='L39'></a>ifeq ($(filter $(NODEP),$(MAKECMDGOALS)),)
<a id='L40' name='L40'></a>  -include $(addsuffix .d,$(CMDOBJ) $(COMMONOBJ) $(STRUCTOBJ) $(ASOBJ) $(EXECOBJ))
<a id='L41' name='L41'></a>endif
<a id='L42' name='L42'></a>
<a id='L43' name='L43'></a># tagファイル作成 - ctags &amp; etags
<a id='L44' name='L44'></a># コマンドがない場合はなにもしない
<a id='L45' name='L45'></a>tag: tags TAGS
<a id='L46' name='L46'></a>
<a id='L47' name='L47'></a>tags: $(INCLUDEDIR)/*.h *.c
<a id='L48' name='L48'></a>        $(if $(strip $(shell $(WHICH) $(CTAGS))),$(CTAGS) $^,@$(ECHO) '$(CTAGS): not found')
<a id='L49' name='L49'></a>
<a id='L50' name='L50'></a>TAGS: $(INCLUDEDIR)/*.h *.c
<a id='L51' name='L51'></a>        $(if $(strip $(shell $(WHICH) $(ETAGS))),$(ETAGS) $^,@$(ECHO) '$(ETAGS): not found')
<a id='L52' name='L52'></a>
<a id='L53' name='L53'></a># makeで生成したファイルの削除
<a id='L54' name='L54'></a>distclean: clean
<a id='L55' name='L55'></a>        $(RM) casl2 comet2 dumpword casl2rev
<a id='L56' name='L56'></a>
<a id='L57' name='L57'></a>clean:
<a id='L58' name='L58'></a>        $(RM) *.o *.d core tags TAGS
<a id='L59' name='L59'></a>
<a id='L60' name='L60'></a>tag-clean:
<a id='L61' name='L61'></a>        $(RM) TAGS tags
<a id='L62' name='L62'></a>
<a id='L63' name='L63'></a># ヘッダファイルの依存関係を.dファイルに出力する
<a id='L64' name='L64'></a>%.d: %.c $(INCLUDEDIR)/package.h
<a id='L65' name='L65'></a>        $(CC) -MM -I $(INCLUDEDIR) $&lt; | $(SED) 's,$*\.o *:,$*.o $*.d:,g' &gt;$@
<a id='L66' name='L66'></a>
<a id='L67' name='L67'></a>$(INCLUDEDIR)/package.h: ../VERSION
<a id='L68' name='L68'></a>        $(MAKE) -C .. version
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* [&lt;][&gt;][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
</body>
</html>

/* [<][>][^][v][top][bottom][index][help] */