Files
epics-base/configure/os/CONFIG.Common.UnixCommon
2000-04-11 14:26:02 +00:00

74 lines
2.3 KiB
Plaintext

# CONFIG.Common.UnixCommon
#
# $Id$
#
# Contains definitions common to all Unix target archs
#
# This file is maintained by the build community.
# Sites may override definitions in CONFIG_SITE.Common.UnixCommon
# or CONFIG_SITE.<host>.UnixCommon
#-------------------------------------------------------
# Unix valid build types
VALID_BUILDS = Host Ioc
#-------------------------------------------------------
# Gnu directory
GNU_DIR = /usr/local
#-------------------------------------------------------
# Unix prefix and suffix definitions
EXE =
OBJ = .o
#Library prefix and suffixes
LIB_PREFIX = lib
LIB_SUFFIX = .a
SHRLIB_SUFFIX = .so$(addprefix .,$(SHRLIB_VERSION))
#-------------------------------------------------------
# names of libraries to build
# <lib> -> lib<lib>.a
LIBNAME = $(BUILD_LIBRARY:%=$(LIB_PREFIX)%$(LIB_SUFFIX))
# <lib> -> lib<lib>.so.<version>
SHRLIBNAME = $(BUILD_LIBRARY:%=$(LIB_PREFIX)%$(SHRLIB_SUFFIX))
#-------------------------------------------------------
# Shared library definitions
SHRLIB_LDFLAGS = $($(ANSI)_SHRLIB_LDFLAGS_$(strip $(SHARED_LIBRARIES)))
SHRLIB_LDLIBS = $($*_LIBS:%=-l%)
#--------------------------------------------------
# Prod: dependancy definitions
PROD_DEPLIBS = $(foreach lib,$(PROD_LIBS) $(USR_LIBS),$(firstword $(wildcard \
$($(lib)_DIR)/$(LIB_PREFIX)$(lib).*)))
#--------------------------------------------------
# Prod: LDFLAGS and LDLIBS definitions
DEPLIB_DIRS = $(dir $($*_DEPLIBS)) $(dir $(PROD_DEPLIBS))
DEPLIB_LDFLAGS += $(sort $(DEPLIB_DIRS:%=-L%))
DEPLIB_LDLIBS = $($*_LIBS:%=-l%) $(PROD_LIBS:%=-l%) $(USR_LIBS:%=-l%)\
$($*_SYS_LIBS:%=-l%) $(SYS_PROD_LIBS:%=-l%)
#--------------------------------------------------
# Allow code to be used in a shared library
GCC_DEP_CFLAGS = -fPIC
G++_DEP_CFLAGS = -fPIC
#--------------------------------------------------
# Operating system definitions
OP_SYS_INCLUDES =
OP_SYS_CPPFLAGS = -DUNIX
OP_SYS_LDFLAGS =
OP_SYS_LDLIBS = -lm
#--------------------------------------------------
# Link definitions
LINK.c = $(CC) -o $@ $(LDFLAGS)
LINK.cpp = $(CXX) -o $@ $(LDFLAGS)
LINK.shrlib = $(SHRLIB_LINKER) -o $@ $(SHRLIB_LDFLAGS) $(LDFLAGS)
#--------------------------------------------------
# Allow site overrides
-include $(CONFIG)/os/CONFIG_SITE.Common.UnixCommon
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).UnixCommon