*.a
+*.la
+.libs
+*.lo
aclocal.m4
autom4te.cache/
config.guess
dnl ================================================
POSTGIS_SRCDIR=`$PWDREGRESS`
LIBLWGEOM_CFLAGS="-I${POSTGIS_SRCDIR}/liblwgeom"
- LIBLWGEOM_LDFLAGS="${POSTGIS_SRCDIR}/liblwgeom/liblwgeom.a"
+ LIBLWGEOM_LDFLAGS="${POSTGIS_SRCDIR}/liblwgeom/.libs/liblwgeom.a"
AC_SUBST([POSTGIS_SRCDIR])
AC_SUBST([LIBLWGEOM_CFLAGS])
CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@
LDFLAGS = @GEOS_LDFLAGS@ -lgeos_c
NUMERICFLAGS = @NUMERICFLAGS@
+top_builddir = @top_builddir@
+LIBTOOL = @LIBTOOL@
+
YACC=@YACC@
LEX=@LEX@
libtgeom.h \
lwgeom_geos.h
-all: liblwgeom.a
+LT_OBJS = $(SA_OBJS:.o=.lo) $(NM_OBJS:.o=.lo)
+
+all: liblwgeom.la
# nothing to install or uninstall
install uninstall:
+liblwgeom.la: $(LT_OBJS) $(SA_HEADERS)
+ $(LIBTOOL) --mode=link $(CC) -o liblwgeom.la $(LT_OBJS)
+
liblwgeom.a: $(SA_OBJS) $(NM_OBJS) $(SA_HEADERS)
ar rs liblwgeom.a $(SA_OBJS) $(NM_OBJS)
rm -f $(SA_OBJS)
rm -f $(NM_OBJS)
rm -f liblwgeom.a
+ rm -f $(LT_OBJS)
+ rm -f liblwgeom.la
+ rm -rf .libs
# Nothing specific in distclean (will be done by clean)
distclean:
-check: liblwgeom.a
+check: liblwgeom.la
make -C cunit check
+# Command to build each of the .lo files
+$(LT_OBJS): %.lo: %.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
+
# Command to build each of the .o files
$(SA_OBJS): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
endif
# Build the main unit test executable
-cu_tester: ../liblwgeom.a $(OBJS)
- $(CC) -o $@ $(OBJS) ../liblwgeom.a -lm $(CUNIT_LDFLAGS) $(LDFLAGS)
+cu_tester: ../.libs/liblwgeom.a $(OBJS)
+ $(CC) -o $@ $(OBJS) ../.libs/liblwgeom.a -lm $(CUNIT_LDFLAGS) $(LDFLAGS)
# Command to build each of the .o files
$(OBJS): %.o: %.c
ICONV_CFLAGS=@ICONV_CFLAGS@
# liblwgeom
-LIBLWGEOM=../liblwgeom/liblwgeom.a
+LIBLWGEOM=../liblwgeom/.libs/liblwgeom.a
# GTK includes and libraries
GTK_CFLAGS = @GTK_CFLAGS@ @IGE_MAC_CFLAGS@
PGSQL_FE_LDFLAGS=@PGSQL_FE_LDFLAGS@
# liblwgeom
-LIBLWGEOM=../../liblwgeom/liblwgeom.a
+LIBLWGEOM=../../liblwgeom/.libs/liblwgeom.a
# iconv flags
ICONV_LDFLAGS=@ICONV_LDFLAGS@
# older version of PostGIS, rather than with the static liblwgeom.a
# supplied with newer versions of PostGIS
PG_CPPFLAGS+=@CPPFLAGS@ -I../liblwgeom
-SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/liblwgeom.a
+SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/.libs/liblwgeom.a
# Extra files to remove during 'make clean'
EXTRA_CLEAN=$(SQL_OBJS)
# Make all PostGIS objects depend upon liblwgeom, so that if an underlying
# change is made, a PostGIS rebuild is triggered.
-$(PG_OBJS): ../liblwgeom/liblwgeom.a
+$(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a
# Borrow the $libdir substitution from PGXS but customise by adding the version number
%.sql: %.sql.in