Index: trunk/zoo-project/zoo-services/cgal/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/cgal/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/cgal/Makefile	(revision 522)
@@ -1,5 +1,5 @@
 ZRPATH=../..
 include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
-CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
+CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} ${CGAL_CFLAGS} -fPIC -DLINUX_FREE_ISSUE #-DDEBUG
 CC=gcc
 
@@ -7,9 +7,12 @@
 	g++ ${CFLAGS} -c ./delaunay.c
 	g++ ${CFLAGS} -c ./voronoi.c
-	g++ ${CFLAGS} -shared -fpic -o cgi-env/cgal_service.zo ./delaunay.o ./voronoi.o ./cgal_service.o ${GDAL_LIBS} ${MACOS_LD_FLAGS} -lCGAL -lgmp
+	g++ ${CFLAGS} -shared -o cgi-env/cgal_service.zo ./delaunay.o ./voronoi.o ./cgal_service.o ${GDAL_LIBS} ${MACOS_LD_FLAGS} ${CGAL_LDFLAGS} -lCGAL -lgmp
 
 cgal_service.o: cgal_service.c cgal_service.h
 	g++ ${CFLAGS} -c ./cgal_service.c
 
+install:
+	install -d ${CGI_DIR}/cgal
+	install cgi-env/* ${CGI_DIR}/cgal/
 
 clean:
Index: trunk/zoo-project/zoo-services/gdal/contour/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/gdal/contour/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/gdal/contour/Makefile	(revision 522)
@@ -6,4 +6,7 @@
 cgi-env/contour_service.zo: service.c
 	g++ ${CFLAGS} -shared -fpic -o cgi-env/contour_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
+install:
+	install -d ${CGI_DIR}/gdal/contour
+	install cgi-env/* ${CGI_DIR}/gdal/contour
 
 clean:
Index: trunk/zoo-project/zoo-services/gdal/dem/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/gdal/dem/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/gdal/dem/Makefile	(revision 522)
@@ -7,4 +7,9 @@
 	g++ ${CFLAGS} -shared -fpic -o cgi-env/dem_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
+install:
+	install -d ${CGI_DIR}/gdal/dem
+	install cgi-env/* ${CGI_DIR}/gdal/dem
+
+
 clean:
 	rm -f cgi-env/*.zo
Index: trunk/zoo-project/zoo-services/gdal/grid/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/gdal/grid/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/gdal/grid/Makefile	(revision 522)
@@ -7,4 +7,9 @@
 	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/gdal_grid_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
+install:
+	install -d ${CGI_DIR}/gdal/grid
+	install cgi-env/* ${CGI_DIR}/gdal/grid
+
+
 clean:
 	rm -f cgi-env/*.zo
Index: trunk/zoo-project/zoo-services/gdal/profile/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/gdal/profile/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/gdal/profile/Makefile	(revision 522)
@@ -7,4 +7,9 @@
 	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/profile_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
+install:
+	install -d ${CGI_DIR}/gdal/profile
+	install cgi-env/* ${CGI_DIR}/gdal/profile
+
+
 clean:
 	rm -f cgi-env/*.zo
Index: trunk/zoo-project/zoo-services/gdal/translate/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/gdal/translate/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/gdal/translate/Makefile	(revision 522)
@@ -7,4 +7,10 @@
 	g++ ${CFLAGS} -shared -fpic -o cgi-env/translate_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
+install:
+	install -d ${CGI_DIR}/gdal/translate
+	install cgi-env/* ${CGI_DIR}/gdal/translate
+
+
+
 clean:
 	rm -f cgi-env/*.zo
Index: trunk/zoo-project/zoo-services/gdal/warp/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/gdal/warp/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/gdal/warp/Makefile	(revision 522)
@@ -7,4 +7,10 @@
 	g++ ${CFLAGS} -shared -fpic -o cgi-env/warp_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
+
+install:
+	install -d ${CGI_DIR}/gdal/warp
+	install cgi-env/* ${CGI_DIR}/gdal/warp
+
+
 clean:
 	rm -f cgi-env/warp_service.*
Index: trunk/zoo-project/zoo-services/ogr/base-vect-ops/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/ogr/base-vect-ops/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/ogr/base-vect-ops/Makefile	(revision 522)
@@ -1,5 +1,5 @@
 ZRPATH=../../..
 include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
-CFLAGS=${ZOO_CFLAGS} ${JSCFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} `geos-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
+CFLAGS=${ZOO_CFLAGS} ${JSCFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${GEOS_CFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
 
 ifneq ($(MS_FILE),)
@@ -10,6 +10,9 @@
 
 cgi-env/ogr_service.zo: service.c
-	g++ ${CFLAGS} -shared -fpic -o cgi-env/ogr_service.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} ${JSLDFLAGS} ${GDAL_LIBS} ${XML2LDFLAGS} ${MACOS_LD_FLAGS} ${ZOO_LDFLAGS} ${MACOS_LD_NET_FLAGS} `geos-config --libs` ${MS_FILES} -lfcgi  -lpthread
+	g++ ${CFLAGS} -shared -fpic -o cgi-env/ogr_service.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} ${JSLDFLAGS} ${GDAL_LIBS} ${XML2LDFLAGS} ${MACOS_LD_FLAGS} ${ZOO_LDFLAGS} ${MACOS_LD_NET_FLAGS} ${GEOS_LDFLAGS}  ${MS_FILES} -lfcgi  -lpthread
 
+install:
+	install -d ${CGI_DIR}/ogr/base-vect-ops
+	install cgi-env/* ${CGI_DIR}/ogr/base-vect-ops
 
 clean:
Index: trunk/zoo-project/zoo-services/ogr/ogr2ogr/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/ogr/ogr2ogr/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/ogr/ogr2ogr/Makefile	(revision 522)
@@ -1,25 +1,13 @@
-GDAL_SRC=./gdal_src/
-
-include $(GDAL_SRC)GDALmake.opt
-
-CPPFLAGS        :=      $(GDAL_INCLUDE) -I$(GDAL_ROOT)/frmts $(CPPFLAGS)
-DEP_LIBS        =       $(EXE_DEP_LIBS) $(XTRAOBJ)
-BIN_LIST = cgi-env/ogr2ogr_service.zo
-
-default:        $(BIN_LIST)
-
-all: default
-
-lib-depend:
-	(cd $(GDAL_SRC)/gcore ; $(MAKE) )
-	(cd $(GDAL_SRC)/port ; $(MAKE) )
-
-CFLAGS=-DZOO_SERVICE -I../../../zoo-kernel/
-
-#cgi-env/ogr2ogr_service.zo: service.c
-#	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/ogr2ogr_service.zo ./service.c -lgdal
+ZRPATH=../../..
+include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
+CFLAGS=-DZOO_SERVICE ${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
+CC=gcc
 
 cgi-env/ogr2ogr_service.zo: service.c $(DEP_LIBS)
-	g++ $(CFLAGS) $(CPPFLAGS) -shared -fpic $< `gdal-config --libs` -o $@
+	g++ $(CFLAGS) $(CPPFLAGS) -shared -fpic $<  -o $@
+
+install:
+	install -d ${CGI_DIR}/ogr/ogr2ogr
+	install cgi-env/* ${CGI_DIR}/ogr/ogr2ogr
 
 clean:
Index: trunk/zoo-project/zoo-services/utils/status/Makefile
===================================================================
--- trunk/zoo-project/zoo-services/utils/status/Makefile	(revision 519)
+++ trunk/zoo-project/zoo-services/utils/status/Makefile	(revision 522)
@@ -3,7 +3,22 @@
 CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
 
+
+
+ifneq ($(MS_FILE),)
+    MS_FILES=${ZRPATH}/zoo-kernel/${MS_FILE} -lmapserver
+else
+    MS_FILES=
+endif
+
+
+
+
+
 cgi-env/wps_status.zo: service.c
-	g++ ${CFLAGS} -shared -fpic -o cgi-env/wps_status.zo ./service.c ../../../zoo-kernel/service_internal.o ${ZRPATH}/zoo-kernel/${MS_FILE} ${MS_LDFLAGS} ${JS_LDFLAGS} ${JSLDFLAGS} ${GDAL_LIBS} ${XML2LDFLAGS} ${MACOS_LD_FLAGS} ${ZOO_LDFLAGS} ${MACOS_LD_NET_FLAGS} `xslt-config --libs` -lfcgi
+	g++ ${CFLAGS} -shared -fpic -o cgi-env/wps_status.zo ./service.c ../../../zoo-kernel/service_internal.o ${MS_FILE} ${MS_LDFLAGS} ${JS_LDFLAGS} ${JSLDFLAGS} ${GDAL_LIBS} ${XML2LDFLAGS} ${MACOS_LD_FLAGS} ${ZOO_LDFLAGS} ${MACOS_LD_NET_FLAGS} ${XSLT_LDFLAGS} -lfcgi
 
+install:
+	install -d ${CGI_DIR}
+	install cgi-env/* ${CGI_DIR}/
 clean:
 	rm -f cgi-env/wps_status.zo
