pkg-config

CFLAGS_GTK = `pkg-config --cflags gtk+-2.0`
LIBS_GTK = `pkg-config --libs gtk+-2.0`

gcb-test: main.o
        $(CC) $(COMPILER_FLAGS) -o gcb-test main.o $(LIBS_GTK)

main.o: main.c
        $(CC) $(COMPILER_FLAGS) -c main.c -o main.o $(CFLAGS_GTK)

Tagged with:

Categorised as: