2007-02-09 12:24:33 -05:00
|
|
|
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.19 2007/02/09 17:24:33 petere Exp $
|
2000-12-11 15:39:15 -05:00
|
|
|
|
2001-09-06 06:49:30 -04:00
|
|
|
MODULE_big = cube
|
2003-09-13 21:52:25 -04:00
|
|
|
OBJS= cube.o cubeparse.o
|
2000-12-11 15:39:15 -05:00
|
|
|
|
2001-09-06 06:49:30 -04:00
|
|
|
DATA_built = cube.sql
|
2006-02-27 07:54:39 -05:00
|
|
|
DATA = uninstall_cube.sql
|
2001-09-06 06:49:30 -04:00
|
|
|
DOCS = README.cube
|
|
|
|
|
REGRESS = cube
|
2000-12-11 15:39:15 -05:00
|
|
|
|
2006-04-03 14:47:41 -04:00
|
|
|
EXTRA_CLEAN = y.tab.c y.tab.h
|
2004-08-20 16:13:10 -04:00
|
|
|
|
2005-07-24 19:30:10 -04:00
|
|
|
SHLIB_LINK += $(filter -lm, $(LIBS))
|
2004-08-20 16:13:10 -04:00
|
|
|
|
|
|
|
|
ifdef USE_PGXS
|
2005-09-27 13:13:14 -04:00
|
|
|
PGXS := $(shell pg_config --pgxs)
|
2004-08-20 16:13:10 -04:00
|
|
|
include $(PGXS)
|
|
|
|
|
else
|
|
|
|
|
subdir = contrib/cube
|
|
|
|
|
top_builddir = ../..
|
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
|
|
|
|
endif
|
|
|
|
|
|
2000-12-11 15:39:15 -05:00
|
|
|
|
2002-11-01 17:52:34 -05:00
|
|
|
# cubescan is compiled as part of cubeparse
|
2006-04-03 14:47:41 -04:00
|
|
|
cubeparse.o: $(srcdir)/cubescan.c
|
2002-11-01 17:52:34 -05:00
|
|
|
|
2006-03-06 20:03:12 -05:00
|
|
|
# See notes in src/backend/parser/Makefile about the following two rules
|
|
|
|
|
|
2006-04-03 14:47:41 -04:00
|
|
|
$(srcdir)/cubeparse.c: $(srcdir)/cubeparse.h ;
|
2001-11-16 11:32:33 -05:00
|
|
|
|
2006-04-03 14:47:41 -04:00
|
|
|
$(srcdir)/cubeparse.h: cubeparse.y
|
2001-02-10 17:31:42 -05:00
|
|
|
ifdef YACC
|
2006-03-06 20:03:12 -05:00
|
|
|
$(YACC) -d $(YFLAGS) $<
|
2006-04-03 14:47:41 -04:00
|
|
|
mv -f y.tab.c $(srcdir)/cubeparse.c
|
|
|
|
|
mv -f y.tab.h $(srcdir)/cubeparse.h
|
2001-02-10 17:31:42 -05:00
|
|
|
else
|
|
|
|
|
@$(missing) bison $< $@
|
|
|
|
|
endif
|
2000-12-11 15:39:15 -05:00
|
|
|
|
2006-04-03 14:47:41 -04:00
|
|
|
$(srcdir)/cubescan.c: cubescan.l
|
2000-12-11 15:39:15 -05:00
|
|
|
ifdef FLEX
|
2003-09-13 21:52:25 -04:00
|
|
|
$(FLEX) $(FLEXFLAGS) -o'$@' $<
|
2000-12-11 15:39:15 -05:00
|
|
|
else
|
|
|
|
|
@$(missing) flex $< $@
|
|
|
|
|
endif
|
2006-04-03 14:47:41 -04:00
|
|
|
|
|
|
|
|
distprep: $(srcdir)/cubeparse.c $(srcdir)/cubeparse.h $(srcdir)/cubescan.c
|
|
|
|
|
|
|
|
|
|
maintainer-clean:
|
|
|
|
|
rm -f $(srcdir)/cubeparse.c $(srcdir)/cubeparse.h $(srcdir)/cubescan.c
|