Move objects to a subdirectory
authorAndy Spencer <andy753421@gmail.com>
Wed, 3 Feb 2010 11:53:00 +0000 (11:53 +0000)
committerAndy Spencer <andy753421@gmail.com>
Wed, 3 Feb 2010 11:53:00 +0000 (11:53 +0000)
- Organize automake files a bit while we're at it

configure.ac
src/.gitignore
src/Makefile.am
src/objects/Makefile.am [new file with mode: 0644]
src/objects/gis-object.c [moved from src/gis-object.c with 99% similarity]
src/objects/gis-object.h [moved from src/gis-object.h with 100% similarity]
src/objects/gis-tile.c [moved from src/gis-tile.c with 100% similarity]
src/objects/gis-tile.h [moved from src/gis-tile.h with 100% similarity]
src/plugins/Makefile.am

index 08cb84c..4d503a6 100644 (file)
@@ -12,14 +12,16 @@ PKG_PROG_PKG_CONFIG
 GTK_DOC_CHECK(1.9)
 
 # Check for required packages
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14 gobject-2.0 gthread-2.0)
-PKG_CHECK_MODULES(GTK,  gtk+-2.0 >= 2.16 gtkglext-1.0)
-PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.26)
+PKG_CHECK_MODULES(GLIB,  glib-2.0 >= 2.14 gobject-2.0 gthread-2.0)
+PKG_CHECK_MODULES(CAIRO, cairo)
+PKG_CHECK_MODULES(GTK,   gtk+-2.0 >= 2.16 gtkglext-1.0)
+PKG_CHECK_MODULES(SOUP,  libsoup-2.4 >= 2.26)
 
 # Output 
 AC_CONFIG_FILES([
        Makefile
        src/Makefile
+       src/objects/Makefile
        src/plugins/Makefile
        src/libgis.pc
        docs/Makefile
index 829ed84..bfc4cc8 100644 (file)
@@ -1,3 +1,4 @@
+*.a
 *.exe
 *.la
 *.lo
index 67923f3..26b6856 100644 (file)
@@ -1,12 +1,14 @@
-SUBDIRS = . plugins
+SUBDIRS = objects . plugins
 
-AM_CFLAGS   = -Wall --std=gnu99
+AM_CFLAGS   = -Wall --std=gnu99 -Iobjects
 AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
 AM_LDADD    = $(GLIB_LIBS) $(GTK_LIBS) $(SOUP_LIBS)
+AM_LDFLAGS  = --as-needed -no-undefined
 
-# Library
 BUILT_SOURCES = gis-marshal.c gis-marshal.h
-lib_LTLIBRARIES  = libgis.la
+
+
+# Headers
 gis_includedir = $(includedir)/gis
 gis_include_HEADERS = \
        gis.h         \
@@ -14,47 +16,47 @@ gis_include_HEADERS = \
        gis-prefs.h   \
        gis-opengl.h  \
        gis-plugin.h  \
-       gis-object.h  \
        gis-util.h    \
-       gis-tile.h    \
        gis-wms.h     \
        gis-data.h    \
        gpqueue.h     \
        roam.h
-libgis_la_SOURCES = \
+
+# Pkg-config
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgis.pc
+
+# Library
+lib_LTLIBRARIES = libgis.la
+
+libgis_la_SOURCES = gis.h \
        gis-viewer.c  gis-viewer.h  \
        gis-prefs.c   gis-prefs.h   \
        gis-opengl.c  gis-opengl.h  \
        gis-plugin.c  gis-plugin.h  \
        gis-marshal.c gis-marshal.h \
        gis-util.c    gis-util.h    \
-       gis-tile.c    gis-tile.h    \
        gis-wms.c     gis-wms.h     \
        gis-data.c    gis-data.h    \
-       gis-object.c  gis-object.h  \
        roam.c        roam.h        \
        gpqueue.c     gpqueue.h
 libgis_la_CPPFLAGS = $(AM_CPPFLAGS) \
-       -DPKGDATADIR="\"$(datadir)/gis\"" -DPLUGINSDIR="\"$(libdir)/gis\""
-libgis_la_LIBADD = $(AM_LDADD)
-libgis_la_LDFLAGS = -no-undefined
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libgis.pc
+       -DPKGDATADIR="\"$(datadir)/gis\"" \
+       -DPLUGINSDIR="\"$(libdir)/gis\""
+libgis_la_LIBADD  = $(AM_LDADD) \
+       objects/libgis-objects.la
 
 # Test programs
 bin_PROGRAMS = gis-demo tile-test
 
-gis_demo_SOURCES  = gis-demo.c gis.h
+gis_demo_SOURCES  = gis-demo.c
 gis_demo_LDADD    = $(AM_LDADD) libgis.la
-gis_demo_LDFLAGS  = -static
-
-tile_test_SOURCES = tile-test.c   \
-       gis-util.c   gis-util.h   \
-       gis-tile.c   gis-tile.h   \
-       gis-object.c gis-object.h \
-       gis-wms.c    gis-wms.h
-tile_test_LDADD   = $(AM_LDADD)
+gis_demo_LDFLAGS  = $(AM_LDFLAGS) -static
+
+tile_test_SOURCES = tile-test.c
+tile_test_LDADD   = $(AM_LDADD) libgis.la
+tile_test_LDFLAGS = $(AM_LDFLAGS) -static
+
 
 MAINTAINERCLEANFILES = Makefile.in
 
diff --git a/src/objects/Makefile.am b/src/objects/Makefile.am
new file mode 100644 (file)
index 0000000..eb7fe21
--- /dev/null
@@ -0,0 +1,15 @@
+AM_CFLAGS  = -Wall --std=gnu99 -fPIC -I../
+AM_CFLAGS += $(GLIB_CFLAGS) $(CAIRO_CFLAGS)
+
+gis_includedir = $(includedir)/gis
+gis_include_HEADERS = \
+       gis-object.h  \
+       gis-tile.h
+
+noinst_LTLIBRARIES = libgis-objects.la
+libgis_objects_la_SOURCES = \
+       gis-object.c gis-object.h \
+       gis-tile.c   gis-tile.h
+libgis_objects_la_LDFLAGS = -static
+
+MAINTAINERCLEANFILES = Makefile.in
similarity index 99%
rename from src/gis-object.c
rename to src/objects/gis-object.c
index 4eca077..fe51eb1 100644 (file)
@@ -19,7 +19,6 @@
 #include <GL/glu.h>
 
 #include "gis-object.h"
-#include "gis-util.h"
 
 /* GisPoint */
 GisPoint *gis_point_new()
similarity index 100%
rename from src/gis-object.h
rename to src/objects/gis-object.h
similarity index 100%
rename from src/gis-tile.c
rename to src/objects/gis-tile.c
similarity index 100%
rename from src/gis-tile.h
rename to src/objects/gis-tile.h
index 3c02231..a531f8f 100644 (file)
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-AM_CFLAGS   = -Wall --std=gnu99  -I../
+AM_CFLAGS   = -Wall --std=gnu99 -I../ -I../objects
 AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
 AM_LDFLAGS  = -module -avoid-version -no-undefined
 LIBS        = $(top_srcdir)/src/libgis.la