title: Extend the makefile to generate a library and documentation with doxygen
body: <p>I have implemented a binary tree program which includes the tree.c with the functions, the tree.h with the declarations of them and a main.c for testing. 
  Also, I have a makefile which is:</p>
  
  <pre><code>CC=gcc
  CFLAGS=-g -Wall
  DEPS = tree.h
  OBJ = main.o tree.o 
  
  %.o: %.c $(DEPS)
      $(CC) -c -o $@ $&lt; $(CFLAGS)
  
  tree: $(OBJ)
      $(CC) -o $@ $^ $(CFLAGS)
  
  clean:
      rm -f *.o tree
  </code></pre>
  
  <p>Now I want to make it generate a library not only an object ﬁle for the binary trees functions and afterwards to generate the documentation of doxygen inside the makefile. Any help would be helpful.</p>