
# 
#     BLASTgres -- Biosequence data management in PostgreSQL
#     http://www.blastgres.org/
# 
#     Copyright (C) 2005, 2006  Ruey-Lung Hsiao,  D.S. Parker
#     (rlhsiao@cs.ucla.edu, stott@cs.ucla.edu)
# 
#     UCLA Center for Computational Biology
#     635 Charles Young Drive South, Suite 225
#     Los Angeles, CA 90095-7332  USA
# 
#     UCLA Computer Science Dept.
#     3532 Boelter Hall
#     Los Angeles, CA 90095-1596  USA
# 
#     This program is free software; you can redistribute it and/or
#     modify it under the terms of the GNU General Public License
#     as published by the Free Software Foundation; either version 2 of
#     the License, or (at your option) any later version.
# 
#     This program 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 General Public License for more details.
# 
#     You should have received a copy of the GNU General Public
#     License along with this program; if not, write to the
#     Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
#     Boston, MA  02110-1301  USA
# 


MODULE_big = BLASTgres
OBJS = util.o range.o range_gist.o range_aggregate.o _range_op.o _range_gist_ops1.o _range_gist_ops2.o loc.o loc_gist.o loc_aggregate.o coalesce.o partition.o network.o blastsvc.o blast.o genbanksvc.o genbank.o seq.o segparse.o
DATA_built = BLASTgres.sql
DOCS = README.BLASTgres
REGRESS = BLASTgres

EXTRA_CLEAN = util.o coalesce.o partition.o range_aggregate.o _range_op.o _range_gist_ops1.o _range_gist_ops2.o loc_aggregate.o network.o blastsvc.o blast.o genbanksvc.o genbank.o seq.o loc.o loc_gist.o range.o range_gist.o segparse.c segparse.h segscan.c y.tab.c y.tab.h

ifdef USE_PGXS
PGXS = $(shell pg_config --pgxs)
include $(PGXS)
else
subdir = contrib/BLASTgres
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

# segscan is compiled as part of segparse
segparse.o: segscan.c

segparse.c: segparse.h ;

segparse.h: segparse.y
ifdef YACC
	$(YACC) -d $(YFLAGS) -p seg_yy $<
	mv -f y.tab.c segparse.c
	mv -f y.tab.h segparse.h
else
	@$(missing) bison $< $@
endif

segscan.c: segscan.l
ifdef FLEX
	$(FLEX) $(FLEXFLAGS) -o'$@' $<
else
	@$(missing) flex $< $@
endif
