Commit 6c00648f authored by Paul Ramsey's avatar Paul Ramsey
Browse files

Include GUI as conditional install target


git-svn-id: http://svn.osgeo.org/postgis/trunk@5057 b70326c6-7e19-0410-871a-916f4a2858ee
parent 8a654ad7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -56,6 +56,8 @@ ifeq ($(REGRESS),1)
	datadir=/share
endif

# We test this variable later to see if we're building the GUI
gtk_build = @GTK_BUILD@

# The real parts of the Makefile
all: $(SHP2PGSQL-CLI) $(PGSQL2SHP) @GTK_BUILD@
@@ -88,8 +90,13 @@ shp2pgsql-gui.o: shp2pgsql-gui.c
$(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o shp2pgsql-core.o shp2pgsql-gui.o $(LIBLWGEOM) $(GTK_WIN32_RES)
	$(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm 

install: all
installdir:
	@mkdir -p $(DESTDIR)$(bindir)

install: installdir 
ifdef gtk_build
	$(INSTALL) $(SHP2PGSQL-GUI) $(DESTDIR)$(bindir)
endif
	$(INSTALL) $(PGSQL2SHP) $(DESTDIR)$(bindir)
	$(INSTALL) $(SHP2PGSQL-CLI) $(DESTDIR)$(bindir)