MAJOR=1
MINOR=1
DEVNAME=mem
  #   /ˆl–ß=¿J*h¥8 pÜhJbÑ¿Î„dºÀÐ ?÷     /#
# Copyright (c) 2012-2022 Red Hat.
# Copyright (c) 2008 Aconex.  All Rights Reserved.
# Copyright (c) 2000,2003,2004 Silicon Graphics, Inc.  All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#

# Common gmake macros for building
#
# src/include/builddefs.  Generated from builddefs.in by configure.
#
ifndef _BUILDDEFS_INCLUDED_
_BUILDDEFS_INCLUDED_ = 1

ifndef _PCP_CONF_INCLUDED_
_PCP_CONF_INCLUDED_ = 1
include $(PCP_DIR)/etc/pcp.conf
endif

# General package information
PACKAGE_VERSION ?= 6.3.7
PACKAGE_MAJOR ?= 6
PACKAGE_MINOR ?= 3
PACKAGE_REVISION ?= 7
PACKAGE_BUILD ?= 8
PACKAGE_NAME ?= pcp
PACKAGE_CONFIGURE ?=  --with-infiniband=yes --with-python=no --with-dstat-symlink=yes --with-perfevent=yes --with-pmdagfs2=yes --with-pmdastatsd=yes --with-pmdabcc=yes --with-pmdabpf=yes --with-pmdabpftrace=yes --with-pmdajson=yes --with-pmdamongodb=yes --with-pmdamysql=yes --with-pmdanutcracker=no --with-pmdasnmp=yes --enable-multilib=yes
PACKAGE_DISTRIBUTION ?= redhat
SGI_CHROOT_BUILD ?= 0
SGI_ISSP_BUILD ?= 0

# see build/containers/GNUlocalrules and build/containers/*/GNUmakefile
CONTAINER_VERSION = $(PACKAGE_VERSION)-$(PACKAGE_BUILD)
CONTAINER_ARCH = $(shell uname -p)

BUILDRULES = $(PCP_INC_DIR)/buildrules

# LCFLAGS, LLDFLAGS, LLDLIBS, LDIRT may be specified in local makefiles.

# turn on all warnings by default
ifeq "yes" "yes"
WARN_OFF = -Wall
else
WARN_OFF =
endif

LIBPCP_ABIDIR ?= src
PCPLIB_LDFLAGS = -L$(PCP_LIB_DIR)
# backward compatibility
PCP_LIBS = $(PCPLIB_LDFLAGS)

# platform-specific CFLAGS, LDLIBS, and shared library extension
#
# Note:
# 	Need PCFLAGS setting here to match the CFLAGS settings in
# 	../../configure.ac (likewise for PLDFLAGS and LDFLAGS).
#
TARGET_OS = linux
CROSS_COMPILING = no
CASE_INSENSITIVE_FS = no
C99_CFLAGS = --std=c99
PCFLAGS = -fPIC -fno-strict-aliasing -D_GNU_SOURCE -Wshadow -Wno-array-bounds
PLDFLAGS = -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 
ifneq (, $(filter linux kfreebsd gnu, $(TARGET_OS)))
DSOSUFFIX = so
endif
ifeq "$(TARGET_OS)" "darwin"
DSOSUFFIX = dylib
CASE_INSENSITIVE_FS = yes
endif
ifeq "$(TARGET_OS)" "mingw"
DSOSUFFIX = dll
EXECSUFFIX = .exe
SHELLSUFFIX = .sh
PLDLIBS = -lwsock32 -liphlpapi
endif
ifeq "$(TARGET_OS)" "solaris"
PLDFLAGS += -fPIC
PLDLIBS = -lnsl -lsocket -lresolv -ldl -lposix4
DSOSUFFIX = so
endif
ifeq "$(TARGET_OS)" "aix"
DSOSUFFIX = so
# -qcpluscmt
#	allow C++-style // as comment preamble
# -brtl
#       use run-time linker
# -bnoipath
#       do not use path to DSOs from the build, use default search path
#       rules
# (and does not accept -Wall as a valid option)
PLDFLAGS += -brtl -bnoipath
WARN_OFF =
endif
ifeq "$(TARGET_OS)" "freebsd"
DSOSUFFIX = so
endif
ifeq "$(TARGET_OS)" "netbsd"
DSOSUFFIX = so
LDFLAGS += -Wl,-rpath=/usr/pkg/lib
endif
ifeq "$(TARGET_OS)" "openbsd"
DSOSUFFIX = so
endif

CFLAGS_DEV =
CFLAGS_ABI = 
CFLAGS_OPT = -O2 -g
CFLAGS_SANITIZER = 
CFLAGS += -I$(PCP_INC_DIR)/.. -I$(PCP_INC_DIR) \
	-DPCP_VERSION=\"$(PCP_VERSION)\" \
	$(PCFLAGS) $(LCFLAGS) $(WARN_OFF) $(CFLAGS_OPT) $(CFLAGS_SANITIZER) $(CFLAGS_DEV)

PIECFLAGS = -fPIE
PIELDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
INVISIBILITY = -fvisibility=hidden	# hide shared library symbols

AVAHICFLAGS = -D_REENTRANT 
LZMACFLAGS = 
LIBUVCFLAGS = 
OPENSSLCFLAGS = 
SASLCFLAGS = 
CMOCKACFLAGS = 

LDFLAGS += $(PLDFLAGS) $(WARN_OFF) $(PCP_LIBS) $(LLDFLAGS)

SRCFILES = GNUmakefile $(HFILES) $(CFILES) $(CXXFILES) $(MFILES) \
	$(LSRCFILES) $(LFILES) $(YFILES) $(PYFILES)

GPERFTOOLS