mirror of https://github.com/citusdata/citus.git
62 lines
2.3 KiB
Makefile
62 lines
2.3 KiB
Makefile
# -*-makefile-*-
|
|
# @configure_input@
|
|
# Makefile.global.in - Makefile to be included by all submakes
|
|
#
|
|
# This file is converted by configure into an actual Makefile,
|
|
# replacing the @varname@ placeholders by actual values.
|
|
#
|
|
# This files is intended to contain infrastructure needed by several
|
|
# makefiles, particulary central handling of compilation flags and
|
|
# rules.
|
|
|
|
citus_abs_srcdir:=@abs_top_srcdir@/${citus_subdir}
|
|
citus_abs_top_srcdir:=@abs_top_srcdir@
|
|
PG_CONFIG:=@PG_CONFIG@
|
|
PGXS:=$(shell $(PG_CONFIG) --pgxs)
|
|
|
|
# Support for VPATH builds (i.e. builds from outside the source tree)
|
|
vpath_build=@vpath_build@
|
|
ifeq ($(vpath_build),yes)
|
|
VPATH:=$(citus_abs_srcdir)
|
|
USE_VPATH:=$(VPATH)
|
|
endif
|
|
|
|
# Citus is built using PostgreSQL's pgxs
|
|
USE_PGXS=1
|
|
include $(PGXS)
|
|
|
|
# Remake Makefile.global from Makefile.global.in if the latter
|
|
# changed. In order to trigger this rule, the including file must
|
|
# write `include $(citus_top_builddir)/Makefile.global', not some
|
|
# shortcut thereof. This makes it less likely to accidentally run
|
|
# with some outdated Makefile.global.
|
|
# Make internally restarts whenever included Makefiles are
|
|
# regenerated.
|
|
$(citus_top_builddir)/Makefile.global: $(citus_top_builddir)/Makefile.global.in @top_srcdir@/configure $(citus_top_builddir)/config.status
|
|
cd @abs_top_builddir@ && ./config.status Makefile.global
|
|
|
|
# Ensure configuration is generated by the most recent configure,
|
|
# useful for longer existing build directories.
|
|
$(citus_top_builddir)/config.status: @top_srcdir@/configure
|
|
cd @abs_top_builddir@ && ./config.status --recheck
|
|
|
|
# Regenerate configure if configure.in changed
|
|
@top_srcdir@/configure: $(citus_abs_srcdir)/configure.in
|
|
cd ${citus_abs_srcdir} && ./autogen.sh
|
|
|
|
# If specified via configure, replace the default compiler. Normally
|
|
# we'll build with the one postgres was built with. But it's useful to
|
|
# be able to use a different one, especially when building against
|
|
# distribution packages.
|
|
ifneq (@CC@,)
|
|
override CC=@CC@
|
|
endif
|
|
|
|
# Add options passed to configure or computed therein, to CFLAGS/CPPFLAGS/...
|
|
override CFLAGS += @CFLAGS@ @CITUS_CFLAGS@
|
|
override CPPFLAGS := @CPPFLAGS@ -I '${citus_abs_top_srcdir}/src/include' $(CPPFLAGS)
|
|
override LDFLAGS += @LDFLAGS@
|
|
|
|
# optional file with user defined, additional, rules
|
|
-include ${citus_abs_srcdir}/src/Makefile.custom
|