]> granicus.if.org Git - postgis/commitdiff
Cygwin fixes to the install target to provide .exe extensions.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 26 Jun 2002 18:25:11 +0000 (18:25 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 26 Jun 2002 18:25:11 +0000 (18:25 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@169 b70326c6-7e19-0410-871a-916f4a2858ee

loader/Makefile

index ed474a3c906515bb1b4ffa01ecebdeee3c4ae28c..340a7ea5dad6dd63268e4cebdc203bcb170c8913 100644 (file)
@@ -1,7 +1,14 @@
 #
 # PostGIS Loader Makefile
 #
+SHELL = /bin/sh
+
 subdir = contrib/postgis/loader
+EXE = 
+
+ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
+       EXE = .exe
+endif
 
 # Root of the pgsql source tree 
 ifeq (${PGSQL_SRC},) 
@@ -18,18 +25,18 @@ OBJS = shpopen.o dbfopen.o getopt.o
 
 override CPPFLAGS := -g -I$(srcdir) -I$(top_builddir)/src/interfaces/libpq $(CPPFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"'
 
-all: shp2pgsql pgsql2shp
+all: shp2pgsql$(EXE) pgsql2shp$(EXE)
 
-pgsql2shp: $(OBJS) pgsql2shp.o
+pgsql2shp$(EXE): $(OBJS) pgsql2shp.o
        $(CC) $(CFLAGS) $(OBJS) pgsql2shp.o $(libpq) $(LDFLAGS) $(LIBS) -o $@ 
 
-shp2pgsql: $(OBJS) shp2pgsql.o
+shp2pgsql$(EXE): $(OBJS) shp2pgsql.o
        $(CC) $(CFLAGS) $(OBJS) shp2pgsql.o $(libpq) $(LDFLAGS) $(LIBS) -o $@ 
 
 install: all
-       $(INSTALL_PROGRAM) pgsql2shp $(bindir)
-       $(INSTALL_PROGRAM) shp2pgsql $(bindir)
+       $(INSTALL_PROGRAM) pgsql2shp$(EXE) $(bindir)/pgsql2shp$(EXE)
+       $(INSTALL_PROGRAM) shp2pgsql$(EXE) $(bindir)/shp2pgsql$(EXE)
 
 clean:
-       @rm -f $(OBJS) shp2pgsql.o pgsql2shp.o shp2pgsql pgsql2shp
+       @rm -f $(OBJS) shp2pgsql.o pgsql2shp.o shp2pgsql$(EXE) pgsql2shp$(EXE)