I have the following Makefile.am inside ./src where I need to generate dependencies for a gtkmm application.
bin_PROGRAMS = sampleapplication
sampleapplication_SOURCES = exampleapplication.cpp examplewindow.cpp main.cpp
sampleapplication_INCLUDES = ../include/exampleapplication.h ../include/examplewindow.h
sampleapplication_LDADD = $(DEPS_LIBS)
make_flags=`pkg-config gtkmm-3.0 --cflags --libs`
AM_CPPFLAGS = ${make_flags} -I$(top_srcdir)/include
However when I run this command all I see echoed to the screen when this command is run is:
g++ -DHAVE_CONFIG_H -I. -I.. `pkg-config gtkmm-3.0 --cflags --libs` -I../include -g -O2 -MT exampleapplication.o -MD -MP -MF .deps/exampleapplication.Tpo -c -o exampleapplication.o exampleapplication.cpp
In file included from /usr/include/gtk-3.0/gtk/gtk.h:43:0,
from /usr/include/gtkmm-3.0/gtkmm/buildable.h:29,
Which does not expand out the way I want it. What is the correct way to do this?
pkg-configincludes useful autoconf macros, which are described on themanpage. Inconfigure.acuse something like:You now have
GTKMM_CFLAGS,GTKMM_LIBSavailable for substitution inMakefile.amfiles.