#*************************************************************************
# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne
#     National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
#     Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************

export TOP

ifneq ($(RELEASE_TOPS),)

define  RELEASE_FLAGS_template
  export $(1)
  $(1)_HOST_BIN = $$(strip $$($(1)))/bin/$(EPICS_HOST_ARCH)
  $(1)_HOST_LIB = $$(strip $$($(1)))/lib/$(EPICS_HOST_ARCH)
  $(1)_BIN = $$(wildcard $$(strip $$($(1)))/bin/$(T_A))
  $(1)_LIB = $$(wildcard $$(strip $$($(1)))/lib/$(T_A))
  SHRLIB_SEARCH_DIRS += $$($(1)_LIB)
  RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/compiler/$(CMPLR_CLASS)))
  RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/os/$(OS_CLASS)))
  RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include))
  RELEASE_DBD_DIRS += $$(wildcard $$(strip $$($(1)))/dbd)
  RELEASE_DB_DIRS += $$(wildcard $$(strip $$($(1)))/db)
  RELEASE_PERL_MODULE_DIRS += $$(wildcard $$(strip $$($(1)))/lib/perl)
endef
$(foreach top, $(RELEASE_TOPS), \
    $(eval $(call RELEASE_FLAGS_template,$(top))))

endif

