postgis/raster/loader/Makefile.in
2012-10-22 17:20:00 +00:00

95 lines
2.3 KiB
Makefile

#############################################################################
# $Id$
#
# Copyright (c) 2011 Regents of the University of California
# <bkpark@ucdavis.edu>
# Copyright (c) 2009 Sandro Santilli <strk@keybit.net>
#
# This is free software; you can redistribute and/or modify it under
# the terms of the GNU General Public Licence. See the COPYING file.
#
#############################################################################
# Set CFLAGS after PGXS, otherwise it will get overwritten with the PGXS
# version which is not what we want.
CC=@CC@
top_builddir = @top_builddir@
SHELL = @SHELL@
INSTALL = $(SHELL) ../../install-sh
LIBTOOL = @LIBTOOL@
# Filenames with extension as determined by the OS
RASTER2PGSQL=raster2pgsql@EXESUFFIX@
# PostgreSQL executable directory
PGSQL_BINDIR=@PGSQL_BINDIR@
RT_CORE=../rt_core
LIBLWGEOM_LDFLAGS=../../liblwgeom/liblwgeom.la
LIBLWGEOM_CFLAGS=-I../../liblwgeom
LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@
LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@
LIBGDAL_DEPLIBS_LDFLAGS=@LIBGDAL_DEPLIBS_LDFLAGS@
PROJ_CFLAGS=@PROJ_CPPFLAGS@
GEOS_CFLAGS=@GEOS_CPPFLAGS@
GEOS_LDFLAGS=@GEOS_LDFLAGS@ -lgeos_c
RTCORE_CFLAGS=-I$(RT_CORE)
RTCORE_LDFLAGS=$(RT_CORE)/librtcore.a
# GetText includes and libraries
GETTEXT_CFLAGS = @GETTEXT_CFLAGS@
GETTEXT_LDFLAGS = @GETTEXT_LDFLAGS@ @LIBINTL@
# iconv flags
ICONV_LDFLAGS=@ICONV_LDFLAGS@
ICONV_CFLAGS=@ICONV_CFLAGS@
CFLAGS = \
@CFLAGS@ @PICFLAGS@ @WARNFLAGS@ \
$(RTCORE_CFLAGS) \
$(LIBLWGEOM_CFLAGS) \
$(PROJ_CFLAGS) \
$(LIBGDAL_CFLAGS) \
$(GEOS_CFLAGS) \
$(GETTEXT_CFLAGS) \
$(ICONV_CFLAGS)
LDFLAGS = \
@LDFLAGS@ \
$(LIBLWGEOM_LDFLAGS) \
$(LIBGDAL_LDFLAGS) \
$(LIBGDAL_DEPLIBS_LDFLAGS) \
$(GEOS_LDFLAGS) \
$(GETTEXT_LDFLAGS) \
$(ICONV_LDFLAGS) \
-lm
all: $(RASTER2PGSQL)
raster2pgsql.o: raster2pgsql.c
$(CC) $(CFLAGS) -c $<
$(RASTER2PGSQL): $(RT_CORE)/librtcore.a raster2pgsql.o
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
installdir:
@mkdir -p $(DESTDIR)$(PGSQL_BINDIR)
install: installdir
$(LIBTOOL) --mode=install $(INSTALL) $(RASTER2PGSQL) "$(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL)"
uninstall:
$(LIBTOOL) --mode=uninstall $(RM) "$(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL)"
$(RT_CORE)/librtcore.a:
$(MAKE) -C ../rt_core
clean:
rm -rf .libs
rm -f *.o $(RASTER2PGSQL)
distclean: clean
rm -f Makefile