Ainsi parla Alain D'EURVEILHER le 348�me jour de l'an 2003: > Nicolas Rueff a �crit: > > >Ainsi parla Alain D'EURVEILHER le 347�me jour de l'an 2003: > > > > > > > >>pkg-config --cflags --libs gtk+-2.0 > >> > >> > > > >que donne cette commande ? > > > > > J'ai essay� ceci : > dans mon Makefile : > -------------- > GLIBS = `gtk-config --libs --cflags` > GFLAGS = `gtk-config --cflags` > GNLIBS = `gnome-config --cflags --libs gnomeui` > GNFLAGS = `gnome-config --cflags` > GTALL = `pkg-config --cflags --libs gtk+-2.0` > GTFLAGS = `pkg-config --cflags gtk+-2.0` > GTLIBS = `pkg-config --libs gtk+-2.0` > > all: reboot > > reboot: reboot.o > cc reboot.o -o reboot $(GTALL) > > reboot.o: reboot.c > cc reboot.c -c -o reboot.o $(GTFLAGS) > > clean: > rm -f *.o > ----------------------- > Puis : > ----------------------- > 13:17 [EMAIL PROTECTED] ~/gtk/test1% make clean && make > rm -f *.o > cc reboot.c -c -o reboot.o `pkg-config --cflags gtk+-2.0` > cc reboot.o -o reboot `pkg-config --cflags --libs gtk+-2.0` > 13:20 [EMAIL PROTECTED] ~/gtk/test1% > ------------------------ > > =>Ca semble mieux. Mais ai-je raison de faire ainsi ??
C'est un d�but, mais pas tr�s clair. Une autre m�thode, plus �l�gante
(vive les r�gles implicites):
--------------
CC = gcc
CFLAGS = `pkg-config --cflags gtk+-2.0`
LDLIBS = `pkg-config --libs gtk+-2.0`
SOURCES=reboot.c reboot2.c
OBJS=$(SOURCES:.c=.o)
TARGET=reboot
all: $(TARGET)
$(TARGET): $(OBJS)
clean:
rm -f $(OBJS) $(TARGET)
-----------------------
info make pour + d'infos ...
--
.,p**"*=b_ Nicolas Rueff
?P" .__ `*b Montb�liard - France
|P .d?'`&, 9| http://rueff.tuxfamily.org
M: |} |- H' [EMAIL PROTECTED]
&| `#?_._oH' +33 6 77 64 44 80
`H. "`"`' GPG 0xDD44DAB4
`#?. ICQ 97700474
`^~.
We are Penguin. Resistance is futile. You will be assimilated.
pgp0OEqSd787q.pgp
Description: PGP signature

