I'm trying to get my project buildable with automake. Specifically while using Allegro5.
I can build my code using the following command just fine
g++ -std=c++0x *.cpp -o mygame $(pkg-config --libs allegro-5.0 \
allegro_acodec-5.0 allegro_audio-5.0 allegro_color-5.0 allegro_dialog-5.0 \
allegro_font-5.0 allegro_image-5.0 allegro_main-5.0 allegro_memfile-5.0 \
allegro_physfs-5.0 allegro_primitives-5.0 allegro_ttf-5.0)
But my Makefile will not work.
Here is my src/Makefile.am
bin_PROGRAMS = mygame
AM_CXXFLAGS = "-std=c++0x"
mygame_SOURCES = Animation.cpp Body.cpp GameObject.cpp Menu.cpp Vector3.cpp \
Arena.cpp Button.cpp Keyboard.cpp Mesh.cpp Assets.cpp Character.cpp \
main.cpp Mouse.cpp Barrier.cpp Environment.cpp Manager.cpp TitleMenu.cpp
mygame_LDADD = allegro-5.0 allegro_acodec-5.0 allegro_audio-5.0 \
allegro_color-5.0 allegro_dialog-5.0 allegro_font-5.0 allegro_image-5.0 \
allegro_main-5.0 allegro_memfile-5.0 allegro_physfs-5.0 \
allegro_primitives-5.0 allegro_ttf-5.0
CLEANFILES = mygame *.o
And here is my configure.ac
AC_INIT(bayou, 0.1.0)
AM_INIT_AUTOMAKE
AC_LANG_CPLUSPLUS
AC_PROG_CXX
LT_INIT
AC_OUTPUT(
Makefile \
src/Makefile\
)
Running my first command works just fine. Running make gives me
make: *** No rule to make target `allegro-5.0', needed by 'mygame'. Stop.
So how should I set up my configure.ac and Makefile.am's so I can use libraries I normally link with pkg-config?