mirror of
https://github.com/postgres/postgres.git
synced 2026-05-27 11:01:40 -04:00
3febb477e6
Create new get_* functions to access compiled-in paths and adjust if relative installs are to be used. Clean up substitute_libpath_macro() code.
44 lines
1.2 KiB
Makefile
44 lines
1.2 KiB
Makefile
#-------------------------------------------------------------------------
|
|
#
|
|
# Makefile for src/bin/initdb
|
|
#
|
|
# Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
|
# Portions Copyright (c) 1994, Regents of the University of California
|
|
#
|
|
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.38 2004/05/17 14:35:33 momjian Exp $
|
|
#
|
|
#-------------------------------------------------------------------------
|
|
|
|
subdir = src/bin/initdb
|
|
top_builddir = ../../..
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
|
|
|
|
OBJS= initdb.o \
|
|
$(filter exec.o, $(LIBOBJS))
|
|
|
|
all: submake-libpq submake-libpgport initdb
|
|
|
|
initdb: $(OBJS) $(libpq_builddir)/libpq.a
|
|
$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
|
|
|
|
exec.c: % : $(top_srcdir)/src/port/%
|
|
rm -f $@ && $(LN_S) $< .
|
|
|
|
install: all installdirs
|
|
$(INSTALL_PROGRAM) initdb$(X) $(DESTDIR)$(bindir)/initdb$(X)
|
|
|
|
installdirs:
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(bindir)/initdb$(X)
|
|
|
|
clean distclean maintainer-clean:
|
|
rm -f initdb$(X) $(OBJS) exec.c
|
|
|
|
|
|
# ensure that changes in datadir propagate into object file
|
|
initdb.o: initdb.c $(top_builddir)/src/Makefile.global
|