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