What about using the make utility? [GTK 2.x]

GTK+ FAQ
<<< Previous | Development with GTK+: the begining | Next >>>

# What about using the make utility? [GTK 2.x]

This is a sample makefile which compiles a GTK+ based program:

    # basic GTK+ app makefile
    SOURCES = myprg.c foo.c bar.c
    OBJS    = ${SOURCES:.c=.o}
    CFLAGS  = `pkg-config gtk+-2.0 --cflags`
    LDADD   = `pkg-config gtk+-2.0 --libs`
    CC      = gcc
    PACKAGE = myprg

    all : ${OBJS}
      ${CC} -o ${PACKAGE} ${OBJS} ${LDADD}

    .c.o:
      ${CC} ${CFLAGS} -c $<

    # end of file

For more information about the make utility, you should read either the related man page or the relevant info file.

<<< Previous | Home | Next >>>
I tried to compile a small Hello World of mine, but it failed. Any clue? [GTK 2.x] | Up | I use the backquote stuff in my makefiles, but my make process failed. [GTK 2.x]