#
#-----------------------------------------------------
-include Makefile.config
+all: liblwgeom loaderdumper
-all: liblwgeom loaderdumper lwpostgis.sql
+install: all liblwgeom-install loaderdumper-install
-install: all liblwgeom-install loaderdumper-install install-lwgeom-scripts
-
-uninstall: liblwgeom-uninstall loaderdumper-uninstall uninstall-lwgeom-scripts
+uninstall: liblwgeom-uninstall loaderdumper-uninstall
clean: liblwgeom-clean loaderdumper-clean
rm -f lwpostgis.sql
liblwgeom:
$(MAKE) -C lwgeom
+ cp lwgeom/lwpostgis.sql lwpostgis.sql
liblwgeom-clean:
$(MAKE) -C lwgeom clean
loaderdumper-uninstall:
$(MAKE) -C loader uninstall
-
-lwpostgis.sql: lwpostgis.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' > $@
-
-install-lwgeom-scripts:
- $(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(datadir)
-
-uninstall-lwgeom-scripts:
- rm -f $(DESTDIR)$(datadir)/lwpostgis.sql
-
SA_OBJS=misures.o box2d.o ptarray.o lwgeom_api.o lwgeom.o lwpoint.o lwline.o lwpoly.o lwmpoint.o lwmline.o lwmpoly.o lwcollection.o $(GEOS_WRAPPER) wktunparse.o lwgparse.o wktparse.tab.o lex.yy.o vsprintf.o
OBJS=$(SA_OBJS) liblwgeom.o lwgeom_pg.o lwgeom_debug.o lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_geos.o lwgeom_inout.o lwgeom_estimate.o lwgeom_functions_basic.o lwgeom_gist.o lwgeom_btree.o lwgeom_transform.o stringBuffer.o lwgeom_box.o lwgeom_box3d.o lwgeom_box2dfloat4.o lwgeom_chip.o lwgeom_svg.o lwgeom_gml.o
-OTHERS=y.output lex.yy.c wktparse.tab.c wktparse.tab.h
+OTHERS=y.output lex.yy.c wktparse.tab.c wktparse.tab.h lwpostgis.sql
#---------------------------------------------------------------
lwgeom_functions_basic.o: lwgeom_functions_basic.c profile.h
-all: $(GEOS_RULES) all-lib
+all: $(GEOS_RULES) all-lib lwpostgis.sql
# Shared library stuff
-install: all installdirs install-lwgeom-lib
+lwpostgis.sql: lwpostgis.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' > $@
+
+install: all installdirs install-lwgeom-lib install-lwgeom-scripts
+
+install-lwgeom-scripts:
+ $(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(datadir)
#- This has been copied from postgresql and adapted
install-lwgeom-lib: $(shlib)
installdirs:
$(mkinstalldirs) $(libdir)
-uninstall: uninstall-lib
+uninstall-lwgeom-scripts:
+ rm -f $(DESTDIR)$(datadir)/lwpostgis.sql
+
+uninstall: uninstall-lib uninstall-lwgeom-scripts
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)