automake
[Top][All Lists]
Advanced

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

Re: Cannot see CFLAGS


From: Benoit SIGOURE
Subject: Re: Cannot see CFLAGS
Date: Tue, 23 Oct 2007 15:51:08 +0200

On Oct 23, 2007, at 9:14 AM, Hongliang Wang wrote:

From: address@hidden:
Hongliang Wang wrote:

zizzy_LDADD = ../gen/libzizzy.a ../ora/libzizora.a
zizzy_CFLAGS = -Wall -Werror `pkg-config --cflags glib-2.0`
zizzy_LDFLAGS = -ggdb `pkg-config --libs glib-2.0`

-lfoo (which is likely the result of `pkg-config --libs ...`) does not
go in LDFLAGS. You should put that in LIBS or LIBADD. That is causing
the order of the command line to be wrong, which causes the link to
fail.
Thanks for the reply.

I tried to update the Makefile.am according to your advice, but failed.

Makefile.am in jz/util
---------------------------------------------------------------------- -----------------------------
bin_PROGRAMS = zizzy

zizzy_SOURCES = main.c dictionary.c dictionary.h dump.c dump.h zop.c zop.h hl.env

zizzy_LDADD = ../gen/libzizzy.a ../ora/libzizora.a
zizzy_CFLAGS = -Wall -Werror `pkg-config --cflags glib-2.0`
#zizzy_LDFLAGS = -ggdb `pkg-config --libs glib-2.0`
zizzy_LIBADD = -ggdb `pkg-config --libs glib-2.0`

INCLUDES = -I..

Then I tried to apply the changes:

address@hidden> pwd
/home/jigsaw/dev/jhwgu/src/jz
address@hidden> automake
util/Makefile.am:10: use `zizzy_LDADD', not `zizzy_LIBADD'

What should I do then?

Do what automake tells you: use zizzy_LDADD.
Actually you have to use foo_LDADD when `foo' is a program and foo_LIBADD when `foo' is a library (AFAIR).

Cheers,

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]