| 1 |
# src/bin/pgbench/Makefile |
| 2 |
|
| 3 |
PGFILEDESC = "pgbench - a simple program for running benchmark tests" |
| 4 |
PGAPPICON = win32 |
| 5 |
|
| 6 |
subdir = src/bin/pgbench |
| 7 |
top_builddir = ../../.. |
| 8 |
include $(top_builddir)/src/Makefile.global |
| 9 |
|
| 10 |
OBJS = \ |
| 11 |
$(WIN32RES) \ |
| 12 |
exprparse.o \ |
| 13 |
exprscan.o \ |
| 14 |
pgbench.o |
| 15 |
|
| 16 |
override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS) |
| 17 |
LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport) |
| 18 |
|
| 19 |
ifneq ($(PORTNAME), win32) |
| 20 |
override CFLAGS += $(PTHREAD_CFLAGS) |
| 21 |
else |
| 22 |
override CPPFLAGS += -DFD_SETSIZE=1024 |
| 23 |
endif |
| 24 |
LIBS += $(PTHREAD_LIBS) |
| 25 |
|
| 26 |
|
| 27 |
all: pgbench |
| 28 |
|
| 29 |
pgbench: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils |
| 30 |
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) |
| 31 |
|
| 32 |
# See notes in src/backend/parser/Makefile about the following two rules |
| 33 |
exprparse.h: exprparse.c |
| 34 |
touch $@ |
| 35 |
|
| 36 |
exprparse.c: BISONFLAGS += -d |
| 37 |
|
| 38 |
# Force these dependencies to be known even without dependency info built: |
| 39 |
exprparse.o exprscan.o: exprparse.h |
| 40 |
|
| 41 |
install: all installdirs |
| 42 |
$(INSTALL_PROGRAM) pgbench$(X) '$(DESTDIR)$(bindir)/pgbench$(X)' |
| 43 |
|
| 44 |
installdirs: |
| 45 |
$(MKDIR_P) '$(DESTDIR)$(bindir)' |
| 46 |
|
| 47 |
uninstall: |
| 48 |
rm -f '$(DESTDIR)$(bindir)/pgbench$(X)' |
| 49 |
|
| 50 |
clean distclean: |
| 51 |
rm -f pgbench$(X) $(OBJS) |
| 52 |
rm -rf tmp_check |
| 53 |
rm -f exprparse.h exprparse.c exprscan.c |
| 54 |
|
| 55 |
check: |
| 56 |
$(prove_check) |
| 57 |
|
| 58 |
installcheck: |
| 59 |
$(prove_installcheck) |