-#---------------------------------------------------------------
-# Configuration Directives
-#---------------------------------------------------------------
-
-#
-# We recommend that you install the Proj4 and GEOS libraries
-# referenced below to get the most use out of your PostGIS
-# database.
-
+#-----------------------------------------------------
#
-# Set USE_PROJ to 1 for Proj4 reprojection support (recommended)
+# Configuration directives are in Makefile.config
#
-# Reprojection allows you to transform coordinate systems
-# in the database with the Transform() function.
-#
-# Download from: http://www.remotesensing.org/proj
-#
-USE_PROJ=1
-ifeq (${PROJ_DIR},)
- PROJ_DIR=/usr/local
-endif
-
-#
-# Set USE_GEOS to 1 for GEOS spatial predicate and operator
-# support (recommended).
-# GEOS installation directory defaults to /usr/local,
-# set GEOS_DIR environment variable to change it.
-#
-# GEOS allows you to do exact topological tests, such as
-# Intersects() and Touches(), as well as geometry operations,
-# such as Buffer(), GeomUnion() and Difference().
-#
-# Download from: http://geos.refractions.net
-#
-USE_GEOS=1
-ifeq (${GEOS_DIR},)
- GEOS_DIR=/usr/local
-endif
-
-#
-# Set USE_STATS to 1 for new GiST statistics collection support
-# Note that this support requires additional columns in
-# GEOMETRY_COLUMNS, so see the list archives for info or
-# install a fresh database using postgis.sql
-#
-USE_STATS=1
-
-#
-# Root of the PostgreSQL source tree
-# If you are not building from within postgresql 'contrib' directory
-# set the PGSQL_SRC either below or in the environment (an absolute path).
-#
-# PGSQL_SRC=/usr/src/postgresql
-
-#
-# Path to library (to be specified in CREATE FUNCTION queries)
-# Defaults to $libdir.
-# Set LPATH below or in the environment to change it.
-#
-# LPATH=/usr/src/postgis
-
-#---------------------------------------------------------------
-# END OF CONFIGURATION
-#---------------------------------------------------------------
-
-export USE_GEOS
-export GEOS_DIR
-export USE_STATS
-export USE_PROJ
-export PGSQL_SRC
+#-----------------------------------------------------
all: liblwgeom loaderdumper
--- /dev/null
+#---------------------------------------------------------------
+# Configuration Directives
+#---------------------------------------------------------------
+
+#
+# We recommend that you install the Proj4 and GEOS libraries
+# referenced below to get the most use out of your PostGIS
+# database.
+
+#
+# Set USE_PROJ to 1 for Proj4 reprojection support (recommended)
+#
+# Reprojection allows you to transform coordinate systems
+# in the database with the Transform() function.
+#
+# Download from: http://www.remotesensing.org/proj
+#
+USE_PROJ=1
+ifeq (${PROJ_DIR},)
+ PROJ_DIR=/usr/local
+endif
+
+#
+# Set USE_GEOS to 1 for GEOS spatial predicate and operator
+# support (recommended).
+# GEOS installation directory defaults to /usr/local,
+# set GEOS_DIR environment variable to change it.
+#
+# GEOS allows you to do exact topological tests, such as
+# Intersects() and Touches(), as well as geometry operations,
+# such as Buffer(), GeomUnion() and Difference().
+#
+# Download from: http://geos.refractions.net
+#
+USE_GEOS=1
+ifeq (${GEOS_DIR},)
+ GEOS_DIR=/usr/local
+endif
+
+#
+# Set USE_STATS to 1 for new GiST statistics collection support
+# Note that this support requires additional columns in
+# GEOMETRY_COLUMNS, so see the list archives for info or
+# install a fresh database using postgis.sql
+#
+USE_STATS=1
+
+#
+# Root of the PostgreSQL source tree
+# If you are not building from within postgresql 'contrib' directory
+# set the PGSQL_SRC either below or in the environment (an absolute path).
+#
+# PGSQL_SRC=/usr/src/postgresql
+
+#
+# Path to library (to be specified in CREATE FUNCTION queries)
+# Defaults to $libdir.
+# Set LPATH below or in the environment to change it.
+#
+# LPATH=/usr/src/postgis
+
+#---------------------------------------------------------------
+# END OF CONFIGURATION
+#---------------------------------------------------------------
+
+ifeq (${PGSQL_SRC},)
+ PGSQL_SRC = ${PWD}/../..
+endif
+
+subdir=contrib/postgis
+top_builddir = ${PGSQL_SRC}
+include $(top_builddir)/src/Makefile.global
+
+#---------------------------------------------------------------
+# Test the version string and set the USE_VERSION macro
+# appropriately.
+#
+ifneq ($(findstring 7.1,$(VERSION)),)
+ USE_VERSION=71
+else
+ ifneq ($(findstring 7.2,$(VERSION)),)
+ USE_VERSION=72
+ else
+ ifneq ($(findstring 7.3,$(VERSION)),)
+ USE_VERSION=73
+ else
+ ifneq ($(findstring 7.4,$(VERSION)),)
+ USE_VERSION=74
+ else
+ USE_VERSION=80
+ endif
+ endif
+ endif
+endif
+
+include ../Makefile.config
+
#---------------------------------------------------------------
# Configuration Directives
#
endif
#---------------------------------------------------------------
-top_builddir = ${PGSQL_SRC}
-include $(top_builddir)/src/Makefile.global
+#top_builddir = ${PGSQL_SRC}
+#include $(top_builddir)/src/Makefile.global
#---------------------------------------------------------------
# Default missing CXX variable to c++
postgis_geos_wrapper.o: postgis_geos_wrapper.cpp
-all: $(GEOS_RULES) all-lib postgis.sql postgis_undef.sql loaderdumper
-
-loaderdumper:
- $(MAKE) -C loader
+all: $(GEOS_RULES) all-lib postgis.sql postgis_undef.sql
# Shared library stuff
postgis.sql: postgis.sql.in
cpp -P -traditional-cpp -DUSE_VERSION=$(USE_VERSION) $< | sed -e 's:@MODULE_FILENAME@:$(MODULE_FILENAME):g;s:@POSTGIS_VERSION@:$(POSTGIS_VERSION):g;s:@POSTGIS_SCRIPTS_VERSION@:$(SCRIPTS_VERSION):g' > $@
-postgis_undef.sql: postgis.sql create_undef.pl
- perl create_undef.pl $< $(USE_VERSION) > $@
+postgis_undef.sql: postgis.sql ../create_undef.pl
+ perl ../create_undef.pl $< $(USE_VERSION) > $@
install: all installdirs install-postgis-lib
$(INSTALL_DATA) postgis.sql $(DESTDIR)$(datadir)
$(INSTALL_DATA) postgis_undef.sql $(DESTDIR)$(datadir)
$(INSTALL_DATA) spatial_ref_sys.sql $(DESTDIR)$(datadir)
$(INSTALL_DATA) README.postgis $(DESTDIR)$(datadir)
- $(MAKE) DESTDIR=$(DESTDIR) -C loader install
#- This has been copied from postgresql and adapted
install-postgis-lib: $(shlib)
../geos_version.sh $(GEOS_DIR) > postgis_geos_version.h
installdirs:
- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
+ $(mkinstalldirs) $(datadir)/contrib $(libdir)
uninstall: uninstall-lib
@rm -f $(docdir)/contrib/README.postgis $(datadir)/contrib/postgis.sql
clean distclean maintainer-clean: clean-lib
@rm -f $(OBJS) postgis.sql postgis_undef.sql postgis_geos_version.h
- $(MAKE) -C loader clean
- $(MAKE) -C doc clean
+include ../Makefile.config
+
#
# PostGIS Loader Makefile
#
EXE = .exe
endif
-# Root of the pgsql source tree
-ifeq (${PGSQL_SRC},)
- top_builddir = ../../..
- include $(top_builddir)/src/Makefile.global
- libdir := $(libdir)/contrib
-else
- top_builddir = ${PGSQL_SRC}
- include $(top_builddir)/src/Makefile.global
- libdir := ${PWD}
-endif
-
OBJS = shpopen.o dbfopen.o getopt.o
-#---------------------------------------------------------------
-# Test the version string and set the USE_VERSION macro
-# appropriately.
-#
-ifneq ($(findstring 7.1,$(VERSION)),)
- USE_VERSION=71
-else
- ifneq ($(findstring 7.2,$(VERSION)),)
- USE_VERSION=72
- else
- USE_VERSION=73
- endif
-endif
-
#---------------------------------------------------------------
override CFLAGS := -g -I.. -I$(srcdir) -I$(top_builddir)/src/interfaces/libpq $(CFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"' -DUSE_VERSION=$(USE_VERSION)
$(INSTALL_PROGRAM) shp2pgsql$(EXE) $(DESTDIR)$(bindir)/shp2pgsql$(EXE)
clean:
- @rm -f $(OBJS) shp2pgsql.o pgsql2shp.o shp2pgsql$(EXE) pgsql2shp$(EXE)
+ rm -f $(OBJS) shp2pgsql.o pgsql2shp.o shp2pgsql$(EXE) pgsql2shp$(EXE)
# Configuration Directives
+include ../Makefile.config
+
#---------------------------------------------------------------
subdir=contrib/postgis
-#---------------------------------------------------------------
-# Default the root of the PostgreSQL source tree
-# To use a non-standard location set the PGSQL_SRC environment
-# variable to the appropriate location.
-#
-ifeq (${PGSQL_SRC},)
- PGSQL_SRC = ../../..
-endif
-
#---------------------------------------------------------------
# Path to library (to be specified in CREATE FUNCTION queries)
# Defaults to $libdir.
LPATH := \$$libdir
endif
-#---------------------------------------------------------------
-top_builddir = ${PGSQL_SRC}
-include $(top_builddir)/src/Makefile.global
#---------------------------------------------------------------
# Default missing CXX variable to c++
#
CXX = c++
endif
-#---------------------------------------------------------------
-# Test the version string and set the USE_VERSION macro
-# appropriately.
-#
-ifneq ($(findstring 7.1,$(VERSION)),)
- USE_VERSION=71
-else
- ifneq ($(findstring 7.2,$(VERSION)),)
- USE_VERSION=72
- else
- ifneq ($(findstring 7.3,$(VERSION)),)
- USE_VERSION=73
- else
- ifneq ($(findstring 7.4,$(VERSION)),)
- USE_VERSION=74
- else
- USE_VERSION=80
- endif
- endif
- endif
-endif
-
#---------------------------------------------------------------
# Shared library parameters.
#