title: Simple makefile for C/C++ targets used with arm-linux-gcc
body: <p>I would like to cross-compile a simple program for ARM architecture using the arm-linux-gcc suite of compilers [arm-linux-gcc (Buildroot 2011.08) 4.3.6].  I've attempted to use a simple makefile for compiling C code, and another simple makefile for compiling C++ code.  For example, my makefile for C code is reproduced below, but it does not create an ELF binary for running on my embedded system.  The host system is x64 GNU Linux. </p>
  
  <p>Here is the listing of my very simple makefile for a C program:</p>
  
  <pre><code>CC=arm-linux-gcc
  CFLAGS=-Wall
  main: test.o 
  
  clean:
      rm -f test test.o 
  </code></pre>
  
  <p>The makefile reproduced above only creates an object file with extension .o, and does not create an ELF binary.</p>
  
  <p>I've Googled for a good solution, but I can't seem to find one webpage showing example cross-compile ARM makefiles for both C and C++ programs.  Perhaps an answer to this post could show such examples.</p>