From: Bborie Park Date: Wed, 14 Mar 2012 20:26:07 +0000 (+0000) Subject: Updated to have C API tests use libtool X-Git-Tag: 2.0.0beta4~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81b987dfb7a3c487c18f23d55634cd054a3207fb;p=postgis Updated to have C API tests use libtool git-svn-id: http://svn.osgeo.org/postgis/trunk@9500 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/test/core/Makefile.in b/raster/test/core/Makefile.in index eadde58d7..3bae040c9 100644 --- a/raster/test/core/Makefile.in +++ b/raster/test/core/Makefile.in @@ -1,6 +1,8 @@ ############################################################################# # $Id$ # +# Copyright (c) 2012 Regents of the University of California +# # Copyright (c) 2009 Sandro Santilli # # This is free software; you can redistribute and/or modify it under @@ -8,6 +10,10 @@ # ############################################################################# +# Filenames with extension as determined by the OS +TESTAPI=testapi@EXESUFFIX@ +TESTWKB=testwkb@EXESUFFIX@ + RT_CORE=../../rt_core LIBLWGEOM_LDFLAGS=../../../liblwgeom/.libs/liblwgeom.a @@ -37,26 +43,30 @@ LDFLAGS = \ $(GEOS_LDFLAGS) \ -lm \ +all: $(TESTAPI) $(TESTWKB) -TESTS = testapi testwkb - -all: $(TESTS) - -check: $(RT_CORE)/librtcore.a $(TESTS) +check: $(RT_CORE)/librtcore.a $(TESTAPI) $(TESTWKB) ./testapi ./testwkb -testapi: $(RT_CORE)/librtcore.a testapi.c - $(CC) $(CFLAGS) -o testapi testapi.c $(LDFLAGS) +testapi.o: testapi.c + $(CC) $(CFLAGS) -c $< + +$(TESTAPI): testapi.o $(RT_CORE)/librtcore.a + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +testwkb.o: testwkb.c + $(CC) $(CFLAGS) -c $< -testwkb: $(RT_CORE)/librtcore.a testwkb.c - $(CC) $(CFLAGS) -o testwkb testwkb.c $(LDFLAGS) +$(TESTWKB): testwkb.o $(RT_CORE)/librtcore.a + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ $(RT_CORE)/librtcore.a: $(MAKE) -C ../../rt_core clean: - $(RM) $(TESTS) + rm -rf .libs + $(RM) *.o $(TESTAPI) $(TESTWKB) distclean: clean $(RM) Makefile