Makefile
Makefile is text file that is read if executing make command. make is Command that performs compile in the order determined automatically, even if there are various files as C language source code. On Eos, commands are summarized by using make, and perform large-scale works (Single particle analysis or Electron tomography ...). On purpose of distributed environment, stream processing, and improvement of the degree of freedom of the input and output, we are developing POINE as make of next generation.
Makefile on Eos
When performing 3D Reconstruction on Eos, ファイル数が莫大になると、1つずつコマンドを打ち込んでいては多大な労力を必要としてしまう。
この労力を削減するために、Eosはmakeコマンドを使って実行することが必要であることが多い。
また、makefileを理解するためにはシェルスクリプトの知識も必要となる。
.ref3d.red2d: (1)
mrc3Dto2D -i $*.ref3d -o $*.ref2d -EulerMode YOYS InterpolationMode 0 -Rot1 0 359 $(STEP) -Rot2 0 359 $(STEP) -Rot3 0 0 $(STEP) -m 1
例えば、上記のようなMakefileがあったとして、
$ make EM.ref2d
makeコマンドを上のように実行すると、自動で拡張子.ref2dを生成する行を探し実行してくれる。
今回は(1)の部分が、拡張子.ref3dファイルから.ref2dファイルを生成するという意味を表しており、以下の部分を実行する。
mrc3Dto2D -i $*.ref3d -o $*.ref2d -EulerMode YOYS InterpolationMode 0 -Rot1 0 359 $(STEP) -Rot2 0 359 $(STEP) -Rot3 0 0 $(STEP) -m 1
この行が、先程の(1)に属していることを表すために、先頭にTabによる空行が挿入されている。 つまり、Tabによる空欄がなくなるまで、(1)に属する領域ということになる。
更に、以下のようにmakeをmakeするMakefileを作れば、複数の工程を1度のmakeで実行することができる。 このように、3D Reconstructionなど複数の工程が必要な作業においてMakefileは必需品となる。
All:: make $(TARGET).ref3d; make $(TARGET).ref2d; make AVGs; make -j $(JOP_NUM) corinfo; make CORINFOs; make $(TARGET).ds6;