1996-07-09 08:22:35 +02:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2000-06-27 02:32:06 +02:00
|
|
|
# Makefile for src/bin/initdb
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
2009-01-01 18:24:05 +01:00
|
|
|
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
2001-02-18 19:34:02 +01:00
|
|
|
# Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
2009-08-27 00:24:44 +02:00
|
|
|
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.58 2009/08/26 22:24:43 petere Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2004-10-05 21:30:25 +02:00
|
|
|
PGFILEDESC = "initdb - initialize a new database cluster"
|
2000-06-27 02:32:06 +02:00
|
|
|
subdir = src/bin/initdb
|
|
|
|
top_builddir = ../../..
|
2000-08-31 18:12:35 +02:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2007-10-13 22:18:42 +02:00
|
|
|
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2007-10-13 22:18:42 +02:00
|
|
|
OBJS= initdb.o encnames.o pqsignal.o $(WIN32RES)
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2007-10-13 22:18:42 +02:00
|
|
|
all: submake-libpgport initdb
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2007-10-13 22:18:42 +02:00
|
|
|
initdb: $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
|
|
|
|
|
|
|
|
# We used to pull in all of libpq to get encnames and pqsignal, but that
|
|
|
|
# exposes us to risks of version skew if we link to a shared library.
|
|
|
|
# Do it the hard way, instead, so that we're statically linked.
|
|
|
|
|
|
|
|
encnames.c: % : $(top_srcdir)/src/backend/utils/mb/%
|
|
|
|
rm -f $@ && $(LN_S) $< .
|
|
|
|
|
2007-10-14 00:55:38 +02:00
|
|
|
pqsignal.c: % : $(top_srcdir)/src/interfaces/libpq/%
|
2007-10-13 22:18:42 +02:00
|
|
|
rm -f $@ && $(LN_S) $< .
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
install: all installdirs
|
2005-12-09 22:19:36 +01:00
|
|
|
$(INSTALL_PROGRAM) initdb$(X) '$(DESTDIR)$(bindir)/initdb$(X)'
|
1996-11-11 14:41:36 +01:00
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
installdirs:
|
2009-08-27 00:24:44 +02:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(bindir)'
|
1996-12-10 04:40:23 +01:00
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
uninstall:
|
2005-12-09 22:19:36 +01:00
|
|
|
rm -f '$(DESTDIR)$(bindir)/initdb$(X)'
|
2000-06-27 02:32:06 +02:00
|
|
|
|
2003-11-23 22:42:13 +01:00
|
|
|
clean distclean maintainer-clean:
|
2007-10-13 22:18:42 +02:00
|
|
|
rm -f initdb$(X) $(OBJS) encnames.c pqsignal.c
|
2003-12-23 22:56:21 +01:00
|
|
|
|
|
|
|
|
2004-05-11 23:57:15 +02:00
|
|
|
# ensure that changes in datadir propagate into object file
|
2003-12-23 22:56:21 +01:00
|
|
|
initdb.o: initdb.c $(top_builddir)/src/Makefile.global
|