mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
To fix the perpetually broken makefiles in the contrib tree, I have
written a generic framework of rules that the contrib makefiles can use instead of writing their own each time. You only need to set a few variables and off you go.
This commit is contained in:
@ -1,37 +1,15 @@
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.9 2001/02/20 19:20:27 petere Exp $
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/contrib/pgbench/Makefile,v 1.10 2001/09/06 10:49:30 petere Exp $
|
||||
|
||||
subdir = contrib/pgbench
|
||||
top_builddir = ../..
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
|
||||
|
||||
PROGRAM = pgbench
|
||||
OBJS = pgbench.o
|
||||
|
||||
all: pgbench
|
||||
PG_CPPFLAGS = -I$(libpq_srcdir)
|
||||
PG_LIBS = $(libpq)
|
||||
|
||||
pgbench: $(OBJS) $(libpq_builddir)/libpq.a
|
||||
$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
|
||||
DOCS = README.pgbench README.pgbench_jis
|
||||
|
||||
install: all installdirs
|
||||
$(INSTALL_PROGRAM) pgbench$(X) $(bindir)
|
||||
$(INSTALL_DATA) README.pgbench $(docdir)/contrib
|
||||
$(INSTALL_DATA) README.pgbench_jis $(docdir)/contrib
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(bindir) $(docdir)/contrib
|
||||
|
||||
uninstall:
|
||||
rm -f $(bindir)/pgbench$(X) $(docdir)/contrib/README.pgbench $(docdir)/contrib/README.pgbench_jis
|
||||
|
||||
clean distclean maintainer-clean:
|
||||
rm -f pgbench$(X) $(OBJS)
|
||||
|
||||
depend dep:
|
||||
$(CC) -MM -MG $(CFLAGS) *.c > depend
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
endif
|
||||
include $(top_srcdir)/contrib/contrib-global.mk
|
||||
|
Reference in New Issue
Block a user