#------------------------------------------------------------------------- # # Makefile for pg_paxos # # Copyright (c) 2014-2015, Citus Data, Inc. # #------------------------------------------------------------------------- # grab name and version from META.json file EXTENSION = $(shell grep -m 1 '"name":' META.json | sed -e 's/[[:space:]]*"name":[[:space:]]*"\([^"]*\)",/\1/') EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/") # installation scripts DATA = $(wildcard updates/*--*.sql) # compilation configuration MODULE_big = $(EXTENSION) OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c)) PG_CPPFLAGS = -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Iinclude -I$(libpq_srcdir) SHLIB_LINK = $(libpq) EXTRA_CLEAN += $(addprefix src/,*.gcno *.gcda) # clean up after profiling runs # add coverage flags if requested ifeq ($(enable_coverage),yes) PG_CPPFLAGS += --coverage SHLIB_LINK += --coverage endif # be explicit about the default target all: # delegate to subdirectory makefiles as needed include sql/Makefile # detect whether to build with pgxs or build in-tree ifndef NO_PGXS PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) else SHLIB_PREREQS = submake-libpq subdir = contrib/pg_paxos top_builddir = ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif