Changed source to build with external SWE-GLib

This commit is contained in:
Gergely Polonkai 2013-09-06 11:34:24 +02:00
parent ec9ad449b7
commit 8b661ed04d
5 changed files with 7 additions and 16 deletions

View File

@ -1,5 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = swe/src swe-glib/src src po docs/reference/swe-glib docs/reference/astrognome
SUBDIRS = src po docs/reference/astrognome
EXTRA_DIST = config.rpath m4/ChangeLog

View File

@ -41,21 +41,13 @@ AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
PKG_CHECK_MODULES([GLIB], [glib-2.0])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0])
PKG_CHECK_MODULES([GTK], [gtk+-3.0])
PKG_CHECK_MODULES([SWE_GLIB], [swe-glib])
AC_CONFIG_MACRO_DIR([m4])
LIBSWE_LIBS='$(top_builddir)/swe/src/libswe-1.75.la'
AC_SUBST(LIBSWE_LIBS)
LIBSWE_GLIB_LIBS='$(top_builddir)/swe-glib/src/libswe-glib-0.1.la'
AC_SUBST(LIBSWE_GLIB_LIBS)
AC_CONFIG_FILES([
Makefile
swe/src/Makefile
swe-glib/src/Makefile
src/Makefile
po/Makefile.in
docs/reference/astrognome/Makefile
docs/reference/swe-glib/Makefile
])
AC_OUTPUT

View File

@ -79,7 +79,7 @@ expand_content_files=
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=
GTKDOC_LIBS=$(LIBSWE_LIBS) $(LIBSWE_GLIB_LIBS)
GTKDOC_LIBS=
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make

View File

@ -1,6 +1,6 @@
bin_PROGRAMS = astrognome
astrognome_SOURCES = astrognome.c
astrognome_LDADD = $(LIBSWE_GLIB_LIBS) $(GTK_LIBS)
astrognome_LDADD = $(SWE_GLIB_LIBS) $(GTK_LIBS)
astrognome_LDFLAGS = -rdynamic
astrognome_CFLAGS = $(CFLAGS) $(GTK_CFLAGS) -Wall
astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) -Wall

View File

@ -1,9 +1,8 @@
#include <glib.h>
#include <gtk/gtk.h>
#include "../swe-glib/src/swe-glib.h"
#include <swe-glib.h>
#define EPHEDIR "/home/polesz/Projektek/c/astrognome/swe/data"
#define UI_FILE "/home/polesz/Projektek/c/astrognome/src/astrognome.ui"
GtkBuilder *builder;
@ -487,7 +486,7 @@ main(int argc, char *argv[])
GError *err = NULL;
GtkWidget *window_main;
gswe_init(EPHEDIR);
gswe_init();
gtk_init(&argc, &argv);
builder = gtk_builder_new();