|
3 | 3 | # Makefile-- |
4 | 4 | # Makefile for tutorial |
5 | 5 | # |
| 6 | +# By default, this builds against an existing PostgreSQL installation |
| 7 | +# (the one identified by whichever pg_config is first in your path). |
| 8 | +# Within a configured source tree, you can say "gmake NO_PGXS=1 all" |
| 9 | +# to build using the surrounding source tree. |
| 10 | +# |
6 | 11 | # IDENTIFICATION |
7 | | -# $PostgreSQL: pgsql/src/tutorial/Makefile,v 1.17 2003/11/29 19:52:14 pgsql Exp $ |
| 12 | +# $PostgreSQL: pgsql/src/tutorial/Makefile,v 1.18 2005/01/13 18:23:22 tgl Exp $ |
8 | 13 | # |
9 | 14 | #------------------------------------------------------------------------- |
10 | 15 |
|
11 | | -subdir = src/tutorial |
12 | | -top_builddir = ../.. |
13 | | -include$(top_builddir)/src/Makefile.global |
| 16 | +MODULES = complex funcs |
| 17 | +DATA_built = advanced.sql basics.sql complex.sql funcs.sql syscat.sql |
14 | 18 |
|
15 | | -overrideCFLAGS+=$(CFLAGS_SL) |
16 | 19 | SHLIB_LINK =$(BE_DLLLIBS) |
17 | 20 |
|
18 | | -# |
19 | | -# DLOBJS are the dynamically-loaded object files. The "funcs" queries |
20 | | -# include CREATE FUNCTIONs that load routines from these files. |
21 | | -# |
22 | | -DLOBJS= complex$(DLSUFFIX) funcs$(DLSUFFIX) |
23 | | - |
24 | | -QUERIES= advanced.sql basics.sql complex.sql funcs.sql syscat.sql |
25 | | - |
26 | | -all:$(DLOBJS)$(QUERIES) |
| 21 | +ifdefNO_PGXS |
| 22 | +subdir = src/tutorial |
| 23 | +top_builddir = ../.. |
| 24 | +include$(top_builddir)/src/Makefile.global |
| 25 | +include$(top_srcdir)/src/makefiles/pgxs.mk |
| 26 | +else |
| 27 | +PGXS =$(shell pg_config --pgxs) |
| 28 | +include$(PGXS) |
| 29 | +endif |
27 | 30 |
|
28 | 31 | %.sql:%.source |
29 | 32 | rm -f$@;\ |
30 | 33 | C=`pwd`;\ |
31 | 34 | sed -e"s:_OBJWD_:$$C:g"<$<>$@ |
32 | | - |
33 | | -cleandistcleanmaintainer-clean: |
34 | | -rm -f$(DLOBJS)$(QUERIES) |