[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setting macros/variables dynamically
From: |
David Boyce |
Subject: |
Re: setting macros/variables dynamically |
Date: |
Wed, 31 Oct 2007 22:43:25 -0400 |
MYSQL_LIBS := $(shell mysql_config --libs)
Notice the := as well as the $(shell).
On 10/31/07, Ron Croonenberg <address@hidden> wrote:
> Hello,
>
>
> I am (trying) to make a Makefile for compiling an application that uses
> MySQL. The app need to be compiled with flags and libs that are a bit
> machine dependant.
>
> I can find the options etc by using 'mysql_config --cflags' and
> 'mysql_config --libs"
>
> What I would like is something like (intuitive):
>
> MYSQL_LIBS = 'mysql_config --libs'
>
>
> app:
> $(CC) file1.c ... filen.c $(MYSQL_LIBS)
>
> so that I can basically use the same makefile on every different machine.
>
> It probably isn't as simple as I imagine it..
>
> but... any tips ?
>
>
> thanks,
>
> Ron
>
>
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
>