Re: compiling gtk project



On Sun, 9 Dec 2001, Mariusz Bozewicz wrote:


Here is a piece of my Makefile:

CC=gcc
LDLIBS=`gtk-config --libs`
CFLAGS=`gtk-config --cflags`
`gtk-config --cflags' used for compiling, you should use that
to generate .o files from .c files.

`gtk-config --libs' used for linking, you should use that
to generate an executable files from your .o files.

Eveny single .o rules in your makefile doesn't need $(LDLIBS)
since it doesn't require linking.

kolory.o: kolory.c modele.h
        $(CC) -c  $(LDLIBS) $(CFLAGS) kolory.c

Modify every .o makefile command like this

kolory.o: kolory.c modele.h
        $(CC) -c $(CFLAGS) kolory.c

-- 
C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver.: http://pcrc.hongik.ac.kr/~cinsk/




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