2010-09-20 22:08:53 +02:00
|
|
|
# contrib/pgbench/Makefile
|
2010-05-12 13:33:10 +02:00
|
|
|
|
|
|
|
PGFILEDESC = "pgbench - a simple program for running benchmark tests"
|
2011-01-25 02:46:30 +01:00
|
|
|
PGAPPICON = win32
|
2000-01-15 13:38:09 +01:00
|
|
|
|
2001-09-06 12:49:30 +02:00
|
|
|
PROGRAM = pgbench
|
2015-03-02 20:21:41 +01:00
|
|
|
OBJS = pgbench.o exprparse.o $(WIN32RES)
|
|
|
|
|
|
|
|
EXTRA_CLEAN = exprparse.c exprscan.c
|
2000-01-15 13:38:09 +01:00
|
|
|
|
2001-09-06 12:49:30 +02:00
|
|
|
PG_CPPFLAGS = -I$(libpq_srcdir)
|
2009-08-03 20:30:55 +02:00
|
|
|
PG_LIBS = $(libpq_pgport) $(PTHREAD_LIBS)
|
2000-12-04 02:32:19 +01:00
|
|
|
|
2004-08-20 22:13:10 +02:00
|
|
|
ifdef USE_PGXS
|
2007-06-27 00:05:04 +02:00
|
|
|
PG_CONFIG = pg_config
|
|
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
2004-08-20 22:13:10 +02:00
|
|
|
include $(PGXS)
|
|
|
|
else
|
|
|
|
subdir = contrib/pgbench
|
|
|
|
top_builddir = ../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
2001-09-06 12:49:30 +02:00
|
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
2015-03-02 20:21:41 +01:00
|
|
|
|
|
|
|
distprep: exprparse.c exprscan.c
|
2004-08-20 22:13:10 +02:00
|
|
|
endif
|
2009-08-03 20:30:55 +02:00
|
|
|
|
|
|
|
ifneq ($(PORTNAME), win32)
|
|
|
|
override CFLAGS += $(PTHREAD_CFLAGS)
|
|
|
|
endif
|
2015-03-02 20:21:41 +01:00
|
|
|
|
|
|
|
# There is no correct way to write a rule that generates two files.
|
|
|
|
# Rules with two targets don't have that meaning, they are merely
|
|
|
|
# shorthand for two otherwise separate rules. To be safe for parallel
|
|
|
|
# make, we must chain the dependencies like this. The semicolon is
|
|
|
|
# important; otherwise, make will choose the built-in rule.
|
|
|
|
|
|
|
|
exprparse.h: exprparse.c ;
|
|
|
|
|
|
|
|
# exprscan is compiled as part of exprparse
|
|
|
|
exprparse.o: exprscan.c
|