【发布时间】:2012-07-24 12:08:26
【问题描述】:
我正在通过http://llvm.org/docs/WritingAnLLVMPass.html 工作,试图编写一个非常简单的通行证。 (假设我使用的是 'Joe' 而不是 'hello',因为相关目录中已经有一个 'hello')
我在我应该创建的目录“joe”,我在“joe”中创建了建议的 cpp 文件(尽管我注意到附近的目录中没有任何 cpp 文件)并将其命名为“joe.cpp”因为我不相信我被告知不同...
我到达了文档的一部分,上面写着“在本地目录中使用简单的“gmake”命令编译文件”,但我收到错误
make: *** 没有制定目标的规则
/Users/joXXXXX/llvm/llvm/lib/Transforms/joe/Makefile', needed byMakefile'。停下来。
这完全令人困惑。我注意到与this case 的相似之处,但在这种情况下,运行 ../config 然后在根目录中的 make 解决了问题。在我的任务中,这需要 20 分钟,然后什么都没有改变......谁能告诉我意味着发生了什么或给我一个成功的样子?
编辑 - 本地 Makefile 如下所示:
# Makefile for hello pass
#
# # Path to top level of LLVM hierarchy
LEVEL = ../../..
#
# # Name of the library to build
LIBRARYNAME = joe
#
# # Make the shared library become a loadable module so the tools can
# # dlopen/dlsym on the resulting library.
# LOADABLE_MODULE = 1
BUILD_ARCHIVE = 1
# # Include the makefile implementation stuff
include $(LEVEL)/Makefile.common
【问题讨论】:
-
你的 Makefile 中有没有类似
Makefile: ...的指令。这就是错误消息的内容。 -
已编辑以提供完整的 makefile :)
标签: compilation llvm clang