1 #-------------------------------------------------------------------------
3 # Makefile for src/bin/scripts
5 # Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
8 # src/bin/scripts/Makefile
10 #-------------------------------------------------------------------------
12 PGFILEDESC
= "PostgreSQL utility"
15 subdir
= src
/bin
/scripts
16 top_builddir
= ..
/..
/..
17 include $(top_builddir
)/src
/Makefile.global
19 PROGRAMS
= createdb createuser dropdb dropuser clusterdb vacuumdb reindexdb pg_isready
21 override CPPFLAGS
:= -I
$(libpq_srcdir
) $(CPPFLAGS
)
22 LDFLAGS_INTERNAL
+= -L
$(top_builddir
)/src
/fe_utils
-lpgfeutils
$(libpq_pgport
)
26 createdb
: createdb.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
27 createuser
: createuser.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
28 dropdb
: dropdb.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
29 dropuser
: dropuser.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
30 clusterdb
: clusterdb.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
31 vacuumdb
: vacuumdb.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
32 reindexdb
: reindexdb.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
33 pg_isready
: pg_isready.o common.o
$(WIN32RES
) | submake-libpq submake-libpgport submake-libpgfeutils
35 install: all installdirs
36 $(INSTALL_PROGRAM
) createdb
$(X
) '$(DESTDIR)$(bindir)'/createdb
$(X
)
37 $(INSTALL_PROGRAM
) dropdb
$(X
) '$(DESTDIR)$(bindir)'/dropdb
$(X
)
38 $(INSTALL_PROGRAM
) createuser
$(X
) '$(DESTDIR)$(bindir)'/createuser
$(X
)
39 $(INSTALL_PROGRAM
) dropuser
$(X
) '$(DESTDIR)$(bindir)'/dropuser
$(X
)
40 $(INSTALL_PROGRAM
) clusterdb
$(X
) '$(DESTDIR)$(bindir)'/clusterdb
$(X
)
41 $(INSTALL_PROGRAM
) vacuumdb
$(X
) '$(DESTDIR)$(bindir)'/vacuumdb
$(X
)
42 $(INSTALL_PROGRAM
) reindexdb
$(X
) '$(DESTDIR)$(bindir)'/reindexdb
$(X
)
43 $(INSTALL_PROGRAM
) pg_isready
$(X
) '$(DESTDIR)$(bindir)'/pg_isready
$(X
)
46 $(MKDIR_P
) '$(DESTDIR)$(bindir)'
49 rm -f
$(addprefix '$(DESTDIR)$(bindir)'/, $(addsuffix $(X
), $(PROGRAMS
)))
51 clean distclean maintainer-clean
:
52 rm -f
$(addsuffix $(X
), $(PROGRAMS
)) $(addsuffix .o
, $(PROGRAMS
))
53 rm -f common.o
$(WIN32RES
)