From 0c774c7faccb294a418c3b71ecb63d8914a66761 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 22 Oct 2010 12:57:06 +0200 Subject: First try --- src/Makefile | 18 ------------------ src/Makefile.am | 13 +++++++++++++ src/Makefile.orig | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 18 deletions(-) delete mode 100644 src/Makefile create mode 100644 src/Makefile.am create mode 100644 src/Makefile.orig (limited to 'src') diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 8b0c154..0000000 --- a/src/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -CFLAGS=`pkg-config hildon-1 sqlite3 --cflags --libs` - -all: - $(CC) -Wall -pedantic \ - eom.c \ - interface.c \ - eom-main-window.c \ - eom-edit-window.c \ - eom-new-item-dialog.c \ - data.c \ - $(CFLAGS) \ - -o eye-on-manga - -.PHONY: check-syntax -check-syntax: - /scratchbox/login $(CC) -pedantic -Wall -Wextra -fsyntax-only \ - `readlink -f $(CHK_SOURCES)` \ - `/scratchbox/login pkg-config hildon-1 sqlite3 --cflags --libs` diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..afdd933 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,13 @@ +bin_PROGRAMS = eye-on-manga + +eye-on-manga_LDADD = $(HILDON_LIBS) + +eye-on-manga_CFLAGS = $(HILDON_CFLAGS) + +eye-on-manga_SOURCES = \ + data.c data.h \ + eom.c eom.h \ + eom-edit-window.c eom-edit-window.h \ + eom-main-window.c eom-main-window.h \ + eom-new-item-dialog.c eom-new-item-dialog.h \ + interface.c interface.h diff --git a/src/Makefile.orig b/src/Makefile.orig new file mode 100644 index 0000000..8b0c154 --- /dev/null +++ b/src/Makefile.orig @@ -0,0 +1,18 @@ +CFLAGS=`pkg-config hildon-1 sqlite3 --cflags --libs` + +all: + $(CC) -Wall -pedantic \ + eom.c \ + interface.c \ + eom-main-window.c \ + eom-edit-window.c \ + eom-new-item-dialog.c \ + data.c \ + $(CFLAGS) \ + -o eye-on-manga + +.PHONY: check-syntax +check-syntax: + /scratchbox/login $(CC) -pedantic -Wall -Wextra -fsyntax-only \ + `readlink -f $(CHK_SOURCES)` \ + `/scratchbox/login pkg-config hildon-1 sqlite3 --cflags --libs` -- cgit v1.2.3-54-g00ecf From ad9ed8ffafdc44c6acbdbfadb1cd70ba38416d46 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 25 Oct 2010 22:57:25 +0200 Subject: Compiles with automake --- Makefile.am | 2 +- autogen.sh | 9 ++++----- configure.ac | 57 ++++++++++----------------------------------------------- src/Makefile.am | 6 +----- 4 files changed, 16 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/Makefile.am b/Makefile.am index 9093308..74e4baf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ EXTRA_DIST = \ autogen.sh -SUBDIRS = src data +SUBDIRS = src diff --git a/autogen.sh b/autogen.sh index afd87cb..b76768c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,6 @@ #!/bin/sh -set -x -aclocal-1.7 -autoconf --force -autoheader --force -automake-1.7 --add-missing --copy --force-missing --foreign +aclocal +automake -ac +autoconf +echo "Ready to go (run configure)" diff --git a/configure.ac b/configure.ac index 0475ec1..d057996 100644 --- a/configure.ac +++ b/configure.ac @@ -1,53 +1,16 @@ AC_INIT(Makefile.am) -AM_INIT_AUTOMAKE(eye-on-manga, 0.1) -AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(eye-on-manga, 0.0.1) AC_PROG_CC AC_PROG_INSTALL -AC_HEADER_STDC -# Option to enable debugging -AC_ARG_ENABLE(debug, - [AC_HELP_STRING([ --enable-debug], [Debugging (default=no)])], - [with_debug=yes], [with_debug=no]) - -if test "x$with_debug" == "xyes" ; then - CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall " -else - CFLAGS="$CFLAGS -O2 -Wall " -fi - -# Hildon library dependencies -PKG_CHECK_MODULES(HILDON, hildon-1) -AC_SUBST(HILDON_LIBS) -AC_SUBST(HILDON_CFLAGS) - -# To make the application visible in maemo Task Navigator it needs a Desktop -# file for the application. -desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir` - -# Application pixmaps install directory -pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir` - -# Application icon install directories -icon_26x26dir=$datadir/icons/hicolor/26x26/hildon -icon_34x34dir=$datadir/icons/hicolor/34x34/hildon -icon_40x40dir=$datadir/icons/hicolor/40x40/hildon -icon_50x50dir=$datadir/icons/hicolor/50x50/hildon -icon_scalabledir=$datadir/icons/hicolor/scalable/hildon - -# Define as variables in Makefile -AC_SUBST(desktopentrydir) -AC_SUBST(pixmapdir) -AC_SUBST(icon_26x26dir) -AC_SUBST(icon_34x34dir) -AC_SUBST(icon_40x40dir) -AC_SUBST(icon_50x50dir) -AC_SUBST(icon_scalabledir) - -AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path]) -AC_OUTPUT( - Makefile \ - src\Makefile \ - data\Makefile +# Check for necessary packages +PKG_CHECK_MODULES(EOM, hildon-1 sqlite3) +# Add packages to flags and libs +CFLAGS="$EOM_CFLAGS $CFLAGS" +LIBS="$EOM_LIBS $LIBS" +# Generate the Makefile from Makefile.in +AC_OUTPUT( \ + Makefile \ + src/Makefile ) diff --git a/src/Makefile.am b/src/Makefile.am index afdd933..18afa27 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,6 @@ bin_PROGRAMS = eye-on-manga -eye-on-manga_LDADD = $(HILDON_LIBS) - -eye-on-manga_CFLAGS = $(HILDON_CFLAGS) - -eye-on-manga_SOURCES = \ +eye_on_manga_SOURCES = \ data.c data.h \ eom.c eom.h \ eom-edit-window.c eom-edit-window.h \ -- cgit v1.2.3-54-g00ecf