diff --git a/configure/CONFIG b/configure/CONFIG index 71226ff5c..89a64cbde 100644 --- a/configure/CONFIG +++ b/configure/CONFIG @@ -13,16 +13,14 @@ ifdef T_A -include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A) endif +BUILDING_LIBCOM = DEFINED + CONFIG = $(RULES)/configure include $(CONFIG)/CONFIG # Override the Base definition: INSTALL_LOCATION = $(TOP) -# Set location of locally generated tools -EYACC = $(abspath $(INSTALL_HOST_BIN))/antelope$(HOSTEXE) -ELEX = $(abspath $(INSTALL_HOST_BIN))/e_flex$(HOSTEXE) -S$(INSTALL_INCLUDE)/flex.skel.static - # CONFIG_SITE files contain other build configuration settings include $(TOP)/configure/CONFIG_SITE -include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common diff --git a/configure/CONFIG_LIBCOM_MODULE b/configure/CONFIG_LIBCOM_MODULE new file mode 100644 index 000000000..175606cdb --- /dev/null +++ b/configure/CONFIG_LIBCOM_MODULE @@ -0,0 +1,25 @@ +#************************************************************************* +# Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne +# National Laboratory. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + +# Set EPICS_LIBCOM if necessary +ifndef EPICS_LIBCOM + EPICS_LIBCOM = $(if $(BUILDING_LIBCOM),$(INSTALL_LOCATION),$(EPICS_BASE)) + + # Paths to tools built here + EPICS_LIBCOM_HOST_BIN ?= $(EPICS_LIBCOM)/bin/$(EPICS_HOST_ARCH) +endif + +# Set location of locally generated tools +YACC = $(abspath $(EPICS_LIBCOM_HOST_BIN))/antelope$(HOSTEXE) +LEX = $(abspath $(EPICS_LIBCOM_HOST_BIN))/e_flex$(HOSTEXE) \ + -S$(EPICS_LIBCOM)/include/flex.skel.static + +# Default stack size for osiThread +OSITHREAD_USE_DEFAULT_STACK = NO +OSITHREAD_DEFAULT_STACK_FLAGS_YES = -DOSITHREAD_USE_DEFAULT_STACK + +BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK)) diff --git a/configure/Makefile b/configure/Makefile index 925430940..85a7b5843 100644 --- a/configure/Makefile +++ b/configure/Makefile @@ -1,8 +1,15 @@ -TOP=.. +#************************************************************************* +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* +TOP = .. include $(TOP)/configure/CONFIG TARGETS = $(CONFIG_TARGETS) CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS))) +CFG += CONFIG_LIBCOM_MODULE +CFG += CONFIG_LIBCOM_VERSION + include $(TOP)/configure/RULES diff --git a/src/Makefile b/src/Makefile index 512bbf55f..020df7d5e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,6 @@ TOP = .. include $(TOP)/configure/CONFIG -include $(TOP)/configure/CONFIG_LIBCOM_VERSION # Uncomment this to remove the (benign) valgrind helper stubs #USR_CFLAGS += -DNVALGRIND