title: Writing an LLVM Pass
body: <p>i'm trying to create an LLVM pass using the guide at <a href="http://llvm.org/releases/2.9/docs/WritingAnLLVMPass.html" rel="nofollow">http://llvm.org/releases/2.9/docs/WritingAnLLVMPass.html</a><br>
  but i'm having several problems:</p>
  
  <ul>
  <li><p>i haven't many of the folder that are indicated into the guide (lib/Transform/Hello) and (Debug+Asserts), i have created them, is it right? what's the right path?
  i create these: /usr/lib/llvm-2.9/lib/Transforms/Hello     and   /usr/lib/llvm-2.9/Debug+Asserts</p></li>
  <li><p>when i try to make the file in the guide i have error:</p></li>
  </ul>
  
  <p>.</p>
  
  <pre><code># Makefile for hello pass
  
  
  # Path to top level of LLVM heirarchy
  LEVEL = /usr/lib/llvm-2.9/build        #*********I MODIFY THIS!!!! ***************
  
  # Name of the library to build
  LIBRARYNAME = Hello
  
  # Make the shared library become a loadable module so the tools can 
  # dlopen/dlsym on the resulting library.
  LOADABLE_MODULE = 1
  
  # Tell the build system which LLVM libraries your pass needs. You'll probably
  # need at least LLVMSystem.a, LLVMSupport.a, LLVMCore.a but possibly several
  # others too.
  LLVMLIBS = LLVMCore.a LLVMSupport.a LLVMSystem.a
  
  # Include the makefile implementation stuff
  include $(LEVEL)/Makefile.common
  </code></pre>
  
  <p>and i modify also other lines into Makefile.common:</p>
  
  <pre><code>ifndef LLVM_SRC_ROOT
  include $(LEVEL)/Makefile.rules
  else
  include $(LLVM_SRC_ROOT)/Makefile.rules
  endif
  </code></pre>
  
  <p>because it doesn't find the Makefile.rules (in this way it works)</p>
  
  <p>but now i have this error when i do make into the folder containing my hello.c file (/usr/lib/llvm-2.9/lib/Transforms/Hello):</p>
  
  <pre><code>make: ***  No rule to make target "/configure", needed by "/config.status".  Stop.
  </code></pre>
  
  <p>what's the problem?!?</p>