The easiest way is to use glade.
To add new source files, add the files to the src directory and add their names to the src/Makefile.am file.
To create a source tarball type 'make dist'
bin_PROGRAMS = foonly foonly_SOURCES = main.c foo.c foo.h nly.c scanner.l parser.y foonly_LDADD = @LEXLIB@
dnl Process this file with autoconf to produce a configure script. AC_INIT(main.c) AM_INIT_AUTOMAKE(foonly, 1.0) AC_PROG_CC AM_PROG_LEX AC_PROG_YACC AC_OUTPUT(Makefile)
This is an example as created by glade. The whole thing is TARed up and available here: gtksample.tgz
dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(gtksample, 0.1) AM_CONFIG_HEADER(config.h) AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AM_PATH_GTK(1.2.0, , AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) dnl Set PACKAGE_DATA_DIR in config.h. if test "x${datadir}" = 'x${prefix}/share'; then if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}") else AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}") fi else AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}") fi dnl Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") dnl Use -Wall if we have gcc. changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi changequote([,])dnl AC_OUTPUT([ Makefile src/Makefile ])
## Process this file with automake to produce Makefile.in SUBDIRS = src EXTRA_DIST = \ autogen.sh \ gtksample.glade install-data-local: @$(NORMAL_INSTALL) if test -d $(srcdir)/pixmaps; then \ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \ for pixmap in $(srcdir)/pixmaps/*; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \ fi \ done \ fi dist-hook: if test -d pixmaps; then \ mkdir $(distdir)/pixmaps; \ for pixmap in pixmaps/*; do \ if test -f $$pixmap; then \ cp -p $$pixmap $(distdir)/pixmaps; \ fi \ done \ fi
## Process this file with automake to produce Makefile.in INCLUDES = \ @GTK_CFLAGS@ bin_PROGRAMS = gtksample gtksample_SOURCES = \ main.c \ support.c support.h \ interface.c interface.h \ callbacks.c callbacks.h gtksample_LDADD = @GTK_LIBS@