[gimp] app: Create libapp.a for convenient test case linking



commit 3e6f6088ee145b5874ea0402af6043f3dea7d236
Author: Martin Nordholts <martinn src gnome org>
Date:   Mon Sep 7 22:51:41 2009 +0200

    app: Create libapp.a for convenient test case linking
    
    Create libapp.a for convenient test case linking and link the existing
    tests against that.

 app/Makefile.am       |   13 +++++++++----
 app/tests/Makefile.am |    5 ++---
 2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 2df943f..12306fc 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -35,13 +35,17 @@ SUBDIRS = \
 	gui		\
 	tests
 
+# Put the GIMP core in a lib so we can conveniently link against that
+# in test cases
+noinst_LIBRARIES = libapp.a
+
 if ENABLE_GIMP_CONSOLE
 bin_PROGRAMS = gimp-2.7 gimp-console-2.7
 else
 bin_PROGRAMS = gimp-2.7
 endif
 
-app_sources = \
+libapp_sources = \
 	about.h		\
 	app.c		\
 	app.h		\
@@ -49,7 +53,6 @@ app_sources = \
 	batch.h		\
 	errors.c	\
 	errors.h	\
-	main.c		\
 	sanity.c	\
 	sanity.h	\
 	signals.c	\
@@ -66,7 +69,9 @@ app_sources = \
 	gimp-log.h	\
 	gimp-intl.h
 
-gimp_2_7_SOURCES = $(app_sources)
+libapp_a_SOURCES = $(libapp_sources)
+
+gimp_2_7_SOURCES = $(libapp_sources) main.c
 
 
 EXTRA_DIST = \
@@ -187,7 +192,7 @@ gimp_2_7_LDADD = \
 
 if ENABLE_GIMP_CONSOLE
 
-gimp_console_2_7_SOURCES = $(app_sources)
+gimp_console_2_7_SOURCES = $(libapp_sources) main.c
 
 gimp_console_2_7_CPPFLAGS = \
 	$(AM_CPPFLAGS)			\
diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am
index db2d400..55fdac9 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -28,6 +28,7 @@ AM_CPPFLAGS = \
 # comments about it in app/Makefile.am
 AM_LDFLAGS = \
 	-u $(SYMPREFIX)xcf_init				\
+	-u $(SYMPREFIX)base_init			\
 	-u $(SYMPREFIX)internal_procs_init		\
 	-u $(SYMPREFIX)gimp_plug_in_manager_restore	\
 	-u $(SYMPREFIX)gimp_pdb_compat_param_spec	\
@@ -56,9 +57,7 @@ LDADD = \
 	$(top_builddir)/app/display/libappdisplay.a		\
 	$(top_builddir)/app/paint-funcs/libapppaint-funcs.a	\
 	$(top_builddir)/app/base/libappbase.a			\
-	$(top_builddir)/app/gimp-log.o				\
-	$(top_builddir)/app/tests.o				\
-	$(top_builddir)/app/units.o				\
+	$(top_builddir)/app/libapp.a				\
 	$(libgimpconfig)					\
 	$(libgimpmath)						\
 	$(libgimpthumb)						\



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]