Makefile

From EosPedia
Revision as of 06:52, 23 July 2014 by Kinoshita (Talk | contribs)

Jump to: navigation, search

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

part of Makefile

When performing 3D Reconstruction on Eos, if number of files is a large amount, It is necessary to a great deal of effort in how to enter Commands one at a time. In order to reduce this effort, make command is used in many cases on Eos. And knowledge of shell script is also required in order to understand the 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

For example, when there is a Makefile as described above,

$ make EM.ref2d

If you execute as above the make command, it looks for a line that generates the extension .ref2d and performs automatically.

This time, it means that a part (1) generates .ref2d file from .ref3d file, thus it performs command as the following.

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;