[GRASS-SVN] r32596 - in grass/trunk/lib: . cairodriver raster

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 6 21:51:11 EDT 2008


Author: glynn
Date: 2008-08-06 21:51:11 -0400 (Wed, 06 Aug 2008)
New Revision: 32596

Modified:
   grass/trunk/lib/Makefile
   grass/trunk/lib/cairodriver/Makefile
   grass/trunk/lib/raster/Makefile
   grass/trunk/lib/raster/raster.c
Log:
Add cairo option to libraster


Modified: grass/trunk/lib/Makefile
===================================================================
--- grass/trunk/lib/Makefile	2008-08-07 01:29:16 UTC (rev 32595)
+++ grass/trunk/lib/Makefile	2008-08-07 01:51:11 UTC (rev 32596)
@@ -10,6 +10,7 @@
 	pngdriver \
 	psdriver \
 	htmldriver \
+	cairodriver \
 	raster \
 	bitmap \
 	btree \
@@ -48,10 +49,6 @@
     SUBDIRS += $(OPENGLBASED)
 endif
 
-ifneq ($(USE_CAIRO),)
-    SUBDIRS += cairodriver
-endif
-
 #compile if C++ compiler present:
 ifneq ($(strip $(CXX)),)
     SUBDIRS += iostream

Modified: grass/trunk/lib/cairodriver/Makefile
===================================================================
--- grass/trunk/lib/cairodriver/Makefile	2008-08-07 01:29:16 UTC (rev 32595)
+++ grass/trunk/lib/cairodriver/Makefile	2008-08-07 01:51:11 UTC (rev 32596)
@@ -11,28 +11,11 @@
 # added constant to /include/Make/Grass.make.in
 LIB_NAME = $(CAIRODRIVER_LIBNAME)
 
-LIB_OBJS = \
-	Driver.o	\
-	Client.o	\
-	Box.o		\
-	Graph.o		\
-	Erase.o		\
-	Set_window.o	\
-	Line_width.o	\
-	Draw_line.o	\
-	Draw_bitmap.o	\
-	Draw_point.o	\
-	Poly.o		\
-	Raster.o	\
-	Respond.o	\
-	Color.o		\
-	read.o		\
-	read_bmp.o	\
-	read_ppm.o	\
-	write.o		\
-	write_bmp.o	\
-	write_ppm.o
-
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
+ifneq ($(USE_CAIRO),)
 default: lib
+else
+default:
+endif
+

Modified: grass/trunk/lib/raster/Makefile
===================================================================
--- grass/trunk/lib/raster/Makefile	2008-08-07 01:29:16 UTC (rev 32595)
+++ grass/trunk/lib/raster/Makefile	2008-08-07 01:51:11 UTC (rev 32596)
@@ -1,5 +1,7 @@
 MODULE_TOPDIR = ../..
 
+include $(MODULE_TOPDIR)/include/Make/Platform.make
+
 PACKAGE ="libraster"
 DEFS=-DPACKAGE=\"$(PACKAGE)\"
 EXTRA_CFLAGS=$(GETHOSTNAME) $(FTINC) -I../driver $(PICFLAGS) $(DEFS)
@@ -7,6 +9,11 @@
 EXTRA_LIBS=$(DRIVERLIB) $(GISLIB) $(PNGDRIVERLIB) $(PSDRIVERLIB) $(HTMLDRIVERLIB)
 LIB_NAME = $(RASTER_LIBNAME)
 
+ifneq ($(USE_CAIRO),)
+EXTRA_LIBS +=  $(CAIRODRIVERLIB)
+EXTRA_CFLAGS += -DUSE_CAIRO
+endif
+
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 include $(MODULE_TOPDIR)/include/Make/Doxygen.make
 

Modified: grass/trunk/lib/raster/raster.c
===================================================================
--- grass/trunk/lib/raster/raster.c	2008-08-07 01:29:16 UTC (rev 32595)
+++ grass/trunk/lib/raster/raster.c	2008-08-07 01:51:11 UTC (rev 32596)
@@ -18,6 +18,9 @@
 extern const struct driver *PNG_Driver(void);
 extern const struct driver *PS_Driver(void);
 extern const struct driver *HTML_Driver(void);
+#ifdef USE_CAIRO
+extern const struct driver *Cairo_Driver(void);
+#endif
 
 static void init(void)
 {
@@ -42,6 +45,9 @@
     const struct driver *drv =
 	(p && G_strcasecmp(p, "PS") == 0) ? PS_Driver() :
 	(p && G_strcasecmp(p, "HTML") == 0) ? HTML_Driver() :
+#ifdef USE_CAIRO
+	(p && G_strcasecmp(p, "cairo") == 0) ? Cairo_Driver() :
+#endif
 	PNG_Driver();
 
     LIB_init(drv, 0, NULL);



More information about the grass-commit mailing list