1 #-------------------------------------------------------------------------
3 # Makefile for src/bin/pg_ctl
5 # Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
10 #-------------------------------------------------------------------------
12 PGFILEDESC
= "pg_ctl - starts/stops/restarts the PostgreSQL server"
13 subdir
= src
/bin
/pg_ctl
14 top_builddir
= ..
/..
/..
15 include $(top_builddir
)/src
/Makefile.global
17 override CPPFLAGS
:= -DDEF_PGPORT
=$(DEF_PGPORT
) -I
$(libpq_srcdir
) $(CPPFLAGS
)
19 OBJS
= pg_ctl.o
$(WIN32RES
)
21 all: submake-libpq submake-libpgport pg_ctl
23 pg_ctl
: $(OBJS
) $(libpq_builddir
)/libpq.a
24 $(CC
) $(CFLAGS
) $(OBJS
) $(libpq_pgport
) $(LDFLAGS
) $(LIBS
) -o
$@
$(X
)
26 install: all installdirs
27 $(INSTALL_PROGRAM
) pg_ctl
$(X
) '$(DESTDIR)$(bindir)/pg_ctl$(X)'
30 $(mkinstalldirs
) '$(DESTDIR)$(bindir)'
33 rm -f
'$(DESTDIR)$(bindir)/pg_ctl$(X)'
35 clean distclean maintainer-clean
:
36 rm -f pg_ctl
$(X
) $(OBJS
)
39 # ensure that changes in DEF_PGPORT propagate into object file
40 pg_ctl.o
: pg_ctl.c
$(top_builddir
)/src
/Makefile.global