title: Makefile arduino uno "make: *** No rule to make target `sketch.hex', needed by `all'."
body: <p>I am trying to write a makefile to compile my sample arduino program in CLI. I am using the default base makefile <a href="http://pastebin.com/z0HneVNX" rel="nofollow">here</a>, and my makefile which extends it looks like this.</p>
  
  <pre><code>ARDUINO_DIR = /usr/share/arduino
  BOARD_TAG = uno
  ARDUINO_PORT = /dev/ttyACM0
  ARDUINO_LIBS = 
  include /usr/share/arduino/Arduino.mk
  </code></pre>
  
  <p>This is what happends when I run make.</p>
  
  <pre><code>$ make
  cat build-uno/sketch.d &gt; build-uno/depends.mk
  make: *** No rule to make target `sketch.hex', needed by `all'.  Stop.
  </code></pre>
  
  <p>I also tried this kind of thing in the makefile (I saw it online somewhere while googling)</p>
  
  <pre><code>$(TARGET_HEX): bin/$(TARGET)
  </code></pre>
  
  <p>But that results in this</p>
  
  <pre><code>make: *** No rule to make target `bin/My', needed by `build-uno/My'.  Stop.
  </code></pre>
  
  <p><strong>Edit</strong>
  Got it working with sublime text, and thats good enough for me. I just hate the default IDE.</p>