Re: Writing my own Make file



I suggest you to use all provided gnutools. You can use some configure macros to get the work done and use a generic makefile. You need the next macros:

PKG_CHECK_MODULES(GTKMM2, [gtkmm-2.4])
This one will check that gtkmm is installed in your system

AC_SUBST(GTKMM2_CFLAGS)
AC_SUBST(GTKMM2_LIBS)
With these macros you can get the libs and the flags you need to compile the files.

This is a short and incomplete example, You can use anjuta to get some templates of the files.

On 2/24/07, Paul Davis <pjdavis engineering uiowa edu> wrote:
On 2/24/07, Jamiil Abduqadir <jalqadir gmail com> wrote:
> This is not really a question about gnu-make, but how to get gtkmm work with
> gnu-make.
>  I am adding a variable called CFLAGS that will take the gtkmm-2.4 --cflags
> as its parameter and a LIBS variable that will take the gtkmm-2.4 --libs.
>  How do I do this? will the below example work?
>
>  CFLAGS= -Wall -g `gtkmm-2.4 --cflags` -ansi
>  LIBS = `gtkmm-config --libs`
>
>  Thanks in advance
>
>
>
>
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>

Jamiil,

gtkmm-config is old.  Really old.

You'll want to use pkg-config which is fairly similar

CFLAGS=-Wall -g -ansi `pkg-config --cflags gtkmm-2.4`
LIBS=`pkg-config --libs gtkmm-2.4`

Alternatively I think you can do:

CFLAGS=-Wall -g -ansi $(pkg-config --cflags gtkmm-2.4)

To have make substitute the command instead of passing the backtick
_expression_ to the shell.

And on a side note I'll evangelize SCons which I prefer over make.

HTH,
Paul Davis
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]