Debian Codegraph @

src/bin/pg_ctl/Makefile

raw
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for src/bin/pg_ctl
4 #
5 # Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
7 #
8 # src/bin/pg_ctl/Makefile
9 #
10 #-------------------------------------------------------------------------
11
12 PGFILEDESC = "pg_ctl - starts/stops/restarts the PostgreSQL server"
13 PGAPPICON=win32
14
15 subdir = src/bin/pg_ctl
16 top_builddir = ../../..
17 include $(top_builddir)/src/Makefile.global
18
19 # On Windows, we need to link with libpq, just for use of pqexpbuffer;
20 # but let's not pull that in on platforms where we don't need it.
21 ifeq ($(PORTNAME), win32)
22 override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
23 LDFLAGS_INTERNAL += $(libpq_pgport)
24 SUBMAKE_LIBPQ := submake-libpq
25 endif
26
27 OBJS = \
28 $(WIN32RES) \
29 pg_ctl.o
30
31 all: pg_ctl
32
33 pg_ctl: $(OBJS) | submake-libpgport $(SUBMAKE_LIBPQ)
34 $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
35
36 install: all installdirs
37 $(INSTALL_PROGRAM) pg_ctl$(X) '$(DESTDIR)$(bindir)/pg_ctl$(X)'
38
39 installdirs:
40 $(MKDIR_P) '$(DESTDIR)$(bindir)'
41
42 uninstall:
43 rm -f '$(DESTDIR)$(bindir)/pg_ctl$(X)'
44
45 clean distclean:
46 rm -f pg_ctl$(X) $(OBJS)
47 rm -rf tmp_check
48
49 check:
50 $(prove_check)
51
52 installcheck:
53 $(prove_installcheck)