#
# CONFIG_EXTENSIONS DO NOT EDIT THIS FILE
#
include $(TOP)/config/RELEASE
-include $(TOP)/config/RELEASE.$(HOST_ARCH)

#
#  EPICS base definitions
#
include $(EPICS_BASE)/config/CONFIG_COMMON
-include $(TOP)/config/CONFIG_COMMON
 
#  EPICS version definitions
#
include $(EPICS_BASE)/config/CONFIG_BASE_VERSION
 
#  Site-specific build options
#
include $(EPICS_BASE)/config/CONFIG_SITE
-include $(TOP)/config/CONFIG_SITE

#  Host architecture specific definitions
#
include $(EPICS_BASE)/config/CONFIG_HOST_ARCH.$(HOST_ARCH)
-include $(EPICS_BASE)/config/CONFIG_SITE_HOST_ARCH.$(HOST_ARCH)
-include $(TOP)/config/CONFIG_SITE_HOST_ARCH.$(HOST_ARCH)
 
ifdef T_A

#  Build type specific definitions
#
-include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE)
-include $(EPICS_BASE)/config/CONFIG_SITE.$(BUILD_TYPE)
-include $(TOP)/config/CONFIG_SITE.$(BUILD_TYPE)

#  Architecture specific definitions
#

ifneq ($(HOST_ARCH),$(T_A))
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(T_A)
-include $(EPICS_BASE)/config/CONFIG_SITE.$(BUILD_TYPE).$(T_A)
-include $(TOP)/config/CONFIG_SITE.$(BUILD_TYPE).$(T_A)
endif
#
endif

#  Architecture specific definitions
#
ifndef BUILD_TYPE
BUILD_TYPE=Host
endif
-include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(HOST_ARCH)
-include $(EPICS_BASE)/config/CONFIG_SITE.$(BUILD_TYPE).$(HOST_ARCH)
-include $(TOP)/config/CONFIG_SITE.$(BUILD_TYPE).$(HOST_ARCH)

INSTALL_LOCATION = $(TOP)

#  User specific definitions
#
-include $(HOME)/EPICS_CONFIG
-include $(HOME)/EPICS_CONFIG.$(HOST_ARCH)
 
ifdef INSTALL_LOCATION_EXTENSIONS
INSTALL_LOCATION = $(INSTALL_LOCATION_EXTENSIONS)
endif

# include override definitions
include $(TOP)/config/CONFIG

ifdef EPICS_EXTENSIONS
EPICS_EXTENSIONS_LIB        = $(EPICS_EXTENSIONS)/lib/$(T_A)
EPICS_EXTENSIONS_BIN        = $(EPICS_EXTENSIONS)/bin/$(T_A)
EPICS_EXTENSIONS_HOST_LIB   = $(EPICS_EXTENSIONS)/lib/$(HOST_ARCH)
EPICS_EXTENSIONS_HOST_BIN   = $(EPICS_EXTENSIONS)/bin/$(HOST_ARCH)
EPICS_EXTENSIONS_INCLUDE    = $(EPICS_EXTENSIONS)/include
EPICS_EXTENSIONS_DOC        = $(EPICS_EXTENSIONS)/doc
EPICS_EXTENSIONS_HTML       = $(EPICS_EXTENSIONS)/html
EPICS_EXTENSIONS_MAN        = $(EPICS_EXTENSIONS)/man
EPICS_EXTENSIONS_TEMPLATES  = $(EPICS_EXTENSIONS)/templates
EPICS_EXTENSIONS_DBD        = $(EPICS_EXTENSIONS)/dbd
EPICS_EXTENSIONS_CONFIG     = $(EPICS_EXTENSIONS)/config
endif

# =====================================================================================
# extensions dependent on SDDS           --  adt, burt, casr, ca, knobconfig, rampload,
#                                            condition, scopeutil, SDDSepics, oagca,
#                                            beamUtil, StripTool, sddsIDL
# extensions dependent on oagca          --  SDDSepics
# extensions dependent on ts             --  ar, cau
# extensions dependent on libdev (dalib) --  knobconfig, math, rampload
# extensions dependent on libLca (ca)    --  math, wingz
# extensions dependent on ezca           --  ca, scopeutil, ezcaIDL, EzcaScan, SDDS,
#                                            SDDSepics
# extensions dependent on EzcaScan       --  ezcaIDL
# extensions dependent on caObject       --  cajava
# extensions dependent on caObject2      --  histTool
# extensions dependent on jca            --  jprobe
# extensions dependent on dbStaticJava   --  Jdct
#
#
# =====================================================================================

# =====================================================================================
#	Other Extensions Dependencies
#	-----------------------------
#	X11 is needed by the following extensions
#		alh, adt, ar, burt, dp, mdct, km, libUnix, medm, probe, probeII,
#		snaps, stripTool, caTCL, sga, histTool, viewImage
#		motifButton, medm_cebaf, adt, popup, namecapture, SDDS/SDDSaps
#	Motif is needed by the following extensions
#		alh, adt, ar, burt, dp, km, libUnix, medm, probe, probeII, snaps,
#		StripTool motifButton, medm_cebaf, popup, sga, histTool
#		namecapture, SDDS/SDDSaps, viewImage, jpt
#	openwin3 is needed by the following extensions
#		ar/ar
#	Wingz is needed by the following extensions
#		wingz
#	Mathematica is needed by the following extensions
#		math
#	Xrtgraph is needed by the following extensions
#		medm, medm_cebaf
#	Interviews (Unidraw) is needed by the following extensions
#		gdct313
#	Tk-tcl is needed by the following extensions
#		ar/arrtk, caTCL, dct, casr
#	Blt is needed by the following extensions
#		ar/arrtk, caTCL
#	Idl is needed by the following extensions
#		ezcaIDL, idl
#	Java is needed by the following extensions
#		jca,cajava,jprobe,Jdct,dbStaticJava
#
# =====================================================================================

# the order of the following directories is important
#     dependent tools are listed last 


DIRS =	$(wildcard installVersions alh ezca dbVerbose dct idl \
		motifButton msi namecapture popup probe sga  \
		viewImage ca SDDS oagca SDDSepics StripTool ts \
		adt ar burt camonitor condition \
		EzcaScan ezcaIDL casr cau dp km \
		scopeutil beamUtil medm \
		doubleLinkList dbStaticJava imageCatcher Jdct \
		jca jprobe \
		caTCL sddsIDL \
		caObject caObject2 histTool \
		iocappsTools ctlTools vdct)

ifneq ($(OS_CLASS),Linux)
DIRS+= $(wildcard dalib knobconfig rampload edif)
endif

ifeq ($(OS_CLASS),solaris)
DIRS+= $(wildcard gdct313)
endif

# extensions not built in extensions tree at APS
DIRS+= $(wildcard caNameServer caSnooper caex cajava \
	cdev gateway javaUtils jpt math mdct medm_cebaf gdct_ivtools nameserver)
DIRS+= $(wildcard caex javaUtils jpt probeII)

