title: Automake Libtool 'No rule to make target'
body: <p>I've been trying to build to GLTools library that accompanies The <a href="http://www.starstonesoftware.com/OpenGL/" rel="noreferrer">OpenGL SuperBible</a> into a libtool library with automake.</p>
  
  <p>I've set up autoconf and automake but when it comes to actually build the library I get:</p>
  
  <pre><code>$ make
  make: *** No rule to make target `GLBatch.lo', needed by `libgltools.la'.  Stop.
  </code></pre>
  
  <p>I've searched google as much as my sanity will let me and come up with nothing, I'm new to automake so I'm not quite sure what to be searching for. I'm sure it's either a tiny mistake or I've missed something fundamental.</p>
  
  <p>Here is my Makefile.am:</p>
  
  <pre><code>ACLOCAL_AMFLAGS = -I m4
  
  lib_LTLIBRARIES = libgltools.la
  libgltools_la_SOURCES = GLBatch.cpp GLShaderManager.cpp GLTriangeBatch.cpp GLTools.cpp math3d.cpp glew.c
  #libgltools_la_CFLAGS = 
  libgltools_la_LIBADD = -lX11 -lglut -lGL -lGLU -lm
  
  include_HEADERS = GLBatchBase.h GLBatch.h GLFrame.h GLFrustum.h GLGeometryTransform.h GLMatrixStack.h GLShaderManager.h GLTools.h GLTriangleBatch.h math3d.h StopWatch.h GL/glew.h GL/glxew.h GL/wglew.h
  
  EXTRA_DIST = autogen.sh
  </code></pre>
  
  <p>And my configure.ac if it matters:</p>
  
  <pre><code>#                                               -*- Autoconf -*-
  # Process this file with autoconf to produce a configure script.
  
  AC_PREREQ([2.67])
  AC_INIT([libgltools.la], [0.1], [jon.hatchett@gmail.com])
  AM_INIT_AUTOMAKE([libgltools.la], [0.1])
  AC_PROG_LIBTOOL
  AC_SUBST(LIBTOOL_DEPS)
  AC_CONFIG_MACRO_DIR([m4])
  AC_CONFIG_SRCDIR([src/])
  AC_CONFIG_HEADERS([include/config.h])
  
  # Checks for programs.
  AC_PROG_CXX
  AC_PROG_CC
  
  # Checks for libraries.
  # FIXME: Replace `main' with a function in `-lGL':
  AC_CHECK_LIB([GL], [main])
  # FIXME: Replace `main' with a function in `-lGLU':
  AC_CHECK_LIB([GLU], [main])
  # FIXME: Replace `main' with a function in `-lX11':
  AC_CHECK_LIB([X11], [main])
  # FIXME: Replace `main' with a function in `-lglut':
  AC_CHECK_LIB([glut], [main])
  # FIXME: Replace `main' with a function in `-lm':
  AC_CHECK_LIB([m], [main])
  
  # Checks for header files.
  AC_PATH_X
  AC_CHECK_HEADERS([inttypes.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h])
  
  # Checks for typedefs, structures, and compiler characteristics.
  AC_HEADER_STDBOOL
  AC_C_INLINE
  AC_TYPE_INT32_T
  AC_TYPE_INT64_T
  AC_TYPE_UINT64_T
  AC_CHECK_TYPES([ptrdiff_t])
  
  # Checks for library functions.
  AC_HEADER_MAJOR
  AC_FUNC_MALLOC
  AC_CHECK_FUNCS([gettimeofday sqrt strchr strstr])
  
  AC_CONFIG_FILES([Makefile])
  AC_OUTPUT
  </code></pre>
  
  <p>Thanks very much.</p>