Hi,
I have only one small cpp file but I am having hard time building it with autotools.
Before I started with autotools I built it with:
g++ main.cpp `sdl-config --cflags --libs`
and that worked fine.
I created a subdir named src and put my main.cpp there.
I made a Makefile.am and put SUBDIR = src in it.
I made a configure.ac with:
Code:
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(spankytanky, 0.1.0, [email protected])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CXX
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
# Checks for library functions.
AC_CONFIG_FILES([Makefile
src/Makefile])
AM_INIT_AUTOMAKE
AC_OUTPUT
I made src/Makefile.am with:
Code:
bin_PROGRAMS = spankytanky
spankytanky_SOURCES = main.cpp
spankytanky_LDADD = /usr/lib SDL
spankytanky_CPPFLAGS =/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
When I do:
autoreconf
./configure
make
make all-am
make[1]: Entering directory `/home/kroiz/spankytanky'
make[1]: Leaving directory `/home/kroiz/spankytanky'
seems like it does not decent to src.
why? if you please.