Files
pcas/configure/CONFIG_ADDONS
Janet B. Anderson 7c57ed82c9 Added USR_SRCS
2003-01-24 17:46:01 +00:00

387 lines
9.6 KiB
Plaintext

#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# $Id#
#
# check for add-on CFLAGS and CXXFLAGS
#
# Rules:
# 1) USR_CFLAGS is used
# 2) if there is a special USR_CFLAGS_$(OS_CLASS), it's
# appended to 1)
# 3) if there is no special defined, but a generic USR_CFLAGS_DEFAULT,
# this one is appended
# 4) if you have the special case that your USR_CFLAGS_$(OS_CLASS) is
# empty but you don't want 3), you have to define it as '-nil-', e.g.:
# USR_CFLAGS = <defines for all systems>
# USR_CFLAGS_sun4 = -nil-
# USR_CFLAGS_DEFAULT = <defines for most systems, not sun4>
#
# Additional target architecture, T_A, Rules for USR_CFLAGS, USR_CXXFLAGS,
# and USR_CPPFLAGS which are applied before the above os_class Rules:
# 1) USR_CFLAGS_$(OS_CLASS) is used
# 2) if there is a special $(USR_CFLAGS_$(T_A)), it's
# appended to 1)
# 3) if there is no special defined, but a generic USR_CFLAGS_$(OS_CLASS)_DEFAULT,
# this one is appended
# 4) if you have the special case that your $(USR_CFLAGS_$(T_A)) is
# empty but you don't want 3), you have to define it as '-nil-', e.g.:
# USR_CFLAGS_vxWorks = <defines for all OS_CLASS=vxWorks target systems>
# USR_CFLAGS_vxWorks-68040 = -nil-
# USR_CFLAGS_vxWorks_DEFAULT = <defines for most vxWorks systems, not 68040>
#
# These rules apply to these Makefile-variables:
# USR_CFLAGS C flags
# USR_CXXFLAGS C++ flags
# USR_CPPFLAGS c preprocesser flags
# INC include-files to install
# USR_SRCS source files for building library and prod
# LIBSRCS source files for building library
# LIB_SRCS source files for building library
# SHRLIB_LIBS libs needed by shared LIBRARY
# PROD_LIBS libs needed by PROD and TESTPROD
# USR_LIBS libs needed by PROD and TESTPROD
# USR_LDFLAGS ld flags
# SYS_PROD_LIBS system libs needed by PROD and TESTPROD
# PROD products to build and install
# SCRIPTS scripts to install
# USR_INCLUDES include directories
#
# Remark:
# If you define INC, e.g. INC = getopt.h, the source
# (getopt.h) must be in the source directory (..) and/or
# in one or more ../os/<OS_CLASS> directories.
# The INC source files cannot be created by the build.
#
ifneq ($(strip $(USR_CFLAGS_$(T_A))),)
USR_CFLAGS_$(OS_CLASS)+=$(subst -nil-,,$(USR_CFLAGS_$(T_A)))
else
ifdef USR_CFLAGS_$(OS_CLASS)_DEFAULT
USR_CFLAGS_$(OS_CLASS)+=$(USR_CFLAGS_$(OS_CLASS)_DEFAULT)
endif
endif
ifneq ($(strip $(USR_CFLAGS_$(OS_CLASS))),)
USR_CFLAGS+=$(subst -nil-,,$(USR_CFLAGS_$(OS_CLASS)))
else
ifdef USR_CFLAGS_DEFAULT
USR_CFLAGS+=$(USR_CFLAGS_DEFAULT)
endif
endif
ifneq ($(strip $(USR_INCLUDES_$(OS_CLASS))),)
USR_INCLUDES+=$(subst -nil-,,$(USR_INCLUDES_$(OS_CLASS)))
else
ifdef USR_INCLUDES_DEFAULT
USR_INCLUDES+=$(USR_INCLUDES_DEFAULT)
endif
endif
ifneq ($(strip $(USR_CXXFLAGS_$(T_A))),)
USR_CXXFLAGS_$(OS_CLASS)+=$(subst -nil-,,$(USR_CXXFLAGS_$(T_A)))
else
ifdef USR_CXXFLAGS_$(OS_CLASS)_DEFAULT
USR_CXXFLAGS_$(OS_CLASS)+=$(USR_CXXFLAGS_$(OS_CLASS)_DEFAULT)
endif
endif
ifneq ($(strip $(USR_CXXFLAGS_$(OS_CLASS))),)
USR_CXXFLAGS+=$(subst -nil-,,$(USR_CXXFLAGS_$(OS_CLASS)))
else
ifdef USR_CXXFLAGS_DEFAULT
USR_CXXFLAGS+=$(USR_CXXFLAGS_DEFAULT)
endif
endif
ifneq ($(strip $(USR_CPPFLAGS_$(T_A))),)
USR_CPPFLAGS_$(OS_CLASS)+=$(subst -nil-,,$(USR_CPPFLAGS_$(T_A)))
else
ifdef USR_CPPFLAGS_$(OS_CLASS)_DEFAULT
USR_CPPFLAGS_$(OS_CLASS)+=$(USR_CPPFLAGS_$(OS_CLASS)_DEFAULT)
endif
endif
ifneq ($(strip $(USR_CPPFLAGS_$(OS_CLASS))),)
USR_CPPFLAGS+=$(subst -nil-,,$(USR_CPPFLAGS_$(OS_CLASS)))
else
ifdef USR_CPPFLAGS_DEFAULT
USR_CPPFLAGS+=$(USR_CPPFLAGS_DEFAULT)
endif
endif
ifneq ($(strip $(USR_LDFLAGS_$(OS_CLASS))),)
USR_LDFLAGS+=$(subst -nil-,,$(USR_LDFLAGS_$(OS_CLASS)))
else
ifdef USR_LDFLAGS_DEFAULT
USR_LDFLAGS+=$(USR_LDFLAGS_DEFAULT)
endif
endif
# check for special includes:
#
ifneq ($(strip $(INC_$(OS_CLASS))),)
# os-specific includes go to the include/os-directory:
INC += $(subst -nil-,,$(INC_$(OS_CLASS)))
else
ifdef INC_DEFAULT
INC += $(INC_DEFAULT)
endif
endif
# concat specific library contents (if defined)
#
ifneq ($(strip $(LIBSRCS_$(OS_CLASS))),)
LIBSRCS += $(subst -nil-,,$(LIBSRCS_$(OS_CLASS)))
else
ifdef LIBSRCS_DEFAULT
LIBSRCS+=$(LIBSRCS_DEFAULT)
endif
endif
ifneq ($(strip $(LIB_SRCS_$(OS_CLASS))),)
LIB_SRCS += $(subst -nil-,,$(LIB_SRCS_$(OS_CLASS)))
else
ifdef LIB_SRCS_DEFAULT
LIB_SRCS+=$(LIB_SRCS_DEFAULT)
endif
endif
ifneq ($(strip $(SRCS_$(OS_CLASS))),)
SRCS += $(subst -nil-,,$(SRCS_$(OS_CLASS)))
else
ifdef SRCS_DEFAULT
SRCS+=$(SRCS_DEFAULT)
endif
endif
ifneq ($(strip $(USR_SRCS_$(OS_CLASS))),)
USR_SRCS += $(subst -nil-,,$(USR_SRCS_$(OS_CLASS)))
else
ifdef USR_SRCS_DEFAULT
USR_SRCS+=$(USR_SRCS_DEFAULT)
endif
endif
ifneq ($(strip $(PROD_SRCS_$(OS_CLASS))),)
PROD_SRCS += $(subst -nil-,,$(PROD_SRCS_$(OS_CLASS)))
else
ifdef PROD_SRCS_DEFAULT
PROD_SRCS+=$(PROD_SRCS_DEFAULT)
endif
endif
ifneq ($(strip $(BIN_INSTALLS_$(OS_CLASS))),)
BIN_INSTALLS+=$(subst -nil-,,$(BIN_INSTALLS_$(OS_CLASS)))
else
ifdef BIN_INSTALLS_DEFAULT
BIN_INSTALLS+=$(BIN_INSTALLS_DEFAULT)
endif
endif
ifneq ($(strip $(PROD_OBJS_$(OS_CLASS))),)
PROD_OBJS+=$(subst -nil-,,$(PROD_OBJS_$(OS_CLASS)))
else
ifneq (,$(strip $(PROD_OBJS_DEFAULT)))
PROD_OBJS+=$(PROD_OBJS_DEFAULT)
endif
endif
ifneq ($(strip $(OBJS_$(OS_CLASS))),)
OBJS+=$(subst -nil-,,$(OBJS_$(OS_CLASS)))
else
ifneq (,$(strip $(OBJS_DEFAULT)))
OBJS+=$(OBJS_DEFAULT)
endif
endif
ifneq ($(strip $(OBJS_IOC_$(OS_CLASS))),)
OBJS_IOC+=$(subst -nil-,,$(OBJS_IOC_$(OS_CLASS)))
else
ifneq (,$(strip $(OBJS_IOC_DEFAULT)))
OBJS_IOC+=$(OBJS_IOC_DEFAULT)
endif
endif
ifneq ($(strip $(OBJS_HOST_$(OS_CLASS))),)
OBJS_HOST+=$(subst -nil-,,$(OBJS_HOST_$(OS_CLASS)))
else
ifneq (,$(strip $(OBJS_HOST_DEFAULT)))
OBJS_HOST+=$(OBJS_HOST_DEFAULT)
endif
endif
ifneq ($(strip $(LDOBJS_$(OS_CLASS))),)
LDOBJS+=$(subst -nil-,,$(LDOBJS_$(OS_CLASS)))
else
ifneq (,$(strip $(LDOBJS_DEFAULT)))
LDOBJS+=$(LDOBJS_DEFAULT)
endif
endif
ifneq ($(strip $(LIB_OBJS_$(OS_CLASS))),)
LIB_OBJS+=$(subst -nil-,,$(LIB_OBJS_$(OS_CLASS)))
else
ifneq (,$(strip $(LIB_OBJS_DEFAULT)))
LIB_OBJS+=$(LIB_OBJS_DEFAULT)
endif
endif
ifneq ($(strip $(LIBRARY_$(OS_CLASS))),)
LIBRARY+=$(subst -nil-,,$(LIBRARY_$(OS_CLASS)))
else
ifneq (,$(strip $(LIBRARY_DEFAULT)))
LIBRARY+=$(LIBRARY_DEFAULT)
endif
endif
ifneq ($(strip $(LIBRARY_IOC_$(OS_CLASS))),)
LIBRARY_IOC+=$(subst -nil-,,$(LIBRARY_IOC_$(OS_CLASS)))
else
ifneq (,$(strip $(LIBRARY_IOC_DEFAULT)))
LIBRARY_IOC+=$(LIBRARY_IOC_DEFAULT)
endif
endif
ifneq ($(strip $(LIBRARY_HOST_$(OS_CLASS))),)
LIBRARY_HOST+=$(subst -nil-,,$(LIBRARY_HOST_$(OS_CLASS)))
else
ifneq (,$(strip $(LIBRARY_HOST_DEFAULT)))
LIBRARY_HOST+=$(LIBRARY_HOST_DEFAULT)
endif
endif
ifneq ($(strip $(PROD_LIBS_$(OS_CLASS))),)
PROD_LIBS += $(subst -nil-,,$(PROD_LIBS_$(OS_CLASS)))
else
ifdef PROD_LIBS_DEFAULT
PROD_LIBS += $(PROD_LIBS_DEFAULT)
endif
endif
ifneq ($(strip $(SHRLIB_LIBS_$(OS_CLASS))),)
SHRLIB_LIBS += $(subst -nil-,,$(SHRLIB_LIBS_$(OS_CLASS)))
else
ifdef SHRLIB_LIBS_DEFAULT
SHRLIB_LIBS += $(SHRLIB_LIBS_DEFAULT)
endif
endif
ifneq ($(strip $(USR_LIBS_$(OS_CLASS))),)
USR_LIBS += $(subst -nil-,,$(USR_LIBS_$(OS_CLASS)))
else
ifdef USR_LIBS_DEFAULT
USR_LIBS += $(USR_LIBS_DEFAULT)
endif
endif
#
# concat specific library contents (if defined) to SYS_PROD_LIBS
#
ifneq ($(strip $(SYS_PROD_LIBS_$(OS_CLASS))),)
SYS_PROD_LIBS += $(subst -nil-,,$(SYS_PROD_LIBS_$(OS_CLASS)))
else
ifdef SYS_PROD_LIBS_DEFAULT
SYS_PROD_LIBS += $(SYS_PROD_LIBS_DEFAULT)
endif
endif
#
# concat specific products
#
ifneq ($(strip $(PROD_$(OS_CLASS))),)
PROD+=$(subst -nil-,,$(PROD_$(OS_CLASS)))
else
ifneq (,$(strip $(PROD_DEFAULT)))
PROD+=$(PROD_DEFAULT)
endif
endif
ifneq ($(strip $(PROD_IOC_$(OS_CLASS))),)
PROD_IOC+=$(subst -nil-,,$(PROD_IOC_$(OS_CLASS)))
else
ifneq (,$(strip $(PROD_IOC_DEFAULT)))
PROD_IOC+=$(PROD_IOC_DEFAULT)
endif
endif
ifneq ($(strip $(PROD_HOST_$(OS_CLASS))),)
PROD_HOST+=$(subst -nil-,,$(PROD_HOST_$(OS_CLASS)))
else
ifneq (,$(strip $(PROD_HOST_DEFAULT)))
PROD_HOST+=$(PROD_HOST_DEFAULT)
endif
endif
#
# concat specific products
#
ifneq ($(strip $(TESTPROD_$(OS_CLASS))),)
TESTPROD+=$(subst -nil-,,$(TESTPROD_$(OS_CLASS)))
else
ifneq (,$(strip $(TESTPROD_DEFAULT)))
TESTPROD+=$(TESTPROD_DEFAULT)
endif
endif
ifneq ($(strip $(TESTPROD_IOC_$(OS_CLASS))),)
TESTPROD_IOC+=$(subst -nil-,,$(TESTPROD_IOC_$(OS_CLASS)))
else
ifneq (,$(strip $(TESTPROD_IOC_DEFAULT)))
TESTPROD_IOC+=$(TESTPROD_IOC_DEFAULT)
endif
endif
ifneq ($(strip $(TESTPROD_HOST_$(OS_CLASS))),)
TESTPROD_HOST+=$(subst -nil-,,$(TESTPROD_HOST_$(OS_CLASS)))
else
ifneq (,$(strip $(TESTPROD_HOST_DEFAULT)))
TESTPROD_HOST+=$(TESTPROD_HOST_DEFAULT)
endif
endif
#
# concat specific scripts
#
ifneq ($(strip $(SCRIPTS_$(OS_CLASS))),)
SCRIPTS += $(subst -nil-,,$(SCRIPTS_$(OS_CLASS)))
else
ifdef SCRIPTS_DEFAULT
SCRIPTS += $(SCRIPTS_DEFAULT)
endif
endif
ifneq ($(strip $(SCRIPTS_IOC_$(OS_CLASS))),)
SCRIPTS_IOC+=$(subst -nil-,,$(SCRIPTS_IOC_$(OS_CLASS)))
else
ifneq (,$(strip $(SCRIPTS_IOC_DEFAULT)))
SCRIPTS_IOC+=$(SCRIPTS_IOC_DEFAULT)
endif
endif
ifneq ($(strip $(SCRIPTS_HOST_$(OS_CLASS))),)
SCRIPTS_HOST+=$(subst -nil-,,$(SCRIPTS_HOST_$(OS_CLASS)))
else
ifneq (,$(strip $(SCRIPTS_HOST_DEFAULT)))
SCRIPTS_HOST+=$(SCRIPTS_HOST_DEFAULT)
endif
endif
#
# concat specific resource files
#
ifneq ($(strip $(RCS_$(OS_CLASS))),)
RCS += $(subst -nil-,,$(RCS_$(OS_CLASS)))
else
ifdef RCS_DEFAULT
RCS += $(RCS_DEFAULT)
endif
endif