执行文件

执行文件

如何执行makefile?此文件包含在可从以下位置下载的 sts-2.1.2 文件中这里

根据 NIST 文档(第 5.3 节),我需要编辑makefile

修改以下几行:
(a)CC(您的 ANSI C 编译器)
(b)ROOTDIR(在此过程中先前规定的根目录,例如 rng/)

user@SC13-VM:~/Documents/sts-2.1.2$ ./makefile
./makefile: line 1: CC: command not found
./makefile: line 2: GCCFLAGS: command not found
./makefile: line 3: ROOTDIR: command not found
./makefile: line 4: ROOTDIR: command not found
./makefile: line 4: SRCDIR: command not found
./makefile: line 5: ROOTDIR: command not found
./makefile: line 5: OBJDIR: command not found
./makefile: line 6: VPATH: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
 ......

总共有94行。

然后我就按照你说的做了:

 user@SC13-VM:~/Documents/sts-2.1.2$ make makefile
 make: Nothing to be done for `makefile'.
 user@SC13-VM:~/Documents/sts-2.1.2$ ls
 data  experiments  include  makefile  makefile~  obj  src  templates

 user@SC13-VM:~/Documents/sts-2.1.2$ make  makefile
 make: Nothing to be done for `makefile'.

答案1

运行make以运行 Makefile。这假定您位于与文件所在的同一目录中Makefile

如果您在不同的目录中,请运行make -C directory,其中directory是包含文件的目录的路径Makefile

答案2

从以上答案的评论来看,你可能犯了和我一样的错误:

错误命令:make makefile 这将导致错误“没有什么可做的”

右键命令:make -f makefile

我应该提到,我已经将其制作成可执行文件,并遇到了同样的错误。此外,上述命令最初执行时没有错误,但文件assess没有按承诺出现。我重复了一遍,成功了。我是新手,所以我真的不能对此发表太多评论。

相关内容