74 lines
2.4 KiB
Plaintext
74 lines
2.4 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_YES = $(BUILD_LIBRARY:%=$(LIB_PREFIX)%$(SHRLIB_SUFFIX))
|
|
|
|
#-------------------------------------------------------
|
|
# shrlib: dependancy definitions
|
|
SHRLIB_DEPLIBS = $(foreach lib,$(SHRLIB_LIBS),$(firstword $(wildcard \
|
|
$($(lib)_DIR)/$(LIB_PREFIX)$(lib).*)))
|
|
|
|
# Shared library definitions
|
|
SHRLIB_LDFLAGS = $(SHRLIB_LDFLAGS_$(strip $(SHARED_LIBRARIES)))
|
|
SHRLIB_LDLIBS = $($*_LIBS:%=-l%)
|
|
|
|
SHRLIB_DEPLIB_DIRS = $(dir $($*_DEPLIBS)) $(dir $(SHRLIB_DEPLIBS))
|
|
SHRLIB_LDFLAGS += $(sort $(SHRLIB_DEPLIB_DIRS:%=-L%))
|
|
|
|
#--------------------------------------------------
|
|
# Prod: dependancy definitions
|
|
PROD_DEPLIBS = $(foreach lib,$(PROD_LDLIBS) $(USR_LDLIBS),$(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 = $($*_LDLIBS:%=-l%) $(PROD_LDLIBS:%=-l%) $(USR_LDLIBS:%=-l%)\
|
|
$($*_SYS_LIBS:%=-l%) $(SYS_PROD_LIBS:%=-l%)
|
|
|
|
#--------------------------------------------------
|
|
# Operating system definitions
|
|
OP_SYS_CPPFLAGS += -DUNIX
|
|
OP_SYS_LDLIBS += -lm
|
|
|
|
#--------------------------------------------------
|
|
# Link definitions
|
|
LINK.cpp = $(CCC) -o $@ $(LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RESS) $(LDLIBS)
|
|
LINK.shrlib = $(CCC) -o $@ $(SHRLIB_LDFLAGS) $(LDFLAGS) $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)
|
|
|
|
#--------------------------------------------------
|
|
# Allow site overrides
|
|
-include $(CONFIG)/os/CONFIG_SITE.Common.UnixCommon
|
|
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).UnixCommon
|