new way to build
This commit is contained in:
@@ -28,8 +28,8 @@ include $(CONFIG)/CONFIG_SITE
|
||||
|
||||
# Host architecture specific definitions
|
||||
#
|
||||
include $(CONFIG)/CONFIG.Host.$(HOST_ARCH)
|
||||
-include $(CONFIG)/CONFIG_SITE.Host.$(HOST_ARCH)
|
||||
include $(CONFIG)/os/CONFIG.Host.$(HOST_ARCH)
|
||||
-include $(CONFIG)/os/CONFIG_SITE.Host.$(HOST_ARCH)
|
||||
|
||||
ifdef T_A
|
||||
|
||||
@@ -39,22 +39,24 @@ ifneq ($(HOST_ARCH),$(T_A))
|
||||
include $(CONFIG)/CONFIG.CrossCommon
|
||||
endif
|
||||
|
||||
include $(CONFIG)/CONFIG.Target.$(T_A)
|
||||
include $(CONFIG)/os/CONFIG.Target.$(T_A)
|
||||
#
|
||||
-include $(CONFIG)/CONFIG_SITE.Target.$(T_A)
|
||||
-include $(CONFIG)/os/CONFIG_SITE.Target.$(T_A)
|
||||
#
|
||||
-include $(CONFIG)/CONFIG_SITE.$(HOST_ARCH).$(T_A)
|
||||
-include $(CONFIG)/os/CONFIG_SITE.$(HOST_ARCH).$(T_A)
|
||||
|
||||
endif
|
||||
|
||||
# User specific definitions
|
||||
#
|
||||
-include $(HOME)/configure/CONFIG
|
||||
-include $(HOME)/configure/CONFIG.Host.$(HOST_ARCH)
|
||||
-include $(HOME)/os/configure/CONFIG.Host.$(HOST_ARCH)
|
||||
ifdef T_A
|
||||
-include $(HOME)/configure/CONFIG.$(OS_CLASS)
|
||||
-include $(HOME)/configure/CONFIG.Target.$(T_A)
|
||||
-include $(HOME)/configure/CONFIG.$(HOST_ARCH).$(T_A)
|
||||
-include $(HOME)/configure/os/CONFIG.Target.$(T_A)
|
||||
-include $(HOME)/configure/os/CONFIG.$(HOST_ARCH).$(T_A)
|
||||
endif
|
||||
|
||||
# All options
|
||||
@@ -65,13 +67,13 @@ endif
|
||||
# Build client objects statically ? must be either YES or NO
|
||||
#STATIC_BUILD=NO
|
||||
# Host build optimization, must be either YES or NO
|
||||
#Host_OPT=YES
|
||||
#HOST_OPT=YES
|
||||
# Ioc build optimization, must be either YES or NO
|
||||
#Ioc_OPT=YES
|
||||
#IOC_OPT=YES
|
||||
# Generate Verbose Compiler Warnings for host build, must be either YES or NO
|
||||
#Host_WARN=YES
|
||||
#HOST_WARN=YES
|
||||
# Generate Verbose Compiler Warnings for ioc builds, must be either YES or NO
|
||||
#Ioc_WARN=YES
|
||||
#IOC_WARN=YES
|
||||
#etc.
|
||||
|
||||
#CROSS_COMPILER_TARGET_ARCHS=mv167
|
||||
|
||||
255
configure/CONFIG_ADDONS
Normal file
255
configure/CONFIG_ADDONS
Normal file
@@ -0,0 +1,255 @@
|
||||
# $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>
|
||||
#
|
||||
# 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
|
||||
# LIBSRCS source files for building library
|
||||
# PROD_LIBS EPICS libs needed by PROD and TESTPROD
|
||||
# USR_LIBS NONEPICS 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_$(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_$(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_$(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
|
||||
|
||||
# concat specific library contents (if defined)
|
||||
#
|
||||
ifneq ($(strip $(LIBSRCS_HOST_$(OS_CLASS))),)
|
||||
LIBSRCS_HOST += $(subst -nil-,,$(LIBSRCS_HOST_$(OS_CLASS)))
|
||||
else
|
||||
ifdef LIBSRCS_HOST_DEFAULT
|
||||
LIBSRCS_HOST+=$(LIBSRCS_HOST_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(LIBSRCS_IOC_$(OS_CLASS))),)
|
||||
LIBSRCS_IOC += $(subst -nil-,,$(LIBSRCS_IOC_$(OS_CLASS)))
|
||||
else
|
||||
ifdef LIBSRCS_IOC_DEFAULT
|
||||
LIBSRCS_IOC+=$(LIBSRCS_IOC_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 $(LIBRARY_$(OS_CLASS))),)
|
||||
LIBRARY+=$(subst -nil-,,$(LIBRARY_$(OS_CLASS)))
|
||||
else
|
||||
ifneq (,$(LIBRARY_DEFAULT))
|
||||
#ifdef LIBRARY_DEFAULT
|
||||
LIBRARY+=$(LIBRARY_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(OBJS_$(OS_CLASS))),)
|
||||
OBJS+=$(subst -nil-,,$(OBJS_$(OS_CLASS)))
|
||||
else
|
||||
ifneq (,$(OBJS_DEFAULT))
|
||||
#ifdef OBJS_DEFAULT
|
||||
OBJS+=$(OBJS_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(OBJS_IOC_$(OS_CLASS))),)
|
||||
OBJS_IOC+=$(subst -nil-,,$(OBJS_IOC_$(OS_CLASS)))
|
||||
else
|
||||
ifneq (,$(OBJS_IOC_DEFAULT))
|
||||
#ifdef 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 (,$(OBJS_HOST_DEFAULT))
|
||||
#ifdef OBJS_HOST_DEFAULT
|
||||
OBJS_HOST+=$(OBJS_HOST_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(LIB_$(OS_CLASS))),)
|
||||
LIB+=$(subst -nil-,,$(LIB_$(OS_CLASS)))
|
||||
else
|
||||
ifneq (,$(LIB_DEFAULT))
|
||||
#ifdef LIB_DEFAULT
|
||||
LIB+=$(LIB_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(LIB_IOC_$(OS_CLASS))),)
|
||||
LIB_IOC+=$(subst -nil-,,$(LIB_IOC_$(OS_CLASS)))
|
||||
else
|
||||
ifneq (,$(LIB_IOC_DEFAULT))
|
||||
#ifdef LIB_IOC_DEFAULT
|
||||
LIB_IOC+=$(LIB_IOC_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(LIB_HOST_$(OS_CLASS))),)
|
||||
LIB_HOST+=$(subst -nil-,,$(LIB_HOST_$(OS_CLASS)))
|
||||
else
|
||||
ifneq (,$(LIB_HOST_DEFAULT))
|
||||
#ifdef LIB_HOST_DEFAULT
|
||||
LIB_HOST+=$(LIB_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 $(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
|
||||
ifdef PROD_DEFAULT
|
||||
PROD += $(PROD_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(PRODMT_$(OS_CLASS))),)
|
||||
PRODMT += $(subst -nil-,,$(PRODMT_$(OS_CLASS)))
|
||||
else
|
||||
ifdef PRODMT_DEFAULT
|
||||
PRODMT += $(PRODMT_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
|
||||
|
||||
#
|
||||
# concat specific resource files
|
||||
#
|
||||
ifneq ($(strip $(RCS_$(OS_CLASS))),)
|
||||
RCS += $(subst -nil-,,$(RCS_$(OS_CLASS)))
|
||||
else
|
||||
ifdef RCS_DEFAULT
|
||||
RCS += $(RCS_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,55 @@ ifndef EPICS_BASE
|
||||
EPICS_BASE = $(INSTALL_LOCATION)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Epics base directories
|
||||
|
||||
EPICS_BASE_HOST_BIN = $(EPICS_BASE)/bin/$(HOST_ARCH)
|
||||
EPICS_BASE_INCLUDE = $(EPICS_BASE)/include
|
||||
|
||||
ifdef T_A
|
||||
EPICS_BASE_LIB = $(EPICS_BASE)/lib/$(T_A)
|
||||
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
|
||||
endif
|
||||
|
||||
Db_DIR = $(EPICS_BASE_LIB)
|
||||
Com_DIR = $(EPICS_BASE_LIB)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# For applications and extensions
|
||||
|
||||
# add epics/base include directories
|
||||
ifneq ($(EPICS_BASE),$(TOP))
|
||||
ifneq ($(EPICS_BASE),$(INSTALL_LOCATION))
|
||||
INSTALL_INCLUDES += \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(OS_CLASS) \
|
||||
-I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
# add epics/base dbd directory
|
||||
INSTALL_DBDFLAGS += \
|
||||
-I$(EPICS_BASE)/dbd
|
||||
endif
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Version number for base shared libraries (and win32 products)
|
||||
|
||||
ifeq ($(EPICS_BASE),$(TOP))
|
||||
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
endif # EPICS_BASE
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Epics base c preprocessor flags
|
||||
|
||||
# c++ exceptions
|
||||
CXX_EXCEPTIONS = NO
|
||||
CXX_EXCEPTIONS_FLAGS_YES =
|
||||
CXX_EXCEPTIONS_FLAGS_NO = -DnoExceptionsFromCXX
|
||||
EPICS_BASE_CPPFLAGS = $(CXX_EXCEPTIONS_FLAGS_$(CXX_EXCEPTIONS))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Epics base build tools and tool flags
|
||||
|
||||
# private versions of lex/yacc from EPICS
|
||||
EYACC = $(EPICS_BASE_HOST_BIN)/antelope$(HOSTEXE)
|
||||
@@ -13,41 +61,6 @@ LEX = $(ELEX)
|
||||
# state notation language compiler (installed from base/src/sequencer)
|
||||
SNC = $(EPICS_BASE_HOST_BIN)/snc$(HOSTEXE)
|
||||
|
||||
EPICS_BASE_INCLUDE = $(EPICS_BASE)/include
|
||||
|
||||
# build command line include directories
|
||||
ifneq ($(EPICS_BASE),$(TOP))
|
||||
ifneq ($(EPICS_BASE),$(INSTALL_LOCATION))
|
||||
INSTALL_INCLUDES += \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(OS_CLASS)$(B_T_SUFFIX) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/posix$(B_T_SUFFIX) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(OS_CLASS) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/posix \
|
||||
-I$(EPICS_BASE_INCLUDE)/generic$(B_T_SUFFIX) \
|
||||
-I$(EPICS_BASE_INCLUDE)/generic \
|
||||
-I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
INSTALL_DBDFLAGS += \
|
||||
-I$(EPICS_BASE)/dbd
|
||||
endif
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Version number for base shared libraries (and win32 products)
|
||||
ifeq ($(EPICS_BASE),$(TOP))
|
||||
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
endif # EPICS_BASE
|
||||
|
||||
|
||||
ifdef T_A
|
||||
EPICS_BASE_LIB = $(EPICS_BASE)/lib/$(T_A)
|
||||
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
|
||||
endif
|
||||
|
||||
Db_DIR = $(EPICS_BASE_LIB)
|
||||
Com_DIR = $(EPICS_BASE_LIB)
|
||||
|
||||
# adl2dl
|
||||
ADL2DL = $(EPICS_EXTENSIONS)/bin/$(HOST_ARCH)/adl2dl
|
||||
|
||||
|
||||
@@ -5,47 +5,11 @@
|
||||
#
|
||||
# This file is to be maintained by the community.
|
||||
#
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Common build type definitions
|
||||
#
|
||||
# Host means single-thread non-ioc
|
||||
# HostMT means multi-thread non-ioc
|
||||
# Ioc means multi-thread ioc
|
||||
# IocST means single-thread ioc
|
||||
|
||||
# Default valid build types and include directory suffixes
|
||||
VALID_BUILDS = Host Ioc HostMT IocST
|
||||
Host_SUFFIX=
|
||||
HostMT_SUFFIX=MT
|
||||
Ioc_SUFFIX=Ioc
|
||||
IocST_SUFFIX=IocST
|
||||
|
||||
B_T_SUFFIX = $($(B_T)_SUFFIX)
|
||||
|
||||
# vpath directories
|
||||
OS_SRC_DIRS += $(foreach dir,$(SRC_DIRS), \
|
||||
$(dir)/os/$(OS_CLASS)$(B_T_SUFFIX) $(dir)/os/posix$(B_T_SUFFIX) \
|
||||
$(dir)/os/$(OS_CLASS) $(dir)/os/posix \
|
||||
$(dir)/generic$(B_T_SUFFIX) $(dir)/generic $(dir)) \
|
||||
../os/$(OS_CLASS)$(B_T_SUFFIX) ../os/posix$(B_T_SUFFIX) \
|
||||
../os/$(OS_CLASS) ../os/posix \
|
||||
../generic$(B_T_SUFFIX) ../generic
|
||||
|
||||
# compile line include directories
|
||||
SRC_INCLUDES += $(addprefix -I,$(OS_SRC_DIRS))
|
||||
INSTALL_INCLUDES += \
|
||||
-I$(INSTALL_INCLUDE)/os/$(OS_CLASS)$(B_T_SUFFIX) \
|
||||
-I$(INSTALL_INCLUDE)/os/posix$(B_T_SUFFIX) \
|
||||
-I$(INSTALL_INCLUDE)/os/$(OS_CLASS) \
|
||||
-I$(INSTALL_INCLUDE)/os/posix \
|
||||
-I$(INSTALL_INCLUDE)/generic$(B_T_SUFFIX) \
|
||||
-I$(INSTALL_INCLUDE)/generic \
|
||||
-I$(INSTALL_INCLUDE)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Common Configuration Information
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Build architectures
|
||||
|
||||
# CROSS1 will be defined only when CROSS_COMPILER_HOST_ARCHS is NOT defined
|
||||
CROSS1 = $(CROSS_COMPILER_TARGET_ARCHS$(word 1,$(CROSS_COMPILER_HOST_ARCHS)))
|
||||
|
||||
@@ -55,7 +19,23 @@ CROSS2 = $(CROSS_COMPILER_TARGET_ARCHS$(filter-out 1,$(words $(filter $(HOST_ARC
|
||||
|
||||
BUILD_ARCHS = $(HOST_ARCH) $(CROSS1) $(CROSS2)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Divider and suffix
|
||||
|
||||
DIVIDER = .
|
||||
OBJ = .
|
||||
RES = .
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Default for perl if it's on the PATH,
|
||||
# otherwise override this in os/CONFIG_SITE.Host.<host_arch>
|
||||
PERL=perl
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Directories
|
||||
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
TOOLS = $(CONFIG)/tools
|
||||
|
||||
INSTALL_LOCATION_LIB = $(INSTALL_LOCATION)/lib
|
||||
INSTALL_LOCATION_BIN = $(INSTALL_LOCATION)/bin
|
||||
@@ -69,39 +49,43 @@ INSTALL_DBD = $(INSTALL_LOCATION)/dbd
|
||||
INSTALL_CONFIG = $(INSTALL_LOCATION)/configure
|
||||
INSTALL_JAVA = $(INSTALL_LOCATION)/javalib
|
||||
|
||||
DIVIDER = .
|
||||
OBJ = .
|
||||
RES = .
|
||||
INSTALL_LIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_TCLLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_BIN = $(INSTALL_LOCATION_BIN)/$(T_A)
|
||||
|
||||
# Default for perl if it's on the PATH,
|
||||
# otherwise override this in CONFIG_SITE.Host.<host_arch>
|
||||
PERL=perl
|
||||
ifdef T_A
|
||||
|
||||
# install
|
||||
TOOLS = $(CONFIG)/tools
|
||||
#-------------------------------------------------------
|
||||
# tools for installing libraries and products
|
||||
INSTALL = $(PERL) $(TOOLS)/installEpics.pl
|
||||
INSTALL_PRODUCT = $(INSTALL)
|
||||
INSTALL_LIBRARY = $(INSTALL)
|
||||
|
||||
ifdef T_A
|
||||
#-------------------------------------------------------
|
||||
# vpath directories
|
||||
OS_SRC_DIRS += $(foreach dir, $(SRC_DIRS) .., \
|
||||
$(dir)/os/$(OS_CLASS) $(dir) )
|
||||
|
||||
INSTALL_LIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_TCLLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_BIN = $(INSTALL_LOCATION_BIN)/$(T_A)
|
||||
#-------------------------------------------------------
|
||||
# compile line include directories
|
||||
SRC_INCLUDES += $(addprefix -I,$(OS_SRC_DIRS))
|
||||
INSTALL_INCLUDES += \
|
||||
-I$(INSTALL_INCLUDE)/os/$(OS_CLASS) \
|
||||
-I$(INSTALL_INCLUDE)
|
||||
|
||||
#--------------------------------------------------
|
||||
# GNU compiler defaults
|
||||
|
||||
GCC = $(GNU_BIN)/cc$(CMPLR_SUFFIX)
|
||||
GCC_AR = $(GNU_BIN)/ar$(CMPLR_SUFFIX)
|
||||
GCC_CPP = $(GNU_BIN)/cpp$(CMPLR_SUFFIX)
|
||||
GCC_CPP = $(GNU_BIN)/cc$(CMPLR_SUFFIX) -x c -E
|
||||
GCC_RANLIB = $(GNU_BIN)/ranlib$(CMPLR_SUFFIX)
|
||||
GCC_LD = $(GNU_BIN)/ld$(CMPLR_SUFFIX) -r
|
||||
|
||||
NM = $(GNU_BIN)/nm$(CMPLR_SUFFIX)
|
||||
MUNCH = $(GNU_BIN)/munch
|
||||
|
||||
GCC_ANSI = $(GCC) -ansi
|
||||
GCC_ANSI = $(GCC) -ansi
|
||||
GCC_STRICT = $(GCC) -ansi -pedantic
|
||||
GCC_TRAD = $(GCC) -traditional
|
||||
GCC_WARN_YES = -Wall
|
||||
@@ -210,15 +194,26 @@ TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
# dbd directory
|
||||
INSTALL_DBDFLAGS = -I $(INSTALL_LOCATION)/dbd
|
||||
|
||||
#--------------------------------------------------
|
||||
# POSIX flags
|
||||
#####POSIX = YES
|
||||
#####POSIX_FLAGS_YES = -D_POSIX_C_SOURCE
|
||||
#####POSIX_FLAGS_NO =
|
||||
#####POSIX_FLAGS = $(POSIX_FLAGS_$(POSIX))
|
||||
|
||||
#--------------------------------------------------
|
||||
# Warnings flags (CONFIG.<arch> will override)
|
||||
WARN_CFLAGS = $($(ANSI)_WARN_$($(B_T)_WARN))
|
||||
WARN_CXXFLAGS = $($(CPLUSPLUS)_WARN_$($(B_T)_WARN))
|
||||
# final value determined in RULES_BUILD
|
||||
WARN=$(HOST_WARN)
|
||||
WARN_CFLAGS = $($(ANSI)_WARN_$(WARN))
|
||||
WARN_CXXFLAGS = $($(CPLUSPLUS)_WARN_$(WARN))
|
||||
|
||||
#--------------------------------------------------
|
||||
# Optimization flags (CONFIG.<arch> will override)
|
||||
OPT_CFLAGS = $($(ANSI)_OPT_$($(B_T)_OPT))
|
||||
OPT_CXXFLAGS = $($(CPLUSPLUS)_OPT_$($(B_T)_OPT))
|
||||
# final value determined in RULES_BUILD
|
||||
OPT=$(HOST_OPT)
|
||||
OPT_CFLAGS = $($(ANSI)_OPT_$(OPT))
|
||||
OPT_CXXFLAGS = $($(CPLUSPLUS)_OPT_$(OPT))
|
||||
OPT_LDFLAGS =
|
||||
|
||||
#--------------------------------------------------
|
||||
@@ -234,12 +229,13 @@ ARCMD = $(AR) $(ARFLAGS) $@
|
||||
|
||||
#--------------------------------------------------
|
||||
# depends definition
|
||||
DEPENDS_RULE = -$(COMPILE.cc) $(DEPENDS_FLAG) $^ > DEPENDS
|
||||
DEPENDS_RULE = -$(COMPILE.cpp) $(DEPENDS_FLAG) $^ > DEPENDS
|
||||
|
||||
#--------------------------------------------------
|
||||
# Include files
|
||||
|
||||
INCLUDES = -I. -I.. $(USR_INCLUDES) $(SRC_INCLUDES) $(INSTALL_INCLUDES) $(TARGET_INCLUDES) $(OP_SYS_INCLUDES)
|
||||
INCLUDES = -I. $(USR_INCLUDES) $(SRC_INCLUDES) $(INSTALL_INCLUDES)\
|
||||
$(TARGET_INCLUDES) $(OP_SYS_INCLUDES)
|
||||
|
||||
#--------------------------------------------------
|
||||
# Flags
|
||||
@@ -258,7 +254,7 @@ LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(DEPLIB_LDFLAGS)\
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(DEPLIB_LDLIBS) $(ARCH_DEP_LDLIBS)\
|
||||
$(STATIC_LDLIBS) $(OP_SYS_LDLIBS)
|
||||
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS) $(ARCH_DEP_CPPFLAGS)
|
||||
CPPFLAGS += $(EPICS_BASE_CPPFLAGS) $(TARGET_CPPFLAGS) $(USR_CPPFLAGS) $(ARCH_DEP_CPPFLAGS)
|
||||
|
||||
CPPSNCFLAGS = $(INCLUDES)
|
||||
|
||||
@@ -268,6 +264,67 @@ DBDFLAGS = $(USR_DBDFLAGS) -I . -I .. $(INSTALL_DBDFLAGS)
|
||||
# Build compile line here
|
||||
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c $(SOURCE_FLAG)
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(SOURCE_CXXFLAG)
|
||||
COMPILE.cpp = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(SOURCE_CXXFLAG)
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Man pages
|
||||
|
||||
MANLIST = 1 2 3 4 5 6 7 8 9
|
||||
MAN_DIRECTORY_TARGETS = $(foreach n, $(MANLIST),$(INSTALL_MAN)/man$(n))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Directory targets
|
||||
|
||||
DIRECTORY_TARGETS += $(INSTALL_DBD) $(INSTALL_INCLUDE)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Names of installed items
|
||||
#
|
||||
# each list starts with the destination directory name(s)
|
||||
# to make sure it's there
|
||||
|
||||
INSTALL_PROD= $(PROD:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS= $(LIBNAME_IOC:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_LIBS+= $(LIBNAME_HOST:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_SHRLIBS= $(SHRLIBNAME_IOC:%=$(INSTALL_SHRLIB)/%)
|
||||
INSTALL_SHRLIBS+= $(SHRLIBNAME_HOST:%=$(INSTALL_SHRLIB)/%)
|
||||
INSTALL_DLL_LINK_LIBS=$(DLL_LINK_LIBNAME_IOC:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_DLL_LINK_LIBS+=$(DLL_LINK_LIBNAME_HOST:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_TCLLIBS=$(TCLLIBNAME:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_TCLINDEX=$(TCLINDEX:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_SCRIPTS = $(SCRIPTS:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_OBJS = $(OBJS:%= $(INSTALL_BIN)/%)
|
||||
|
||||
INCREC +=$(RECTYPES) $(MENUS)
|
||||
INSTALL_INCREC = $(INCREC:%= $(INSTALL_INCLUDE)/%)
|
||||
INSTALL_MANS = $(foreach n, \
|
||||
$(MANLIST), $(MAN$(n):%= $(INSTALL_MAN)/man$(n)/%))
|
||||
INSTALL_DOCS = $(DOCS:%= $(INSTALL_DOC)/%)
|
||||
INSTALL_HTMLS = $(HTMLS:%= $(INSTALL_HTML)/$(HTMLS_DIR)/%)
|
||||
|
||||
INSTALL_TEMPLATE = $(addprefix $(INSTALL_TEMPLATES_SUBDIR)/, \
|
||||
$(subst $(CONFIG),top/configure,$(TEMPLATES)))
|
||||
INSTALL_CONFIGS = $(CONFIGS:%= $(INSTALL_CONFIG)/%)
|
||||
|
||||
INSTALL_BPTS = $(BPTS:%= $(INSTALL_DBD)/%)
|
||||
INSTALL_DBS = $(DBDINSTALL:%= $(INSTALL_DBD)/%)\
|
||||
$(RECTYPES:%.h= $(INSTALL_DBD)/%.dbd)\
|
||||
$(MENUS:%.h= $(INSTALL_DBD)/%.dbd)
|
||||
|
||||
INSTALL_DBDNAME = $(DBDNAME:%= $(INSTALL_DBD)/%)
|
||||
|
||||
INSTALL_INC += $(foreach inc,$(INC), \
|
||||
$(addprefix $(INSTALL_INCLUDE)/, \
|
||||
$(firstword \
|
||||
$(foreach dir,$(SRC_DIRS), \
|
||||
$(subst $(dir)/, , \
|
||||
$(wildcard \
|
||||
$(dir)/os/$(OS_CLASS)/$(inc) \
|
||||
$(dir)/$(inc)))) \
|
||||
$(subst ../, ,$(wildcard ../os/$(OS_CLASS)/$(inc) ../$(inc) )) \
|
||||
$(inc))))
|
||||
|
||||
|
||||
endif
|
||||
|
||||
@@ -28,30 +28,27 @@ ifndef HOST_ARCH
|
||||
HOST_ARCH=unsupported
|
||||
endif
|
||||
|
||||
# The architectures to build for
|
||||
# The architectures to build EPICS for
|
||||
#
|
||||
# Currently Supporting:
|
||||
# vxWorks-68040 (alias mv147, mv162, mv167)
|
||||
# vxWorks-68040lc (alias mv162lc)
|
||||
# vxWorks-ppc604 (alias ppc604)
|
||||
#
|
||||
# mv167
|
||||
# mv162
|
||||
# mv162lc
|
||||
# mv147
|
||||
# hkv2f
|
||||
# niCpu030
|
||||
# pc486
|
||||
# frc5ce
|
||||
# hkbaja47
|
||||
# niCpu030
|
||||
# pc486
|
||||
# frc5ce
|
||||
# hkbaja47
|
||||
#
|
||||
#CROSS_COMPILER_TARGET_ARCHS= vxWorks-68040
|
||||
CROSS_COMPILER_TARGET_ARCHS= mv167 ppc604
|
||||
CROSS_COMPILER_TARGET_ARCHS= vxWorks-68040
|
||||
CROSS_COMPILER_TARGET_ARCHS=vxWorks-68040
|
||||
|
||||
|
||||
# If only a subset of the host architectures perform
|
||||
# the build for the CROSS_COMPILER_TARGET_ARCHS
|
||||
# the build for the CROSS_COMPILER_TARGET_ARCHS
|
||||
# uncomment the following line and specify them.
|
||||
#
|
||||
#CROSS_COMPILER_HOST_ARCHS=sun4
|
||||
#CROSS_COMPILER_HOST_ARCHS=solaris
|
||||
#CROSS_COMPILER_HOST_ARCHS=hp700
|
||||
CROSS_COMPILER_HOST_ARCHS=solaris
|
||||
|
||||
# Client ANSI C Compiler (for Host builds)
|
||||
# GCC GNU (gcc -ansi)
|
||||
@@ -97,16 +94,16 @@ STATIC_BUILD=NO
|
||||
|
||||
# Host build optimization
|
||||
# must be either YES or NO
|
||||
Host_OPT=YES
|
||||
HOST_OPT=YES
|
||||
|
||||
# Ioc build optimization
|
||||
# must be either YES or NO
|
||||
Ioc_OPT=YES
|
||||
IOC_OPT=YES
|
||||
|
||||
# Generate Verbose Compiler Warnings for Host builds
|
||||
# must be either YES or NO
|
||||
Host_WARN=YES
|
||||
HOST_WARN=YES
|
||||
|
||||
# Generate Verbose Compiler Warnings for Ioc builds
|
||||
# must be either YES or NO
|
||||
Ioc_WARN=YES
|
||||
IOC_WARN=YES
|
||||
|
||||
@@ -6,5 +6,16 @@ TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
include $(TOP)/configure/RULES_ARCHS
|
||||
CONFIGS += $(subst ../,,$(wildcard ../CONFIG*))
|
||||
CONFIGS += $(subst ../,,$(wildcard ../os/CONFIG*))
|
||||
|
||||
CONFIGS += $(subst ../,,$(wildcard ../RELEASE*))
|
||||
CONFIGS += $(subst ../,,$(wildcard ../RULES*))
|
||||
|
||||
CONFIGS += $(subst ../,,$(wildcard ../tools/*.pl))
|
||||
CONFIGS += tools/installEpics
|
||||
|
||||
#####CONFIGS += tools/getrel
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
|
||||
# Tornado directory
|
||||
VX_DIR = /usr/local/vw/tornado101
|
||||
#VX_DIR = /usr/local/vw/tornado20
|
||||
|
||||
56
configure/RULES
Normal file
56
configure/RULES
Normal file
@@ -0,0 +1,56 @@
|
||||
# $Id$
|
||||
|
||||
ifndef T_A
|
||||
|
||||
all: install
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
ACTIONS = inc
|
||||
ACTIONS += build
|
||||
ACTIONS += install
|
||||
ACTIONS += buildInstall
|
||||
ACTIONS += depends
|
||||
ACTIONS += rebuild
|
||||
|
||||
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
||||
|
||||
actionArchTargets = $(foreach x, $(ACTIONS),\
|
||||
$(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
|
||||
|
||||
buildDirs = $(addprefix O.,$(BUILD_ARCHS))
|
||||
|
||||
$(actionArchTargets) : $(buildDirs)
|
||||
$(MAKE) -C O.$(archPart) -f ../Makefile TOP=$(TOP)/.. T_A=$(archPart) $(actionPart)
|
||||
|
||||
$(BUILD_ARCHS) : % : O.%
|
||||
$(MAKE) -C O.$@ -f ../Makefile TOP=$(TOP)/.. T_A=$@
|
||||
|
||||
$(ACTIONS):%: $(foreach arch, $(BUILD_ARCHS), %$(DIVIDER)$(arch))
|
||||
|
||||
$(buildDirs) :
|
||||
$(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/..
|
||||
|
||||
#
|
||||
# special clean rule
|
||||
#
|
||||
clean ::
|
||||
$(RMDIR) $(addsuffix *,$(addprefix O.,$(BUILD_ARCHS)))
|
||||
|
||||
clean$(DIVIDER)% ::
|
||||
$(RMDIR) O.$**
|
||||
|
||||
.PHONY : $(buildActionTargets)
|
||||
.PHONY : $(buildActionArchTargets)
|
||||
.PHONY : $(buildArchs)
|
||||
.PHONY : $(ACTIONS) clean all
|
||||
|
||||
|
||||
|
||||
else #T_A
|
||||
|
||||
include $(TOP)/configure/RULES_BUILD
|
||||
|
||||
endif # T_A defined
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
include $(CONFIG)/RULES_ARCHS
|
||||
ifdef T_A
|
||||
|
||||
MAKEBPT = $(EPICS_BASE_HOST_BIN)/makeBpt$(EXE)
|
||||
DBEXPAND = $(EPICS_BASE_HOST_BIN)/dbExpand$(EXE)
|
||||
MAKEBPT = $(EPICS_BASE_HOST_BIN)/makeBpt$(HOSTEXE)
|
||||
DBEXPAND = $(EPICS_BASE_HOST_BIN)/dbExpand$(HOSTEXE)
|
||||
DBST = dbst
|
||||
MAKEDBDEPENDS = $(PERL) $(TOP)/configure/makeDbDepends.pl
|
||||
REPLACEVAR = $(PERL) $(TOP)/configure/replaceVAR.pl
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# EPICS RULES_ARCH
|
||||
# by Matthew Needes and Mike Bordua and Janet Anderson and Jeff Hill
|
||||
#
|
||||
|
||||
ifndef T_A
|
||||
|
||||
all: install
|
||||
|
||||
rebuild: clean all
|
||||
all:: install
|
||||
|
||||
ACTIONS += inc
|
||||
ACTIONS += build
|
||||
@@ -18,34 +17,74 @@ ACTIONS += rebuild
|
||||
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
||||
|
||||
actionArchTargets = $(foreach x, $(ACTIONS),\
|
||||
$(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
|
||||
#
|
||||
# hostActionArchTargets
|
||||
#
|
||||
hostArchs = $(HOST_ARCHS)
|
||||
hostActionArchTargets = $(foreach x, $(ACTIONS),\
|
||||
$(foreach arch,$(hostArchs), $(x)$(DIVIDER)$(arch)))
|
||||
ifeq (Makefile.Host, $(wildcard Makefile.Host))
|
||||
hostDirs = $(addprefix O.,$(hostArchs))
|
||||
$(hostActionArchTargets) : $(hostDirs)
|
||||
$(MAKE) -C O.$(archPart) -f ../Makefile.Host TOP=$(TOP)/.. T_A=$(archPart) B_T=.Host $(actionPart)
|
||||
$(hostArchs) : % : O.%
|
||||
$(MAKE) -C O.$@ -f ../Makefile.Host TOP=$(TOP)/.. T_A=$@ B_T=.Host
|
||||
else
|
||||
$(hostActionArchTargets) :
|
||||
$(hostArchs) :
|
||||
endif
|
||||
|
||||
#
|
||||
# iocActionArchTargets
|
||||
#
|
||||
iocArchs = $(IOC_ARCHS)
|
||||
iocActionArchTargets = $(foreach x, $(ACTIONS), \
|
||||
$(foreach arch, $(iocArchs), $(x)$(DIVIDER)$(arch)))
|
||||
ifeq (Makefile.Ioc, $(wildcard Makefile.Ioc))
|
||||
iocDirs = $(addprefix O.,$(iocArchs))
|
||||
$(iocActionArchTargets) : $(iocDirs)
|
||||
$(MAKE) -C O.$(archPart) -f ../Makefile.Ioc TOP=$(TOP)/.. T_A=$(archPart) B_T=.Ioc $(actionPart)
|
||||
$(iocArchs) : % : O.%
|
||||
$(MAKE) -C O.$@ -f ../Makefile.Ioc TOP=$(TOP)/.. T_A=$@ B_T=.Ioc
|
||||
else
|
||||
$(iocActionArchTargets) :
|
||||
$(iocArchs) :
|
||||
endif
|
||||
|
||||
$(hostDirs) :
|
||||
$(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/.. .Host
|
||||
|
||||
$(iocDirs) :
|
||||
$(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/.. .Ioc
|
||||
|
||||
#
|
||||
# host/ioc action targets
|
||||
#
|
||||
$(ACTIONS) :: % : %$(DIVIDER)host %$(DIVIDER)ioc
|
||||
HostActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)host)
|
||||
IocActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)ioc)
|
||||
$(HostActionTargets) : %$(DIVIDER)host : $(addprefix %$(DIVIDER), $(hostArchs))
|
||||
$(IocActionTargets) : %$(DIVIDER)ioc : $(addprefix %$(DIVIDER), $(iocArchs))
|
||||
|
||||
|
||||
$(actionArchTargets) :
|
||||
$(MAKE) -f Makefile T_A=$(archPart) $(actionPart)
|
||||
|
||||
$(BUILD_ARCHS) : % :
|
||||
$(MAKE) -f Makefile T_A=$@
|
||||
|
||||
$(ACTIONS):%: $(foreach arch, $(BUILD_ARCHS), %$(DIVIDER)$(arch))
|
||||
#
|
||||
# arch targets
|
||||
#
|
||||
host : $(hostArchs)
|
||||
ioc : $(iocArchs)
|
||||
|
||||
#
|
||||
# special clean rule
|
||||
#
|
||||
clean ::
|
||||
$(RMDIR) $(addsuffix *,$(addprefix O.,$(BUILD_ARCHS)))
|
||||
$(RMDIR) $(hostDirs) $(iocDirs)
|
||||
clean$(DIVIDER)% :
|
||||
$(RMDIR) O.$*
|
||||
|
||||
clean$(DIVIDER)% ::
|
||||
$(RMDIR) O.$**
|
||||
.PHONY :: $(HostActionTargets)
|
||||
.PHONY :: $(IocActionTargets)
|
||||
.PHONY :: $(iocActionArchTargets)
|
||||
.PHONY :: $(hostActionArchTargets)
|
||||
.PHONY :: $(hostArchs) $(iocArchs)
|
||||
.PHONY :: $(ACTIONS) clean all host ioc
|
||||
|
||||
.PHONY : $(buildActionTargets)
|
||||
.PHONY : $(buildActionArchTargets)
|
||||
.PHONY : $(buildArchs)
|
||||
.PHONY : $(ACTIONS) clean all
|
||||
|
||||
else #T_A
|
||||
ifndef B_T
|
||||
include $(CONFIG)/RULES_BUILD_TYPE
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -30,309 +30,94 @@
|
||||
|
||||
|
||||
ifdef T_A
|
||||
ifdef B_T
|
||||
|
||||
vpath %.c $(USER_VPATH) $(OS_SRC_DIRS) .. .
|
||||
vpath %.cc $(USER_VPATH) $(OS_SRC_DIRS) .. .
|
||||
vpath %.cpp $(USER_VPATH) $(OS_SRC_DIRS) .. .
|
||||
vpath %.C $(USER_VPATH) $(OS_SRC_DIRS) .. .
|
||||
vpath %.rc $(USER_VPATH)$(OS_SRC_DIRS) .. .
|
||||
vpath %.h $(USER_VPATH) $(SRC_DIRS) .. .
|
||||
# This prevents base/src/include/*.h from being installed. Why??
|
||||
#vpath %.h ../os/$(OS_CLASS)
|
||||
|
||||
# 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>
|
||||
#
|
||||
# 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
|
||||
# LIBSRCS source files for building library
|
||||
# PROD_LIBS EPICS libs needed by PROD and TESTPROD
|
||||
# USR_LIBS NONEPICS 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_$(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
|
||||
include $(TOP)/configure/CONFIG_ADDONS
|
||||
|
||||
ifneq ($(strip $(USR_CXXFLAGS_$(OS_CLASS))),)
|
||||
USR_CXXFLAGS+=$(subst -nil-,,$(USR_CXXFLAGS_$(OS_CLASS)))
|
||||
#---------------------------------------------------------------
|
||||
# Set opt and warn
|
||||
ifeq ($(HOST_ARCH),$(T_A))
|
||||
OPT=$(HOST_OPT)
|
||||
WARN=$(HOST_WARN)
|
||||
else
|
||||
ifdef USR_CXXFLAGS_DEFAULT
|
||||
USR_CXXFLAGS+=$(USR_CXXFLAGS_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 $(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 $(LIBRARY_$(OS_CLASS))),)
|
||||
LIBRARY+=$(subst -nil-,,$(LIBRARY_$(OS_CLASS)))
|
||||
else
|
||||
ifneq (,$(LIBRARY_DEFAULT))
|
||||
#ifdef LIBRARY_DEFAULT
|
||||
LIBRARY+=$(LIBRARY_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 $(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
|
||||
ifdef PROD_DEFAULT
|
||||
PROD += $(PROD_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(PRODMT_$(OS_CLASS))),)
|
||||
PRODMT += $(subst -nil-,,$(PRODMT_$(OS_CLASS)))
|
||||
else
|
||||
ifdef PRODMT_DEFAULT
|
||||
PRODMT += $(PRODMT_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
|
||||
|
||||
#
|
||||
# concat specific resource files
|
||||
#
|
||||
ifneq ($(strip $(RCS_$(OS_CLASS))),)
|
||||
RCS += $(subst -nil-,,$(RCS_$(OS_CLASS)))
|
||||
else
|
||||
ifdef RCS_DEFAULT
|
||||
RCS += $(RCS_DEFAULT)
|
||||
endif
|
||||
OPT=$(CROSS_OPT)
|
||||
WARN=$(CROSS_WARN)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
## LIBSRCS and LIBOBJS for LIBRARY
|
||||
|
||||
LIBSRCS += $($(addsuffix _SRCS,$(LIBRARY)))
|
||||
|
||||
ifneq ($(foreach lib,$(LIBRARY),$($(lib)_SRCS_$(OS_CLASS))),)
|
||||
LIBSRCS += $(subst -nil-,,$($(addsuffix _SRCS_$(OS_CLASS),$(LIBRARY))))
|
||||
else
|
||||
LIBSRCS += $($(addsuffix _SRCS_DEFAULT,$(LIBRARY)))
|
||||
endif
|
||||
|
||||
# adjust object names for library contents
|
||||
#
|
||||
ifdef LIBSRCS
|
||||
LIBOBJS += $(addsuffix $(OBJ), $(basename $(LIBSRCS)))
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
PROD := $(addsuffix $(EXE),$(PROD))
|
||||
TESTPROD := $(addsuffix $(EXE),$(TESTPROD))
|
||||
TARGETS := $(addsuffix $(EXE),$(TARGETS))
|
||||
|
||||
LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS)
|
||||
##PROD := $(addsuffix $(EXE),$(PROD))
|
||||
##TESTPROD := $(addsuffix $(EXE),$(TESTPROD))
|
||||
|
||||
LIBTARGETS += $(LIBNAME_HOST) $(LIBNAME_IOC) $(INSTALL_LIBS)
|
||||
ifeq ($(strip $(SHARED_LIBRARIES)),YES)
|
||||
LIBTARGETS += $(SHRLIBNAME) $(INSTALL_SHRLIBS) $(INSTALL_DLL_LINK_LIBS)
|
||||
LIBTARGETS += $(SHRLIBNAME_HOST) $(SHRLIBNAME_IOC) $(INSTALL_SHRLIBS) $(INSTALL_DLL_LINK_LIBS)
|
||||
endif # SHARED_LIBRARIES=YES
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# ----------------------------------------------------
|
||||
# create names (lists) for installed things
|
||||
# ----------------------------------------------------
|
||||
# Set PROD, OBJS, LIB_HOST, and LIB_IOC
|
||||
|
||||
# each list starts with the destination directory name(s)
|
||||
# to make sure it's there
|
||||
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
|
||||
PROD += $(PROD_HOST)
|
||||
LIB_HOST += $(LIB) $(LIBRARY)
|
||||
OBJS += $(OBJS_HOST)
|
||||
else
|
||||
# PROD and TESTPROD not built for ioc only builds
|
||||
PROD =
|
||||
TESTPROD =
|
||||
LIB_IOC += $(LIB) $(LIBRARY)
|
||||
endif
|
||||
|
||||
ifeq ($(findstring Ioc,$(VALID_BUILDS)),Ioc)
|
||||
OBJS += $(OBJS_IOC)
|
||||
endif
|
||||
#---------------------------------------------------------------
|
||||
|
||||
INCREC +=$(RECTYPES) $(MENUS)
|
||||
|
||||
INSTALL_PROD= $(PROD:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS= $(LIBNAME:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_SHRLIBS= $(SHRLIBNAME:%=$(INSTALL_SHRLIB)/%)
|
||||
INSTALL_DLL_LINK_LIBS=$(DLL_LINK_LIBNAME:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_TCLLIBS=$(TCLLIBNAME:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_TCLINDEX=$(TCLINDEX:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_SCRIPTS = $(SCRIPTS:%= $(INSTALL_BIN)/%)
|
||||
|
||||
INSTALL_INCREC = $(INCREC:%= $(INSTALL_INCLUDE)/%)
|
||||
MANLIST = 1 2 3 4 5 6 7 8 9
|
||||
INSTALL_MANS = $(foreach n, \
|
||||
$(MANLIST), $(MAN$(n):%= $(INSTALL_MAN)/man$(n)/%))
|
||||
INSTALL_DOCS = $(DOCS:%= $(INSTALL_DOC)/%)
|
||||
INSTALL_HTMLS = $(HTMLS:%= $(INSTALL_HTML)/$(HTMLS_DIR)/%)
|
||||
ifdef TEMPLATES_DIR
|
||||
INSTALL_TEMPLATES_SUBDIR = $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
else
|
||||
INSTALL_TEMPLATES_SUBDIR = $(INSTALL_TEMPLATES)
|
||||
endif
|
||||
INSTALL_TEMPLATE = $(addprefix $(INSTALL_TEMPLATES_SUBDIR)/, \
|
||||
$(subst $(CONFIG),top/configure,$(TEMPLATES)))
|
||||
INSTALL_CONFIGS = $(CONFIGS:%= $(INSTALL_CONFIG)/%)
|
||||
|
||||
INSTALL_BPTS = $(BPTS:%= $(INSTALL_DBD)/%)
|
||||
INSTALL_DBS = $(DBDINSTALL:%= $(INSTALL_DBD)/%)\
|
||||
$(RECTYPES:%.h= $(INSTALL_DBD)/%.dbd)\
|
||||
$(MENUS:%.h= $(INSTALL_DBD)/%.dbd)
|
||||
|
||||
INSTALL_DBDNAME = $(DBDNAME:%= $(INSTALL_DBD)/%)
|
||||
|
||||
INSTALL_INC += $(foreach inc,$(INC), \
|
||||
$(addprefix $(INSTALL_INCLUDE)/, \
|
||||
$(firstword \
|
||||
$(foreach dir,$(SRC_DIRS), \
|
||||
$(subst $(dir)/, , \
|
||||
$(wildcard \
|
||||
$(dir)/os/$(OS_CLASS)$(B_T_SUFFIX)/$(inc) \
|
||||
$(dir)/os/posix$(B_T_SUFFIX)/$(inc) \
|
||||
$(dir)/os/$(OS_CLASS)/$(inc) \
|
||||
$(dir)/os/posix/$(inc) \
|
||||
$(dir)/generic$(B_T_SUFFIX)/$(inc) \
|
||||
$(dir)/generic/$(inc) \
|
||||
$(dir)/$(inc)))) \
|
||||
$(subst ../, ,$(wildcard ../$(inc) ../os/$(OS_CLASS)/$(inc))) \
|
||||
$(inc))))
|
||||
|
||||
MAN_DIRECTORY_TARGETS = $(foreach n, $(MANLIST),$(INSTALL_MAN)/man$(n))
|
||||
#---------------------------------------------------------------
|
||||
# must use c++ linker if linking to shared libs with c++ code
|
||||
#ifeq ($(strip $(SHARED_LIBRARIES)),YES)
|
||||
ifneq ($(strip $(CPLUSPLUS)),)
|
||||
LINK.c = $(LINK.cc)
|
||||
endif # CPLUSPLUS
|
||||
#endif # SHARED_LIBRARIES
|
||||
LINK.c = $(LINK.cpp)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Libraries
|
||||
# Libraries_HOST
|
||||
#
|
||||
# if there are no objects LIBOBJS to include
|
||||
# in this library (may be for e.g. base/src/libCompat
|
||||
# on some archs), don't define (and build) any library!
|
||||
# if there are no objects LIBOBJS_HOST to include
|
||||
# in this library (may be for e.g. base/src/libCompat
|
||||
# on some archs), don't define (and build) any library!
|
||||
|
||||
# LIBRARY
|
||||
# LIB_HOST
|
||||
|
||||
ifdef LIBRARY
|
||||
ifdef LIB_HOST
|
||||
CFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
CXXFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
SHRLIB_LINKER = $(CXX)
|
||||
LIB_SRCS=$(LIBRARY_SRCS) $($(basename $(LIBRARY))_SRCS)
|
||||
LIBRARY_OBJS+=$(addsuffix $(OBJ), $(basename $(LIB_SRCS)))
|
||||
endif # LIBRARY
|
||||
LIBSRCS_HOST+=$(SRCS) $(LIBSRCS) $($(basename $(LIB_HOST))_SRCS)
|
||||
ifneq ($(foreach lib,$(LIB_HOST),$($(lib)_SRCS_$(OS_CLASS))),)
|
||||
LIBSRCS_HOST += $(subst -nil-,,$($(addsuffix _SRCS_$(OS_CLASS),$(LIB_HOST))))
|
||||
else
|
||||
LIBSRCS_HOST += $($(addsuffix _SRCS_DEFAULT,$(LIB_HOST)))
|
||||
endif
|
||||
LIBOBJS_HOST+=$(addsuffix $(OBJ), $(basename $(LIBSRCS_HOST)))
|
||||
endif # LIB_HOST
|
||||
|
||||
|
||||
ifdef LIBNAME
|
||||
ifdef LIBOBJS
|
||||
ifdef LIBNAME_HOST
|
||||
ifdef LIBOBJS_HOST
|
||||
CFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
CXXFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
|
||||
@@ -340,16 +125,50 @@ CXXFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
ifeq ($(strip $(SHARED_LIBRARIES)),YES)
|
||||
|
||||
PROD_VERSION =$(SHRLIB_VERSION)
|
||||
ifeq ($(findstring cc,$(suffix $(LIBSRCS))),cc)
|
||||
SHRLIB_LINKER = $(CXX)
|
||||
else
|
||||
SHRLIB_LINKER = $(CC)
|
||||
endif
|
||||
|
||||
endif # SHARED_LIBRARIES=YES
|
||||
|
||||
endif # LIBOBJS
|
||||
endif # LIBNAME
|
||||
endif # LIBOBJS_HOST
|
||||
endif # LIBNAME_HOST
|
||||
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Libraries_IOC
|
||||
#
|
||||
# if there are no objects LIBOBJS_IOC to include
|
||||
# in this library (may be for e.g. base/src/libCompat
|
||||
# on some archs), don't define (and build) any library!
|
||||
|
||||
# LIB_IOC
|
||||
|
||||
ifdef LIB_IOC
|
||||
CFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
CXXFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
SHRLIB_LINKER = $(CXX)
|
||||
LIBSRCS_IOC+= $(SRCS) $(LIBSRCS) $($(basename $(LIB_IOC))_SRCS)
|
||||
ifneq ($(foreach lib,$(LIB_IOC),$($(lib)_SRCS_$(OS_CLASS))),)
|
||||
LIBSRCS_IOC += $(subst -nil-,,$($(addsuffix _SRCS_$(OS_CLASS),$(LIB_IOC))))
|
||||
else
|
||||
LIBSRCS_IOC += $($(addsuffix _SRCS_DEFAULT,$(LIB_IOC)))
|
||||
endif
|
||||
LIBOBJS_IOC+=$(addsuffix $(OBJ), $(basename $(LIBSRCS_IOC))) $(LIBOBJS)
|
||||
endif # LIB_IOC
|
||||
|
||||
|
||||
ifdef LIBNAME_IOC
|
||||
ifdef LIBOBJS_IOC
|
||||
CFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
CXXFLAGS += $($(ANSI)_SHRLIB_CFLAGS_YES)
|
||||
|
||||
# check if shared libraries requested
|
||||
ifeq ($(strip $(SHARED_LIBRARIES)),YES)
|
||||
|
||||
PROD_VERSION =$(SHRLIB_VERSION)
|
||||
|
||||
endif # SHARED_LIBRARIES=YES
|
||||
|
||||
endif # LIBOBJS_IOC
|
||||
endif # LIBNAME_IOC
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Main targets
|
||||
@@ -364,7 +183,7 @@ build : inc
|
||||
|
||||
rebuild: clean install
|
||||
|
||||
inc: $(INSTALL_INC)
|
||||
inc: $(INSTALL_INC) $(INSTALL_OSINC)
|
||||
|
||||
build: $(LIBTARGETS) $(PROD) $(TESTPROD) $(TARGETS) \
|
||||
$(MENUS) $(RECTYPES) $(BPTS)
|
||||
@@ -376,6 +195,7 @@ endif
|
||||
buildInstall : \
|
||||
$(INSTALL_SCRIPTS) $(INSTALL_PROD) \
|
||||
$(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) \
|
||||
$(INSTALL_OBJS) \
|
||||
$(INSTALL_MANS) \
|
||||
$(INSTALL_DOCS) \
|
||||
$(INSTALL_HTMLS) \
|
||||
@@ -390,11 +210,12 @@ endif
|
||||
|
||||
clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) *.i *$(OBJ) *.a $(PROD) $(TESTPROD) $(LIBNAME) $(SHRLIBNAME) \
|
||||
@$(RM) *.i *$(OBJ) *.a $(PROD) $(TESTPROD) $(LIBNAME_IOC)\
|
||||
$(LIBNAME_HOST) $(SHRLIBNAME_IOC) $(SHRLIBNAME_HOST)\
|
||||
$(INC) *$(RES) $(TARGETS) $(DBDINSTALL) $(MENUS) $(RECTYPES) $(BPTS) \
|
||||
$(DBDNAME) *.out
|
||||
ifdef BAF
|
||||
@$(RM) $(PROD_BAF) $(LIB_BAF) *$(BOF)
|
||||
@$(RM) $(PROD_BAF) $(LIB_BAF_IOC) $(LIB_BAF_HOST) *$(BOF)
|
||||
endif
|
||||
ifdef DBDEXPAND
|
||||
@$(RM) $(DBDNAME)
|
||||
@@ -405,14 +226,13 @@ endif
|
||||
# WIN95/NT source browser
|
||||
#ifdef BAF
|
||||
PROD_BAF = $(addsuffix $(BAF), $(basename $(PROD)))
|
||||
LIB_BAF = $(addsuffix $(BAF), $(basename $(LIBRARY)))
|
||||
browse: $(LIB_BAF) $(PROD_BAF)
|
||||
LIB_BAF_IOC = $(addsuffix $(BAF), $(basename $(LIB_IOC)))
|
||||
LIB_BAF_HOST = $(addsuffix $(BAF), $(basename $(LIB_HOST)))
|
||||
browse: $(LIB_BAF_IOC) $(LIB_BAF_HOST) $(PROD_BAF)
|
||||
#endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
|
||||
DIRECTORY_TARGETS += $(INSTALL_DBD) $(INSTALL_INCLUDE)
|
||||
|
||||
$(DIRECTORY_TARGETS) :
|
||||
$(MKDIR) -p $@
|
||||
|
||||
@@ -448,11 +268,7 @@ $(PRODNAME): $(PROD_DEPLIBS) $(PRODNAME_DEPLIBS)
|
||||
|
||||
ifdef PRODNAME_SRCS
|
||||
|
||||
ifeq ($(findstring cc,$(suffix $(PRODNAME_SRCS))),cc)
|
||||
PRODNAME_LINKER = $(LINK.cc)
|
||||
else
|
||||
PRODNAME_LINKER = $(LINK.c)
|
||||
endif
|
||||
PRODNAME_LINKER = $(LINK.cpp)
|
||||
|
||||
PRODNAME_OBJS=$(addsuffix $(OBJ), $(basename $(PRODNAME_SRCS)))
|
||||
PRODNAME_RESS=$(addsuffix $(RES), $(basename $(PRODNAME_RCS)))
|
||||
@@ -487,7 +303,7 @@ PROD_OBJS=$(addsuffix $(OBJ), $(basename $(SRCS) $(COND_PROD_SRCS)))
|
||||
|
||||
PROD_RESS=$(addsuffix $(RES), $(basename $(RCS) $(COND_PROD_RCS)))
|
||||
|
||||
PROD_MAKE_COMMAND=$(MAKE) -f ../Makefile.$(B_T) T_A=$(T_A) B_T=$(B_T) $@\
|
||||
PROD_MAKE_COMMAND=$(MAKE) -f ../Makefile$(B_T) TOP=$(TOP) T_A=$(T_A) $@\
|
||||
PRODNAME=$(addsuffix $(EXE), $(basename $@))\
|
||||
PRODNAME_SRCS="$(SRCS) $($(basename $@)_SRCS)"\
|
||||
PRODNAME_SRCS_DEFAULT="$($(basename $@)_SRCS_DEFAULT)"\
|
||||
@@ -513,62 +329,6 @@ endif
|
||||
endif # PRODNAME notdefined
|
||||
endif # PROD defined
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Java classes and packages
|
||||
#
|
||||
|
||||
ifdef JAVA
|
||||
|
||||
INSTALL_JAVA = $(INSTALL_LOCATION)/javalib
|
||||
DIRECTORY_TARGETS += $(INSTALL_JAVA)
|
||||
ifdef PACKAGE
|
||||
DIRECTORY_TARGETS += $(INSTALL_JAVA)/$(PACKAGE)
|
||||
endif #ifdef PACKAGE
|
||||
|
||||
vpath %.class $(INSTALL_JAVA)/$(PACKAGE)
|
||||
|
||||
CLASSES += $(subst .java,.class,$(JAVA))
|
||||
TESTCLASSES += $(subst .java,.class,$(TESTJAVA))
|
||||
INSTALL_CLASSES =$(CLASSES:%=$(INSTALL_JAVA)/$(PACKAGE)/%)
|
||||
INSTALL_JAR =$(JAR:%=$(INSTALL_JAVA)/%)
|
||||
|
||||
JAR_OPTIONS = cvf
|
||||
ifdef MANIFEST
|
||||
JAR_OPTIONS = cvmf
|
||||
endif
|
||||
JAR_DEPFILES += $(wildcard $(JAR_INPUT) $(addsuffix /*,$(JAR_INPUT)))
|
||||
|
||||
$(DIRECTORY_TARGETS) :
|
||||
# $(MKDIR) -p $@
|
||||
|
||||
build: $(TESTCLASSES) $(JAR)
|
||||
|
||||
buildInstall : $(DIRECTORY_TARGETS) $(INSTALL_CLASSES) $(INSTALL_JAR)
|
||||
|
||||
clean::
|
||||
@$(RM) $(TESTCLASSES) $(JAR)
|
||||
|
||||
%.class:%.java
|
||||
@echo Creating java class file $@
|
||||
$(RM) $@
|
||||
$(JAVACCMD) $<
|
||||
|
||||
$(INSTALL_JAVA)/$(PACKAGE)/%.class:%.java
|
||||
@echo Creating java class file $@
|
||||
@$(RM) $@
|
||||
$(JAVACCMD) -d $(INSTALL_JAVA) $<
|
||||
|
||||
$(JAR):%.jar: $(JAR_DEPFILES)
|
||||
@echo Creating java jar file $@
|
||||
@$(RM) $@
|
||||
$(JARCMD)
|
||||
|
||||
$(INSTALL_JAVA)/%.jar: %.jar
|
||||
@echo "Installing jar file $@"
|
||||
$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
endif #ifdef JAVA
|
||||
|
||||
#---------------------------------------------------------------
|
||||
#---------------------------------------------------------------
|
||||
# Generic Rules for 'simple' targets that
|
||||
@@ -578,14 +338,14 @@ endif #ifdef JAVA
|
||||
# do not work because the $(OBJ)->$(EXE) rule wouldn't
|
||||
# know if the original source was C or C++.
|
||||
#
|
||||
# Hint: The $(subst...) construct removes the .c or .cc
|
||||
# Hint: The $(subst...) construct removes the .c or .cpp
|
||||
# as well as the '../' from the filename and adds $(OBJ):
|
||||
# e.g. $< = '../abc.c' -> 'abc.o'
|
||||
#
|
||||
# The order of the following rules is
|
||||
# VERY IMPORTANT !!!!
|
||||
|
||||
depends: $(LIBSRCS) $(LIBSRCS) $(SRCS) $(COND_PROD_SRCS)
|
||||
depends: $(LIBSRCS_IOC) $(LIBSRCS_HOST) $(SRCS) $(COND_PROD_SRCS)
|
||||
$(RM) DEPENDS
|
||||
touch DEPENDS
|
||||
$(DEPENDS_RULE)
|
||||
@@ -595,15 +355,20 @@ depends: $(LIBSRCS) $(LIBSRCS) $(SRCS) $(COND_PROD_SRCS)
|
||||
$(COMPILE.c) $<
|
||||
$(LINK.c) $(notdir $(basename $<))$(OBJ) $(LDLIBS)
|
||||
|
||||
%$(EXE): %.cpp
|
||||
@$(RM) $@
|
||||
$(COMPILE.cpp) $<
|
||||
$(LINK.cpp) $(notdir $(basename $<))$(OBJ) $(LDLIBS)
|
||||
|
||||
%$(EXE): %.cc
|
||||
@$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
$(LINK.cc) $(notdir $(basename $<))$(OBJ) $(LDLIBS)
|
||||
$(COMPILE.cpp) $<
|
||||
$(LINK.cpp) $(notdir $(basename $<))$(OBJ) $(LDLIBS)
|
||||
|
||||
%$(EXE): %.3
|
||||
@$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
$(LINK.cc) $(notdir ,$(basename $<))$(OBJ) $(LDLIBS)
|
||||
$(COMPILE.cpp) $<
|
||||
$(LINK.cpp) $(notdir ,$(basename $<))$(OBJ) $(LDLIBS)
|
||||
|
||||
# C++ munching for VxWorks
|
||||
%.out : %.o
|
||||
@@ -620,11 +385,15 @@ depends: $(LIBSRCS) $(LIBSRCS) $(SRCS) $(COND_PROD_SRCS)
|
||||
|
||||
%$(OBJ): %.cc
|
||||
@$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
$(COMPILE.cpp) $<
|
||||
|
||||
%$(OBJ): %.cpp
|
||||
@$(RM) $@
|
||||
$(COMPILE.cpp) $<
|
||||
|
||||
%$(OBJ): %.C
|
||||
@$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
$(COMPILE.cpp) $<
|
||||
|
||||
# WIN95/NT resource compiler
|
||||
%$(RES): %.rc
|
||||
@@ -741,26 +510,44 @@ endif
|
||||
|
||||
# WIN95/NT source browser
|
||||
ifdef BAF
|
||||
$(LIB_BAF): $(addsuffix $(BOF), $(basename $(LIBSRCS)))
|
||||
$(LIB_BAF_IOC): $(addsuffix $(BOF), $(basename $(LIBSRCS_IOC)))
|
||||
@echo "Building source browser archive $@"
|
||||
@$(RM) $@
|
||||
$(BAFCMD) $^
|
||||
|
||||
ifdef LIB_BAF_HOST
|
||||
$(LIB_BAF_HOST): $(addsuffix $(BOF), $(basename $(LIBSRCS_HOST)))
|
||||
@echo "Building source browser archive $@"
|
||||
@$(RM) $@
|
||||
$(BAFCMD) $^
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(wildcard ../baseLIBOBJS))
|
||||
$(LIBNAME): ../baseLIBOBJS
|
||||
$(LIBNAME_IOC): ../baseLIBOBJS
|
||||
endif
|
||||
|
||||
# rule for lib (archive of object files) creation
|
||||
$(LIBNAME): $(LIBOBJS)
|
||||
$(LIBNAME_IOC): $(LIBOBJS_IOC)
|
||||
$(RM) $@
|
||||
$(ARCMD) $(LIBOBJS)
|
||||
$(ARCMD) $(LIBOBJS_IOC)
|
||||
ifneq ($(RANLIB)xx,xx)
|
||||
$(RANLIB) $@;
|
||||
endif # RANLIB
|
||||
|
||||
$(DLL_LINK_LIBNAME) $(SHRLIBNAME): $(LIBOBJS)
|
||||
$(LINK.shrlib) $(LIBOBJS) $(DLL_LDLIBS)
|
||||
$(DLL_LINK_LIBNAME_IOC) $(SHRLIBNAME_IOC): $(LIBOBJS_IOC)
|
||||
$(LINK.shrlib) $(LIBOBJS_IOC) $(DLL_LDLIBS_IOC)
|
||||
|
||||
# rule for lib (archive of object files) creation
|
||||
$(LIBNAME_HOST): $(LIBOBJS_HOST)
|
||||
$(RM) $@
|
||||
$(ARCMD) $(LIBOBJS_HOST)
|
||||
ifneq ($(RANLIB)xx,xx)
|
||||
$(RANLIB) $@;
|
||||
endif # RANLIB
|
||||
|
||||
$(DLL_LINK_LIBNAME_HOST) $(SHRLIBNAME_HOST): $(LIBOBJS_HOST)
|
||||
$(LINK.shrlib) $(LIBOBJS_HOST) $(DLL_LDLIBS_HOST)
|
||||
|
||||
binInstalls: $(BIN_INSTALLS)
|
||||
@echo "Installing $(^F)"
|
||||
@@ -868,7 +655,6 @@ else
|
||||
$(DBDNAME): $(RECTYPES:%.h=../%.dbd)
|
||||
endif
|
||||
|
||||
endif # B_T defined
|
||||
endif # T_A defined
|
||||
|
||||
# EOF RULES.Host
|
||||
|
||||
58
configure/RULES_JAVA
Normal file
58
configure/RULES_JAVA
Normal file
@@ -0,0 +1,58 @@
|
||||
# $Id$
|
||||
#
|
||||
#---------------------------------------------------------------
|
||||
# Java classes and packages
|
||||
#
|
||||
|
||||
ifdef JAVA
|
||||
|
||||
INSTALL_JAVA = $(INSTALL_LOCATION)/javalib
|
||||
DIRECTORY_TARGETS += $(INSTALL_JAVA)
|
||||
ifdef PACKAGE
|
||||
DIRECTORY_TARGETS += $(INSTALL_JAVA)/$(PACKAGE)
|
||||
endif #ifdef PACKAGE
|
||||
|
||||
vpath %.class $(INSTALL_JAVA)/$(PACKAGE)
|
||||
|
||||
CLASSES += $(subst .java,.class,$(JAVA))
|
||||
TESTCLASSES += $(subst .java,.class,$(TESTJAVA))
|
||||
INSTALL_CLASSES =$(CLASSES:%=$(INSTALL_JAVA)/$(PACKAGE)/%)
|
||||
INSTALL_JAR =$(JAR:%=$(INSTALL_JAVA)/%)
|
||||
|
||||
JAR_OPTIONS = cvf
|
||||
ifdef MANIFEST
|
||||
JAR_OPTIONS = cvmf
|
||||
endif
|
||||
JAR_DEPFILES += $(wildcard $(JAR_INPUT) $(addsuffix /*,$(JAR_INPUT)))
|
||||
|
||||
$(DIRECTORY_TARGETS) :
|
||||
# $(MKDIR) -p $@
|
||||
|
||||
build: $(TESTCLASSES) $(JAR)
|
||||
|
||||
buildInstall : $(DIRECTORY_TARGETS) $(INSTALL_CLASSES) $(INSTALL_JAR)
|
||||
|
||||
clean::
|
||||
@$(RM) $(TESTCLASSES) $(JAR)
|
||||
|
||||
%.class:%.java
|
||||
@echo Creating java class file $@
|
||||
$(RM) $@
|
||||
$(JAVACCMD) $<
|
||||
|
||||
$(INSTALL_JAVA)/$(PACKAGE)/%.class:%.java
|
||||
@echo Creating java class file $@
|
||||
@$(RM) $@
|
||||
$(JAVACCMD) -d $(INSTALL_JAVA) $<
|
||||
|
||||
$(JAR):%.jar: $(JAR_DEPFILES)
|
||||
@echo Creating java jar file $@
|
||||
@$(RM) $@
|
||||
$(JARCMD)
|
||||
|
||||
$(INSTALL_JAVA)/%.jar: %.jar
|
||||
@echo "Installing jar file $@"
|
||||
$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
endif #ifdef JAVA
|
||||
|
||||
@@ -34,13 +34,13 @@ USR_CFLAGS_SYSV = -nil-
|
||||
# .. for all other arch classes:
|
||||
USR_CFLAGS_DEFAULT = -DVERSION='generic Unix'
|
||||
|
||||
# CFLAGS that are only used to compile a_file.c or a_file.cc:
|
||||
# CFLAGS that are only used to compile a_file.c or a_file.cpp:
|
||||
#
|
||||
a_file_CFLAGS = -DIN_A_FILE
|
||||
a_file_CFLAGS_WIN32 = -DVERSION='WIN32 port'
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# general rule for all .c .cc .h .hh files and scripts:
|
||||
# general rule for all .c .cpp .h .hh files and scripts:
|
||||
#
|
||||
# In here you supply just the filename without '../' etc.
|
||||
# While building in an O.xxx subdir, the
|
||||
@@ -82,7 +82,7 @@ INC = file.h
|
||||
# .
|
||||
# So usually only LIBSRCS should be sufficient!
|
||||
#
|
||||
LIBSRCS = file_for_lib.c another_file.cc
|
||||
LIBSRCS = file_for_lib.c another_file.cpp
|
||||
LIBSRCS_DEFAULT = posix.c
|
||||
LIBSRCS_WIN32 = win32_special.c
|
||||
LIBSRCS_BSD = -nil-
|
||||
|
||||
Reference in New Issue
Block a user