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
|
|
|
#
|
2012-01-02 00:01:58 +01:00
|
|
|
# Portions Copyright (c) 1996-2012, 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
|
|
|
#
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/bin/initdb/Makefile
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2004-10-05 21:30:25 +02:00
|
|
|
PGFILEDESC = "initdb - initialize a new database cluster"
|
2010-05-12 13:33:10 +02:00
|
|
|
PGAPPICON=win32
|
|
|
|
|
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
|
|
|
|
2011-09-09 23:59:11 +02:00
|
|
|
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) -I$(top_srcdir)/src/timezone $(CPPFLAGS)
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2011-09-13 16:58:06 +02:00
|
|
|
# use system timezone data?
|
|
|
|
ifneq (,$(with_system_tzdata))
|
|
|
|
override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
|
|
|
|
endif
|
|
|
|
|
2011-09-09 23:59:11 +02:00
|
|
|
OBJS= initdb.o findtimezone.o localtime.o encnames.o pqsignal.o $(WIN32RES)
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2010-11-12 21:15:16 +01:00
|
|
|
all: initdb
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2010-11-12 21:15:16 +01:00
|
|
|
initdb: $(OBJS) | submake-libpgport
|
2010-07-05 20:54:38 +02:00
|
|
|
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
2007-10-13 22:18:42 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
2011-09-09 23:59:11 +02:00
|
|
|
# Likewise, pull in localtime.c from src/timezones
|
|
|
|
|
|
|
|
localtime.c: % : $(top_srcdir)/src/timezone/%
|
|
|
|
rm -f $@ && $(LN_S) $< .
|
|
|
|
|
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:
|
2011-09-09 23:59:11 +02:00
|
|
|
rm -f initdb$(X) $(OBJS) encnames.c pqsignal.c localtime.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
|