epics-base: simplified build recipe
by using variables passing to `make`
and also fixed a few build failures on linux in the process
@@ -7,22 +7,16 @@ install -d $PREFIX/epics
EPICS_HOST_ARCH=$(perl src/tools/EpicsHostArch.pl)
export EPICS_HOST_ARCH
-# EPICS assumes gcc suit has /usr/bin prefix.
-# If non-system gcc is used, e.g. rh-devtoolset,
-# find out its location /opt/rh/devtoolset-2/root/usr/bin.
-# GNG_DIR has "bin" stripped.
-GNU_DIR=$(dirname $(dirname $(which gcc)))
-if [ "$GNU_DIR" != "/usr" ]; then
- echo "GNU_DIR="$GNU_DIR >> configure/CONFIG_COMMON
-fi
-
-make -j$(getconf _NPROCESSORS_ONLN)
+make \
+ CMPLR_PREFIX="${HOST}-" \
+ G++="${CXX}" \
+ GNU_DIR="${BUILD_PREFIX}" \
+ -j ${CPU_COUNT}
EPICS_BASE=$PREFIX/epics
# Copy libraries into $PREFIX/lib
-cp -av $PREFIX/epics/lib/$EPICS_HOST_ARCH/lib*so* $PREFIX/lib 2>/dev/null || : # linux
-cp -av $PREFIX/epics/lib/$EPICS_HOST_ARCH/lib*dylib* $PREFIX/lib 2>/dev/null || : # osx
+cp -av $PREFIX/epics/lib/$EPICS_HOST_ARCH/lib*${SHLIB_EXT}* $PREFIX/lib
# deal with env export
mkdir -p $PREFIX/etc/conda/activate.d
