#
# SparseGraph PostgreSQL extension
# Copyright (C) 2007 Antal Novak
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#

MODULE_version = 0.1

MODULE_big = sparsegraph
DATA_built = sparsegraph.sql
OBJS = sparsegraph.o sparsegraph_impl.o
DOCS = README.sparsegraph

SHLIB_LINK = -lstdc++
DEBUG_FLAGS =
#DEBUG_FLAGS = -g -O0
PG_CPPFLAGS = $(CFLAGS_SL) $(DEBUG_FLAGS)
PG_CFLAGS = $(DEBUG_FLAGS)

PGXS = $(shell pg_config --pgxs)
include $(PGXS)

MODULE_tag = $(MODULE_big)-$(MODULE_version)

dist:
	mkdir $(MODULE_tag)
	make clean
	rm -f $(MODULE_tag).tar.gz
	cp LICENSE Makefile $(DOCS) *.c *.h *.cpp *.sql.in $(MODULE_tag)/
	tar cfz $(MODULE_tag).tar.gz $(MODULE_tag)
	rm -rf $(MODULE_tag)
