# # Configure the sections below that apply to your MX target platform # and EPICS architecture. # # The MX architectures currently supported by the 'epics' module include: # # cygwin, linux, macosx, macosx-clang, solaris, solaris-gcc, win32 # # WARNING: Do not start any lines in this file with a or ^-I character # since this may make GNU Make think that line is part of a recipe. #-------------------------------------------------------------------------- # Cygwin configuration ifeq ($(MX_ARCH),cygwin) #EPICS_ARCH = cygwin-x86 EPICS_ARCH = cygwin-x86_64 EPICS_BASE = /opt/epics/base EPICS_INCLUDES = -Wno-shadow -I$(EPICS_BASE)/include \ -I$(EPICS_BASE)/include/os/cygwin32 EPICS_LIB_DIRS = -L$(EPICS_BASE)/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom MX_EPICS_CFLAGS = $(CFLAGS) -Wno-strict-prototypes endif #-------------------------------------------------------------------------- # Linux configuration ifeq ($(MX_ARCH),linux) use_linux = TRUE else ifeq ($(MX_ARCH),linux-clang) use_linux = TRUE endif ifeq ($(use_linux),TRUE) # Select between # 1. Install from source # 2. Install from offical Debian packages (bookworm (12) and above) # 2. Install NSLS-II EPICS Debian packages # 3. Install IIT EPICS Debian packages #EPICS_DIST = source #EPICS_DIST = debian #EPICS_DIST = nsls #EPICS_DIST = iit ifndef EPICS_DIST # # Look for EPICS debian packages. # _dpkg_epics_debian := \ $(shell dpkg --list | grep libca4 | grep EPICS ) _dpkg_epics_iit := \ $(shell dpkg --list | grep libepics | head -1 | awk '{print $$3}' | grep squeeze0 ) _dpkg_epics_ver := \ $(shell dpkg --list | grep libepics | head -1 | awk '{print $$3}') #$(info _dpkg_epics_debian is [${_dpkg_epics_debian}]) #$(info _dpkg_epics_iit is [${_dpkg_epics_iit}]) #$(info _dpkg_epics_ver is [${_dpkg_epics_ver}]) ifdef _dpkg_epics_debian EPICS_DIST = debian else ifdef _dpkg_epics_iit EPICS_DIST = iit else ifdef _dpkg_epics_ver EPICS_DIST = nsls else # # Otherwise, revert to using source code. # EPICS_DIST = source endif endif $(warning *** Building using EPICS_DIST = ${EPICS_DIST} ***) # # You can explicitly define EPICS_ARCH here if you really need to, but # it is normally better to let automatic configuration do the work. # #EPICS_ARCH = linux-x86-debug # For EPICS 3.14 #EPICS_ARCH = linux-x86_64-debug # For EPICS 3.14 ifndef EPICS_ARCH # # Warning: The following autoconfigure logic has only been tested # for EPICS 3.14 and above. It will not work for EPICS 3.13, but # that is not supported by MX anymore. # _uname_machine := $(shell uname -m ) ifeq ($(_uname_machine),x86_64) EPICS_ARCH = linux-x86_64 endif ifeq ($(_uname_machine),i686) EPICS_ARCH = linux-x86 endif ifeq ($(_uname_machine),i386) EPICS_ARCH = linux-x86 endif ifeq ($(_uname_machine),ppc) EPICS_ARCH = linux-ppc endif ifndef EPICS_ARCH $(info: Could not automatically configure the EPICS_ARCH variable.) endif $(warning *** Building for EPICS_ARCH = $(EPICS_ARCH) ***) endif MX_EPICS_CFLAGS = $(CFLAGS) -Wno-strict-prototypes \ -Wno-cast-qual -Wno-shadow # Compile from source code ifeq ($(EPICS_DIST),source) #EPICS_BASE = /opt/epics/base #EPICS_BASE = /opt/EPICS/base #EPICS_BASE = /mnt/epics/base #EPICS_BASE = /usr/local/epics/base #EPICS_BASE = /home/lavender/local/opt/epics/base #EPICS_BASE = /home1/daly/epics/base #EPICS_BASE = /local/DPbin/epics/epics_2013-04-23/base-3.14.12.3 ifndef EPICS_BASE EPICS_BASE = /opt/epics/base endif $(warning *** Using source code at EPICS_BASE = ${EPICS_BASE} ***) EPICS_INCLUDES = -Wno-shadow -I$(EPICS_BASE)/include \ -I$(EPICS_BASE)/include/os/Linux EPICS_LIB_DIRS = -L$(EPICS_BASE)/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom # For EPICS 3.15 and above ifeq ($(MX_ARCH),linux) EPICS_INCLUDES += -I$(EPICS_BASE)/include/compiler/gcc endif ifeq ($(MX_ARCH),linux-clang) EPICS_INCLUDES += -I$(EPICS_BASE)/include/compiler/clang endif endif # Debian EPICS Debian packages from the Debian 12 (bookworm) distribution # # WARNING: Not yet really tested (2022-08-18) WML. ifeq ($(EPICS_DIST),debian) EPICS_INCLUDES = -Wno-shadow -I/usr/lib/epics/include \ -I/usr/lib/epics/include/os/Linux EPICS_LIB_DIRS = -L/usr/lib/epics/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom endif # NSLS-II EPICS Debian packages from http://epics.nsls2.bnl.gov/debian/ ifeq ($(EPICS_DIST),nsls) EPICS_INCLUDES = -Wno-shadow -I/usr/lib/epics/include \ -I/usr/lib/epics/include/os/Linux EPICS_LIB_DIRS = -L/usr/lib/epics/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom endif # IIT's EPICS Debian packages from http://debian-xray.iit.edu/ ifeq ($(EPICS_DIST),iit) EPICS_INCLUDES = -Wno-shadow -I/usr/include/epics \ -I/usr/include/epics/os/Linux EPICS_LIB_DIRS = EPICS_LIBRARIES = -lca -lCom endif endif #-------------------------------------------------------------------------- # MacOS X configuration ifeq ($(MX_ARCH),macosx) EPICS_ARCH = darwin-x86 #EPICS_ARCH = darwin-ppc MX_EPICS_CFLAGS = $(CFLAGS) EPICS_BASE = /opt/epics/base EPICS_INCLUDES = -I$(EPICS_BASE)/include \ -I$(EPICS_BASE)/include/os/Darwin EPICS_LIB_DIRS = -L$(EPICS_BASE)/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom endif #-------------------------------------------------------------------------- # MacOS X (with Clang) configuration ifeq ($(MX_ARCH),macosx-clang) EPICS_ARCH = darwin-x86 MX_EPICS_CFLAGS = $(CFLAGS) EPICS_BASE = /opt/epics/base EPICS_INCLUDES = -I$(EPICS_BASE)/include \ -I$(EPICS_BASE)/include/os/Darwin EPICS_LIB_DIRS = -L$(EPICS_BASE)/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom endif #-------------------------------------------------------------------------- # Solaris configuration ifeq ($(MX_ARCH),solaris) EPICS_ARCH = solaris-sparc #EPICS_ARCH = solaris-x86 #EPICS_BASE = /opt/epics/base #EPICS_BASE = /usr/local/epics/base EPICS_BASE = /filer/Data/epicsUIC/base EPICS_INCLUDES = -I$(EPICS_BASE)/include \ -I$(EPICS_BASE)/include/os/solaris EPICS_LIB_DIRS = -L$(EPICS_BASE)/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom endif #-------------------------------------------------------------------------- # Solaris GCC configuration ifeq ($(MX_ARCH),solaris-gcc) EPICS_ARCH = solaris-sparc-gnu #EPICS_ARCH = solaris-x86-gnu EPICS_BASE = /opt/epics/base EPICS_INCLUDES = -I$(EPICS_BASE)/include \ -I$(EPICS_BASE)/include/os/solaris EPICS_LIB_DIRS = -L$(EPICS_BASE)/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom endif #-------------------------------------------------------------------------- # Win32 configuration ifeq ($(MX_ARCH),win32) ifndef EPICS_ARCH #EPICS_ARCH = win32-x86 EPICS_ARCH = windows-x64 endif MX_EPICS_CFLAGS = $(CFLAGS) ifndef EPICS_BASE EPICS_BASE = C:\\opt\\epics\\base-7.0.7 #EPICS_BASE = C:\\opt\\epics\\base-3.14.12.3 #EPICS_BASE = C:\\opt\\epics\\base-3-14-11 #EPICS_BASE = D:\\opt\\epics\\base-3.14.12 endif # Detect whether or not we are using Cygwin's version of GNU Make # instead of MSYS2 make. _uname_os := $(shell uname -o) $(info _uname_os is [${_uname_os}]) ifneq ($(_uname_os),Cygwin) # Not Cygwin EPICS_INCLUDES = -I$(EPICS_BASE)\\include \ -I$(EPICS_BASE)\\include\\os\\WIN32 \ -I$(EPICS_BASE)\\include\\compiler\\msvc EPICS_LIBS = $(EPICS_BASE)\\lib\\$(EPICS_ARCH)\\ca.lib \ $(EPICS_BASE)\\lib\\$(EPICS_ARCH)\\Com.lib else # Cygwin _inc_1 := $(shell cygpath -w -a $(EPICS_BASE)/include) _inc_2 := $(shell cygpath -w -a $(EPICS_BASE)/include/os/WIN32) _inc_3 := $(shell cygpath -w -a $(EPICS_BASE)/include/compiler/msvc) EPICS_INCLUDES = -I$(_inc_1) -I$(_inc_2) -I$(_inc_3) _lib_1 := $(shell cygpath -w -a $(EPICS_BASE)/lib/$(EPICS_ARCH)/ca.lib) _lib_2 := $(shell cygpath -w -a $(EPICS_BASE)/lib/$(EPICS_ARCH)/Com.lib) EPICS_LIBS = $(_lib_1) $(_lib_2) endif $(info EPICS_INCLUDES is [${EPICS_INCLUDES}]) $(info EPICS_LIBS is [${EPICS_LIBS}]) endif #--------------------------------------------------------------------------