original files of m241

This commit is contained in:
neelimap
2026-07-30 11:19:44 +05:30
parent 170c2b3f3a
commit afc7070c1f
12254 changed files with 7655111 additions and 0 deletions
@@ -0,0 +1,48 @@
# defs.default - Core IP (coreIP) specific default make defines.
#
# Copyright 1996-2004 Wind River Systems, Inc.
#
# # modification history
# --------------------
# 00e,19oct04,tf Add -DWRS_IPSEC option if FEATURE_COREIP_IPSEC is set to
# true (BaseMSP-B0336).
# 00d,11sep04,tf Add -DINCLUDE_IPFW_HOOKS option if FEATURE_COREIP_IPFW_HOOKS is
# set to true (BaseMSP-B0146). Also commented out lines for
# FEATURE_COREIP_VIRTUAL and FEATURE_COREIP_IPV6. Replaced
# ADDED_CFLAGS with EXTRA_DEFINE.
# 00c,18apr04,tf Removed FEATURE_COREIP_IPV6 conditional; used 'override'
# instead of 'export' to extend ADDED_CFLAGS variable.
# 00b,30apr04,blc Created macros for ROUTER and IPV6.
# 00a,03mar04,tf Created.
#
# DESCRIPTION
# This file defines any macros that are used in configuring coreIp for specific
# features. A given feature that includes coreIp needs to set the appropriate
# deature macro to 'true' so that coreIp is configured for that feature. This
# is done in $TGT_DIR)/h/make/config/featureSet/$(FEATURE_SET)/defs.defaults.
#
TGT_DIR=$(WIND_BASE)/target
ifeq ($(EXTRA_DEFINE),)
export EXTRA_DEFINE =
endif
ifeq ($(FEATURE_COREIP_IPFW_HOOKS),true)
override EXTRA_DEFINE+=-DINCLUDE_IPFW_HOOKS
endif
ifeq ($(FEATURE_COREIP_ROUTER),true)
override EXTRA_DEFINE+=-DROUTER_STACK
endif
ifeq ($(FEATURE_COREIP_VIRTUAL),true)
override EXTRA_DEFINE+=-DVIRTUAL_STACK
endif
ifeq ($(FEATURE_COREIP_IPV6),true)
override EXTRA_DEFINE+=-DINET6
endif
ifeq ($(FEATURE_COREIP_IPSEC),true)
override EXTRA_DEFINE+=-DWRS_IPSEC
endif
@@ -0,0 +1,33 @@
# defs.docs - makefile fragment for specifying documentation parameters
#
# modification history
# --------------------
# 01h,18oct10,??? change version
# 01g,04jun08,kkz Use variables for doc version number
# 01f,22jun07,kkz Updating version number for docs
# 01e,07dec06,kkz Updating version number for Spring 07 release
# 01d,12sep05,vvv updated version number
# 01c,29apr05,kkz Updating for new directory paths
# 01b,27oct04,tpw Force apigen for Medusa doc builds.
# 01a,26oct04,tpw created
#
# DESCRIPTION
# This file contains settings to configure the documentation build for the
# networking stack component kernel side. A companion file exists for user
# mode: $(WIND_BASE)/target/usr/make/config/comps/coreip/defs.docs
include $(WIND_BASE)/target/h/make/config/defs.version
ifeq ($(KERNEL_MAJOR_VERSION),6)
DOC_DIR = $(DOCS_ROOT)/com.windriver.ide.doc.wr_net_stack_*/wr_net_stack_kernel_api_reference
DOC_BOOK = Wind_River_Network_Stack_$(KERNEL_MAJOR_VERSION).$(KERNEL_MINOR_VERSION)
DOC_CHAPTER = Wind_River_Network_Stack_Kernel_API
else
# Force apigen for Medusa doc build. Only needed on kernel side.
#
REFGEN_SH = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -nostrict -missingok
endif
@@ -0,0 +1,51 @@
# defs.subdirs - Core IP (coreIP) specific SUBDIR definition.
#
# Copyright 1996-2004 Wind River Systems, Inc.
#
# # modification history
# --------------------
# 00c,08jul04,tf Fix Base B0006: make rclean broken on Windows.
# 00b,09jun04,tf Added drv/wdb to SUBDIRS.
# 00a,03mar04,tf Written.
#
# DESCRIPTION
# This file defines the list of subdirs to be built for coreIp. This
# file is included by '$(WIND_BASE)/target/h/make/config/common/defs.subdirs'
# if the feature set being built includes coreIp comps
# (i.e., if COMPONENT_CORE_IP==true).
#
# Note that SUBDIRS is extended to include coreIp sub-directories.
#
TGT_DIR=$(WIND_BASE)/target
# The dual stack is included; build the new coreIp way.
export COREIP_BASE=$(TGT_DIR)/src/wrn/coreip
ifneq ($(patsubst %/,%, $(dir $(wildcard $(TGT_DIR)/src/drv/end/Makefile))),)
SUBDIRS += drv/end
endif
ifneq ($(patsubst %/,%, $(dir $(wildcard $(TGT_DIR)/src/rpc/Makefile))),)
SUBDIRS += rpc
endif
ifneq ($(patsubst %/,%, $(dir $(wildcard $(TGT_DIR)/src/drv/wdb/Makefile))),)
SUBDIRS += drv/wdb
endif
ifneq ($(COREIP_BASE),)
SUBDIRS += wrn/coreip
endif
###
#
# This lines were commented out because of a 'make rclean' problem on a
# Windows host (SPR #99176)
#
# END_DIR = $(patsubst %/,%, $(dir $(wildcard $(TGT_DIR)/src/drv/end/Makefile)))
# RPC_DIR = $(patsubst %/,%, $(dir $(wildcard $(TGT_DIR)/src/rpc/Makefile)))
# WDB_DIR = $(patsubst %/,%, $(dir $(wildcard $(TGT_DIR)/src/drv/wdb/Makefile)))
#
# SUBDIRS += $(RPC_DIR) $(END_DIR) $(WDB_DIR) $(COREIP_BASE)
@@ -0,0 +1,12 @@
# rules.default - Core IP (coreIp) specific default make rules.
#
# Copyright 1996-2004 Wind River Systems, Inc.
#
# # modification history
# --------------------
# 00a,03mar04,tf Created.
#
# DESCRIPTION
# This file is provided if coreIp specific make rules are required.
#
TGT_DIR=$(WIND_BASE)/target
@@ -0,0 +1,28 @@
# defs.docs - makefile fragment for specifying documentation parameters
#
# modification history
# --------------------
# 01i,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01h,28jul11,jam update mapping file for docs
# 01g,12may11,jam change mapping file version
# 01f,06jan11,jph check if mapping file exists
# 01e,08nov10,jph add mapping file
# 01d,25oct10,jph remove version
# 01c,06oct10,sm Updating version for VxWorks 6.9
# 01b,06jul09,kkz Updating version for VxWorks 6.8
# 01a,25sep08,ebh created (based on tipc/defs.docs:01e)
#
# DESCRIPTION
# This file contains settings to configure the documentation build for the
# MIPC component
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
DOC_DIR = $(DOCS_ROOT)/$(DOC_MIPC_API)
DOC_BOOK = Wind_River_MIPC
DOC_CHAPTER = API_Reference
@@ -0,0 +1,32 @@
# defs.docs - makefile fragment for specifying documentation parameters
#
# modification history
# --------------------
# 01g,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01f,28jul11,jam update mapping file for docs
# 01e,12may11,jam change mapping file version
# 01d,06jan11,jph check if mapping file exists
# 01c,08nov10,jph add mapping file
# 01b,22oct10,jph remove version
# 01a,06oct09,kkz Version number is 1.7.6
# 01f,06jul09,??? Updating version number for VxWorks 6.8
# 01e,24jun08,kkz Use variable for version number
# 01d,22jun07,kkz Updating version to 1.7 for docs
# 01c,04apr06,ebh update for WR TIPC 1.5
# 01b,20sep05,mze mods for TIPC1.2
# 01a,24may05,mze created
#
# DESCRIPTION
# This file contains settings to configure the documentation build for the
# TIPC component
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
DOC_DIR = $(DOCS_ROOT)/$(DOC_TIPC_KERNEL_API)
DOC_BOOK = Wind_River_TIPC
DOC_CHAPTER = Wind_River_TIPC_Kernel_API_Reference
@@ -0,0 +1,32 @@
# defs.docs - makefile fragment for specifying documentation parameters
#
# modification history
# --------------------
# 01m,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01l,28jul11,jam update mapping file for docs
# 01k,12may11,jam change mapping file version
# 01j,06jan11,jph check if mapping file exists
# 01i,08nov10,jph add mapping file
# 01h,25oct10,jph remove version
# 01g,06jul09,kkz Updating version number for VxWorks 6.8
# 01f,24jun08,kkz Use variable for version number
# 01e,22jun07,kkz Updating version number for docs
# 01d,09mar06,kkz Updating doc locations
# 01c,25may05,kkz Updating doc locations
# 01b,29apr05,kkz Updating docs directory path
# 01a,28oct04,tpw created
#
# DESCRIPTION
# This file contains settings to configure the documentation build for the
# USB component. It is expected that the variable DOC_AREA_USB be set to one
# of 'usb', 'usb2', or 'usb_drivers' before including this file.
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
DOC_DIR = $(DOCS_ROOT)/$(DOC_USB_KERNEL_API)
DOC_BOOK = Wind_River_USB
DOC_CHAPTER = Wind_River_USB_API
@@ -0,0 +1,16 @@
# defs.default - Wireless LAN (WLAN) specific default make defines.
#
# Copyright 1996-2004 Wind River Systems, Inc.
#
# # modification history
# --------------------
# 00b,09jul04,tf Fix Base MSP B0217: Remove dependency on SNMP.
# 00a,03mar04,tf Created.
#
# DESCRIPTION
# This file defines any macros that are used in configuring WLAN for specific
# features. A given feature that includes WLAN needs to set the appropriate
# deature macro to 'true' so that WLAN is configured for that feature. This
# is done in $TGT_DIR)/h/make/config/featureSet/$(FEATURE_SET)/defs.defaults.
#
TGT_DIR=$(WIND_BASE)/target
@@ -0,0 +1,44 @@
# defs.docs - makefile fragment for specifying documentation parameters
#
# modification history
# --------------------
# 01d,28nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01c,28jul11,jam update mapping file for docs
# 01b,18may11,jph check if mapping file exists
# 01a,08nov10,jph add mapping file
# 01a,01nov10,??? remove version
# 01h,01oct10,??? Updating version number for VxWorks 6.9
# 01g,06jul09,??? Updating version number for VxWorks 6.8
# 01f,24jun08,kkz Update version number for Fall08
# 01e,22aug07,spw Updated version numbers for Fall07
# 01d,21feb06,rb Updated version numbers for Spring06
# 01c,13sep05,rb Updated version numbers
# 01b,30may05,tpw Add -set KERNEL for Argus doc build.
# 01a,12may05,tpw created
#
# DESCRIPTION
# This file contains settings to configure the documentation build for the
# wireless ethernet driver component.
include $(WIND_BASE)/target/h/make/config/defs.version
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
ifeq ($(KERNEL_MAJOR_VERSION),6)
DOC_DIR = $(DOCS_ROOT)/$(DOC_WIRELESS_ETH_DRV_API)
DOC_BOOK = Wind_River_Wireless_Ethernet_Driver
DOC_CHAPTER = Wind_River_Wireless_Ethernet_Driver_API_Reference
else
# Force apigen for VxWorks 5.x doc build. Only needed on kernel side.
#
REFGEN_SH = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen \
-nostrict -missingok -set KERNEL
endif
@@ -0,0 +1,33 @@
# defs.subdirs - Wireless LAN (WLAN) specific SUBDIR definition.
#
# Copyright 1996-2004 Wind River Systems, Inc.
#
# # modification history
# --------------------
# 00d,28sep04,dxb Changed file names to detect driver to be more specific.
# 00c,10aug04,dxb Changed absolute paths to relative paths.
# 00b,08jul04,tf Fix Base B0007: Uninstalled comps should not be compiled.
# 00a,03mar04,tf Written.
#
# DESCRIPTION
# This file defines the list of subdirs to be built for WLAN. This
# file is included by '$(WIND_BASE)/target/h/make/config/common/defs.subdirs'
# if the feature set being built includes WLAN comps
# (i.e., if COMPONENT_WLAN==true).
#
# Note that SUBDIRS is extended to include WLAN sub-directories.
#
TGT_DIR=$(WIND_BASE)/target
IS_DOT11B := $(wildcard $(TGT_DIR)/h/wrn/wlan/intPrismHw.h)
IS_DOT11ABG := $(wildcard $(TGT_DIR)/h/drv/wlan/dot11HddLib.h)
# first build the original 802.11b driver if it exists
ifneq ($(IS_DOT11B),)
SUBDIRS += wrn/wlan
endif
# next build the new 802.11a/b/g driver if it exists
ifneq ($(IS_DOT11ABG),)
SUBDIRS += drv/wlan
endif
@@ -0,0 +1,12 @@
# rules.default - Wireless LAN (WLAN) specific default make rules.
#
# Copyright 1996-2004 Wind River Systems, Inc.
#
# # modification history
# --------------------
# 00a,03mar04,tf Created.
#
# DESCRIPTION
# This file is provided if WLAN specific make rules are required.
#
TGT_DIR=$(WIND_BASE)/target
@@ -0,0 +1,15 @@
# defs.version - makefile fragment for specifying key version numbers
#
# modification history
# --------------------
# 01e,24feb10,mdk 6.9 version update
# 01d,06jul09,kkz Updating version number for VxWorks 6.8
# 01c,05jun08,kkz Updating to include KERNEL_MINOR_VERSION
# 01b,26oct04,tpw Bump KERNEL_MAJOR_VERSION to 6 for VxWorks 6.0
# 01a,26oct04,tpw created
#
# DESCRIPTION
# This file contains default definitions for key version numbers.
KERNEL_MAJOR_VERSION = 6
KERNEL_MINOR_VERSION = 9
+41
View File
@@ -0,0 +1,41 @@
#
# defs.base - generig utility make definitions.
#
# Copyright 2009, Wind River Systems, Inc.
#
# This file contains generig make utility definitions.
# The variables defined in this file are not specific to any product.
#
# modification history
# --------------------
# 01a,30jun09,pee created
# whitespace characters
blank:=
space:=$(blank) $(blank)
tab:=$(blank) $(blank)
# this defines a single newline character
define newline
endef
# print function
# this routine allows to print a multi line variable in a make command
# first parameter is the text
# second optional parameter is the output file. The function will output to stdout if $2 not provided
# This function uses the echo command.
#
# exmaple of usage:
# target :
# $(call print,$(CONTENTS),$@)
#
define print
$(foreach line,$(subst $(newline),[:newline:]$(space),$(subst $(space),[:space:],$(subst $(tab),[:tab:],$1))),
@echo '$(subst [:newline:],,$(subst [:space:],$(space),$(subst [:tab:],$(tab),$(line))))' $(if $2,>> $2,)
)
endef
+400
View File
@@ -0,0 +1,400 @@
# defs.bsp - bsp default makefile definitions
#
# Copyright (c) 1995-2012 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 06i,16jul15,rtm Fix for VXW6-83093
# 06h,20apr12,wyt remove mkboot from DOC_FILES
# 06g,02feb12,mze add .CPP as a valid suffix
# 06f,04apr11,jmp Added OPTION_NO_WARNINGS to symTbl.c build options
# (CQ:WIND00246254).
# 06e,09dec10,mze add prj_icc and prj_icc_def
# 06d,03nov10,mze IA CPU tag work
# 06c,02apr10,mze revert
# 06b,01apr10,mze include VSB config file
# 06a,24feb10,mze adding icc
# 05z,19may09,pee adding acces to VSB include directory
# 05y,10oct08,pee WIND00137789.
# 05x,02oct08,mze changes to the use of _WRS_CONFIG_ADDEDCFLAGS
# 05w,04sep08,pee some cleanup.
# 05v,22aug08,pee adding vsb config file to VIP.
# 05u,01aug08,pee passing VSB config file in compile flags.
# 05t,16jul08,tor add target/src/hwif/h
# 05s,11jul08,dlk Move EXTRA_INCLUDE additions from rules.vxbus to here.
# 05r,14jul08,pee passing VSB_DIR to tools.
# 05q,12jul08,pee adding VSB to CLFAGS_PIC
# 05p,18jun08,pee VSB
# 05o,28sep07,pee WIND00105890
# 05n,27sep07,pee backing off ...
# 05m,11sep07,pee add optional ipcom defs.
# 05l,31aug07,mmi use non-debug spinlock by default
# 05k,29jun07,pch reinstate PPC ROM configurations
# 05j,11jun07,pes Remove MIPS workarounds
# 05i,29may07,pch remove ROM configurations from PPC default project build set
# 05h,29may07,d_c Disable GNU build for 64-bit MIPS - temporary workaround
# until GNU n32 is available
# 05g,07may07,mmi added MANAGED_LIBS and COMPONENT_LIBS for components
# with muiltiple implementations.
# 05f,12mar07,pes Updates for new MIPS library structure. Map MIPS32 to
# MIPSI2 and MIPS64 to MIPSI3.
# 05e,08mar07,pee added generic option support
# 05d,06mar07.tkf Define component include paths after the
# $(OPTION_INCLUDE_DIR)$(TGT_DIR)/h.
# 05c,11apr06,lei added KERNEL_TYPE & DIR_EXT for SMP build
# 05b,20jul05,rec coldfire support
# 05a,22apr05,edc Added resource definitions that support packaging of a bsp.
# 04z,07apr05,edc Search paths for header files under components
# 04y,18jan05,lei prj build with diab/gnu (SPR 103339)
# 04x,23sep04,dlk Add OPT_DEFINE in CC_DEFINES.
# 04w,07sep04,j_b new warning settings (SPR 100237)
# 04v,26aug04,mem Search target/config/comps/src after target/src/config for
# includes.
# 04u,03sep04,fle Added CDF_OVERRIDE macro
# 04t,12jul04,fle Moved ADRS_DEFINE definitions to defs.memory
# 04s,10jun04,fle Added ADRS_DEFINE to CC_DEFINES
# 04r,18may04,dlk Remove include of defs.option, now included via defs.link.
# 04q,13mar04,dlk Support option builds.
# 04p,22mar04,dbt Make sure projects are built with both diab & gnu for
# VxSim.
# 04o,23feb04,fle Removed UP directory include from CC_INCLUDE, since UP is
# never defined
# 04n,15jan04,cmf add pentium projects for diab
# 04m,12nov03,rlm Added h/wrn/coreip to CC_INCLUDE definition
# 04m,07nov03,c_c Unified build rules with WIN32 hosts.
# 04l,15oct03,dat Diab error/warning update, Step 1, BSPs built with
# warning level set to medium.
# 04k,25sep03,job Added _WRS_KERNEL to CC_DEFINE macro
# 04l,26sep03,xav Add SIZE macro in the substitution list
# 04k,21aug03,xav Substitute any / with \\ on win32 for CC, AS, AR,...decl
# 04j,19mar02,rbl project flags should be different for vxApp and vxWorks
# 04i,19mar02,dat Adding CFLAGS_PIC & CC_PIC for bootInit.o (72825)
# 04h,14dec01,dat update to include full diab build as part of RELEASE
# 04g,06dec01,dat New project defaults per arch
# 04f,04dec01,dat New release sub-macros
# 04e,12nov01,j_s moved libraries and libraries search path definitions to
# defs.link
# 04f,13nov01,dat activating prj_default as part of release
# 04e,05nov01,rbl define compiler and assembler flags for the project
# facility
# 04d,10nov01,tam added use of TOOL_COMMON_DIR; fixed definition of
# LD_LINK_PATH
# 04c,08nov01,tam fixed Windows build after repackaging changes
# 04b,30oct01,tam removed CC_LIB from cyclic linking
# 04a,29oct01,tam added auto-generation of LD_LINK_LIBS. Removed
# LD_LINK_LIBS_EXTRA.
# 03z,23oct01,tam added extra -l entries
# 03y,19oct01,j_s remove LD_LINK_LIST, just use LD_LINK_LIBS
# 03x,19oct01,jab added CC_ARCH_SPEC to CASFLAGS
# 03w,18oct01,dat Moving tool defines to tool specific files
# 03v,19sep01,dat Adding TOOL_FAMILY, added include of make.$CPU$TOOL,
# and defs.$HOST
# 03u,17sep01,sn moved definitions of MUNCH_FLAGS and related macros to
# defs.gnu
# 03t,07sep01,dat Gnu-diab adding h/tool/$TOOL to include path
# 03t,31jul01,mem Fix munch for diab.
# 03s,24jul01,r_s diab specific rules added
# 03r,24apr00,dat SPR 30819, fix project link of ROM images
# 03q,10aug00,rec add LD_ENDIAN_FLAG
# 03p,23mar01,roz Fix check for GNU compiler.
# 03o,13mar01,sn Use $(OPTION_LANG_ASM) instead of the explicit flag
# Added $(OPTION_LANG_ASM) to $(CASFLAGS) to ensure
# correct dependency gen in BSP builds
# 03n,12mar01,sn Spell -x assembler-with-cpp without the space to
# ensure correct extraction by the project facility
# 03m,06dec00,sn removed -xc
# 03l,16oct00,sn link against CC_LIB
# 03k,09oct00,sn removed -nostdinc
# 03j,23feb99,sn merge POST_MUNCH and MUNCH, add MUNCH_FLAGS
# -traditional -> -fdollars-in-identifiers
# 03i,22feb99,fle added mkboot to DOC_FILES
# 03h,17nov98,sn removed ORDER_CTORS
# 03g,11nov98,sn partially link using LD_PARTIAL
# 03f,11nov98,sn munch -> orderCtors $(NM)
# 03e,15oct98,ms reworked MUNCH definition so it works on windows 95/98.
# 03d,21sep98,sn removed -fno-implicit-templates from C++_COMPILER
# see defs.default for detailed comment
# 03c,06may98,yp added sysTffs to DOC_FILES
# 03b,06may98,cym added DEFAULT_RULE
# 03a,09feb98,sn added -fno-implicit-templates to C++_COMPILER
# 02i,02apr98,pcn Removed Objcopy changes from Tempest view
# 02h,15dec97,pcn Added Objcopy in BSP build.
# 02g,20jan97,yp added -P to CFLAGS_AS to suppress "#line" directives
# 02f,06dec97,yp moved soft-float back to CFLAGS
# 02e,02jan97,dat added DOC_FLAGS, EXTRA_DOC_FLAGS
# 02d,17dec96,yp moved soft-float to OPTIM macros so drvs get built without it
# 02c,04oct96,yp added .cxx sufix
# 02b,31oct96,yp added definition for GCC_EXEC_PREFIX. added TCL def.
# added CFLAGS_AS. redid CFLAGS and C++FLAGS for new build
# 02a,31oct96,kkk fixed typo in C++FLAGS line.
# 01z,21jun96,dat added -traditional to COMPILE_SYMTBL (#6517),
# added copyright
# 01y,01apr96,srh added Rogue Wave multithread defns.
# 01x,13nov95,jeh added CF define, changed CXX define to $(CC).
# 01w,13nov95,jeh renamed C++ define to be CXX.
# 01v,11nov95,jeh fixed typo in C++FLAGS define (missing $ in $(C++_COMPILER))
# 01u,07nov95,p_m Removed previous change
# 01t,04nov95,p_m Added sysSerial to DOC_FILES
# 01s,01nov95,yp Added rules for C++ support
# 01r,24oct95,dat recovered CONFIG_ALL and changed CC_INCLUDE, moved LIB_EXTRA
# 01q,20jun95,yp removed -pedatic flag. added machros for bin tool names
# 01p,15jun95,yp removed defintions for CPU and TOOL.
# 01o,01jun95,yp derived from make.defaults
#
# DESCRIPTION
# This file is included into bsp makefiles to define the default makefile
# definitions. After the include the Makefile may customize the definitions
# found here to suit the circumstance.
#
# Redefinitions of make variables earlier than the include of this file will
# have no affect.
#
# This file is only for command line builds from the BSP directory. It is
# not used for any project or component builds. See defs.project for project
# build definitions. It is used to create projects from the command line, but
# not to build them.
#
# map TOOL to TOOL_FAMILY, if not already done in BSP Makefile
ifeq ($(TOOL_FAMILY),)
ifeq ($(findstring gnu,$(TOOL)),gnu)
TOOL_FAMILY = gnu
endif
ifeq ($(findstring diab,$(TOOL)),diab)
TOOL_FAMILY = diab
endif
ifeq ($(findstring icc,$(TOOL)),icc)
TOOL_FAMILY = icc
endif
endif
# Translate old MIPS CPU types to their new equivalents.
ifeq (MIPS32, $(CPU))
CPU = MIPSI2
endif
ifeq (MIPS64, $(CPU))
CPU = MIPSI3
endif
#in case we are on a WIN32 host ...
WIND_BASE := $(subst \,/,$(WIND_BASE))
.SUFFIXES: .cpp .CPP .out .cxx
## exe target is the cannonical starting point.
default : exe
## most targets will make vxWorks by default
DEFAULT_RULE = vxWorks
## TARGET_DIR still used for backward compatibility
BSP_NAME = $(TARGET_DIR)
## default flags
CFLAGS = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_WARNINGS) \
$(CC_INCLUDE) $(CC_DEFINES) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) \
$(CC_SOFT_FLOAT) $(CFLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
C++FLAGS = $(CC_ARCH_SPEC) $(C++_COMPILER) $(CC_OPTIM) $(C++_WARNINGS) \
$(CC_INCLUDE) $(CC_DEFINES) $(ADDED_C++FLAGS) \
$(CC_SOFT_FLOAT) $(C++FLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
CASFLAGS = $(CC_ARCH_SPEC) $(OPTION_PP) $(OPTION_LANG_ASM) $(CC_INCLUDE)\
$(CC_DEFINES) $(CASFLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
CFLAGS_AS = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_INCLUDE) \
$(CC_DEFINES) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) $(OPTION_PP_AS) \
$(OPTION_LANG_ASM) $(CFLAGS_AS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
# Special flags for Position Independent Code (bootInit.o)
CFLAGS_PIC = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_WARNINGS) \
$(CC_INCLUDE) $(CC_DEFINES) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) $(CC_PIC) \
$(CC_SOFT_FLOAT) $(CFLAGS_PIC_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
# BSP default warning level is medium, the most comparable to previous setting.
CC_WARNINGS = $(CC_WARNINGS_MED)
C++_WARNINGS = $(CC_WARNINGS_MED)
CC_OPTIM = $(CC_OPTIM_TARGET)
CC_INCLUDE = $(OPTION_INCLUDE_DIR)$(CONFIG_ALL) \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/h \
$(INCLUDE_CC) $(EXTRA_INCLUDE) $(OPTION_INCLUDE_DIR). \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/h/wrn/coreip \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/src/config \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/config/comps/src \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/config/comps/src/dosfs2 \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/src/drv \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/src/hwif/h
WIND_VXCONFIG := $(subst \,/,$(WIND_VXCONFIG))
WIND_COMPONENTS_INCLUDES := $(subst \,/,$(WIND_COMPONENTS_INCLUDES))
ifeq ($(WIND_HOST_TYPE),x86-win32)
EXTRA_INCLUDE += $(foreach dir,$(subst ;, ,$(WIND_COMPONENTS_INCLUDES)), $(OPTION_INCLUDE_DIR)$(dir))
EXTRA_INCLUDE += $(foreach dir,$(subst ;, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/src)
EXTRA_INCLUDE += $(foreach dir,$(subst ;, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/h)
else
EXTRA_INCLUDE += $(foreach dir,$(subst :, ,$(WIND_COMPONENTS_INCLUDES)), $(OPTION_INCLUDE_DIR)$(dir))
EXTRA_INCLUDE += $(foreach dir,$(subst :, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/src)
EXTRA_INCLUDE += $(foreach dir,$(subst :, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/h)
endif
EXTRA_INCLUDE += $(COMPONENT_INCLUDES)
EXTRA_INCLUDE += -I$(TGT_DIR)/src/hwif -I$(TGT_DIR)/src/hwif/h
CC_DEFINES = $(OPTION_DEFINE_MACRO)CPU=_VX_$(CPU) \
$(OPTION_DEFINE_MACRO)TOOL_FAMILY=$(TOOL_FAMILY) \
$(OPTION_DEFINE_MACRO)TOOL=$(TOOL) \
$(OPTION_DEFINE_MACRO)_WRS_KERNEL \
$(DEFINE_CC) $(EXTRA_DEFINE) $(OPT_DEFINE)
CDF_OVERRIDE = $(OPTION_DEFINE_MACRO)CDF_OVERRIDE=TRUE
COMPILE_SYMTBL = $(CC) $(OPTION_OBJECT_ONLY) $(OPTION_DOLLAR_SYMBOLS) \
$(CFLAGS) $(OPTION_NO_WARNINGS)
## compiler and assembler flags for the project facility
CFLAGS_PROJECT_REMOVE = $(CC_PROJECT_OPTIMIZE_FLAGS) \
$(PROJECT_BSP_FLAGS_EXTRA)
CFLAGS_PROJECT_STRIPPED = $(filter-out $(CFLAGS_PROJECT_REMOVE),$(C++FLAGS))
CFLAGS_PROJECT = -g $(CFLAGS_PROJECT_STRIPPED)
CFLAGS_AS_PROJECT_STRIPPED = $(filter-out $(CFLAGS_PROJECT_REMOVE),$(CFLAGS_AS))
CFLAGS_AS_PROJECT = -g $(CFLAGS_AS_PROJECT_STRIPPED)
## set default values for ROM_LINK_ADRS, TGT_DIR, for old Makefiles
ifeq ($(ROM_LINK_ADRS),)
ROM_LINK_ADRS = $(ROM_TEXT_ADRS)
endif
ifeq ($(TGT_DIR),)
TGT_DIR = $(WIND_BASE)/target
else
#in case we are on a WIN32 host ...
TGT_DIR := $(subst \,/,$(TGT_DIR))
endif
## standard list of BSP modules
MACH_DEP = sysALib.o sysLib.o $(MACH_EXTRA) $(ADDED_MODULES)
## select libraries that contain multiple component implementations.
ifeq (SMP, $(findstring SMP, $(VXBUILD)))
MANAGED_LIBS = libspl.a libsplDbg.a
COMPONENT_LIBS = libspl.a
endif
## linker script definitions
include $(TGT_DIR)/h/make/defs.link
## documentation files
DOC_FILES = sysLib tyCoDrv sysTffs
DOC_FLAGS = $(OPTION_DEFINE_MACRO)DOC $(OPTION_DEFINE_MACRO)INCLUDE_SCSI \
$(OPTION_DEFINE_MACRO)INCLUDE_SHOW_ROUTINES $(EXTRA_DOC_FLAGS)
# Now include the CPU/TOOL make file and any host specific definitions
include $(TGT_DIR)/h/tool/$(TOOL_FAMILY)/make.$(CPU)$(TOOL)
ifndef __DEFS_OPTIONS_INCLUDED
include $(TGT_DIR)/h/make/defs.options
endif
include $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
## Release macros are for WRS internal release process only.
RELEASE = $(RELEASE_PRE) $(RELEASE_CMD) $(RELEASE_PRJ) $(RELEASE_POST)
RELEASE_PRE =
RELEASE_POST =
## Default project builds, arch sensitive
# ARM, MIPS, PPC, SH
# build 2 projects, gnu project has 4 build specs, diab project also has 4
# (These should be in the arch specific tool files, not here)
ifeq ($(VX_CPU_FAMILY),arm)
RELEASE_PRJ = prj_gnu prj_diab
endif
ifeq ($(VX_CPU_FAMILY),mips)
RELEASE_PRJ = prj_gnu prj_diab
endif
ifeq ($(VX_CPU_FAMILY),ppc)
RELEASE_PRJ = prj_gnu prj_diab
endif
ifeq ($(VX_CPU_FAMILY),sh)
RELEASE_PRJ = prj_gnu prj_diab
endif
ifeq ($(VX_CPU_FAMILY),pentium)
RELEASE_PRJ = prj_gnu prj_diab prj_icc
endif
ifeq ($(VX_CPU_FAMILY),cf)
RELEASE_PRJ = prj_diab
endif
# Simulators: one project with 2 build specs
ifeq ($(VX_CPU_FAMILY),simpc)
RELEASE_PRJ = prj_gnu_def prj_diab_def prj_icc_def
endif
ifeq ($(VX_CPU_FAMILY),simso)
RELEASE_PRJ = prj_gnu_def prj_diab_def
endif
ifeq ($(VX_CPU_FAMILY),simlinux)
RELEASE_PRJ = prj_gnu_def prj_diab_def prj_icc_def
endif
# all else defaults to a single project with 4 build specs
ifeq ($(RELEASE_PRJ),)
RELEASE_PRJ = prj_default
endif
# default command line builds
ifeq ($(RELEASE_CMD),)
RELEASE_CMD = vxWorks vxWorks.st bootrom.hex
endif
# Include resource definitions that support packaging of a bsp
-include $(WIND_HOME)/setup/make/defs.resourcelist
include $(TGT_DIR)/h/make/defs.vsbvars.mk
TOOL_OPTIONS_FILES_DIR = .
ifdef BSP2PRJ
-include $(VSB_MAKE_CONFIG_FILE)
makeMacros : ALLFLAGS_VSBDEFS = -D_VSB_CONFIG_FILE=\"$$(VSB_CONFIG_FILE)\" $(_VSB_CONFIG_ADDEDCFLAGS) -I$$(VSB_INCLUDE_DIR)
endif
ifdef TC_INFO
ALLFLAGS_VSBDEFS = -D_VSB_CONFIG_FILE=\"$$(VSB_CONFIG_FILE)\" $(_VSB_CONFIG_ADDEDCFLAGS) -I$$(VSB_INCLUDE_DIR)
endif
+49
View File
@@ -0,0 +1,49 @@
# defs.bsp2.mk - bsp2 default makefile definitions
#
# Copyright (c) 2010 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 01a,01dec10,mze derived from defs.bsp
#
# DESCRIPTION
# This file is included into bsp makefiles to define the default makefile
# definitions. After the include the Makefile may customize the definitions
# found here to suit the circumstance.
#
# Redefinitions of make variables earlier than the include of this file will
# have no affect.
#
# This file is only for command line builds from the BSP directory. For the users
# of defs.bsp2.mk it is expected that VIP projects are the only viable project types
# this is inclusive of bootroms of all natures
#
# map TOOL to TOOL_FAMILY, if not already done in BSP Makefile
ifeq ($(TOOL_FAMILY),)
ifeq ($(findstring gnu,$(TOOL)),gnu)
TOOL_FAMILY = gnu
endif
ifeq ($(findstring diab,$(TOOL)),diab)
TOOL_FAMILY = diab
endif
ifeq ($(findstring icc,$(TOOL)),icc)
TOOL_FAMILY = icc
endif
endif
# Include resource definitions that support packaging of a bsp
include $(TGT_DIR)/h/make/defs.vsbvars.mk
#TOOL_OPTIONS_FILES_DIR = .
ifndef TC_INFO
-include $(VSB_MAKE_CONFIG_FILE)
#makeMacros : ALLFLAGS_VSBDEFS = -D_VSB_CONFIG_FILE=\"$$(VSB_CONFIG_FILE)\" $(_VSB_CONFIG_ADDEDCFLAGS) -I$$(VSB_INCLUDE_DIR)
endif
include $(TGT_DIR)/h/make/defs.bsp
+86
View File
@@ -0,0 +1,86 @@
# defs.comps - makefile definitions related to component builds
#
# Copyright (c) 2007 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 01f,12nov08,mze returning the LIBPATH and LINK_PATH macros to where they
# belong.
# 01e,29sep08,mze remove WS_ROOT_DIR_LIBPATH
# 01d,02aug07,pee WIND00100300
# 01c,19jul07,tkf Fix WIND00098105: consider VXBUILD=SMP option for source
# builds. Also correct code that assumed
# WIND_COMPONENTS_LIBPATHS contains only one lib path.
# 01b,10may07,tkf Fix link problem due to multiple inclusion when building BSPs from
# target/config.
# 01a,02may07,tkf Written.
#
# DESCRIPTION
#
# This file is included in Makefiles to establish information related
# to component builds,
#
# Protect against multiple inclusion.
ifeq ($(DEFS_COMPS),)
DEFS_COMPS = TRUE
include $(TGT_DIR)/h/make/defs.options
# Add component libpaths from the workspace directory WS_ROOT_DIR
ifeq ($(WS_ROOT_DIR),UNKNOWN)
WS_ROOT_DIR_LIBPATH = $$(WS_ROOT_DIR)/obj/$(WIND_PLATFORM)/krnl/lib$(MAJOR_OPTION_SUFFIX)
COMP_LD_LINK_PATH += -L$(WS_ROOT_DIR_LIBPATH)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL)$(MINOR_OPTION_SUFFIX)
COMP_LD_LINK_PATH += -L$(WS_ROOT_DIR_LIBPATH)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_OPTION_SUFFIX)
else
ifneq ($(WS_ROOT_DIR),)
WS_ROOT_DIR_LIBPATH = $(WS_ROOT_DIR)/obj/$(WIND_PLATFORM)/krnl/lib$(MAJOR_OPTION_SUFFIX)
COMP_LD_LINK_PATH += -L$(WS_ROOT_DIR_LIBPATH)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL)$(MINOR_OPTION_SUFFIX)
COMP_LD_LINK_PATH += -L$(WS_ROOT_DIR_LIBPATH)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_OPTION_SUFFIX)
COMP_LIBS_PRESENT += $(notdir $(wildcard $(WS_ROOT_DIR_LIBPATH)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL)$(MINOR_OPTION_SUFFIX)/lib*.a))
COMP_LIBS_PRESENT += $(notdir $(wildcard $(WS_ROOT_DIR_LIBPATH)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_OPTION_SUFFIX)/lib*.a))
endif
endif
# Add component libpaths and modules defined in WIND_COMPONENTS_LIBPATHS and
# WIND_COMPONENTS_MODULES
WIND_COMPONENTS_MODULES := $(subst \,/,$(WIND_COMPONENTS_MODULES))
ifeq ($(WIND_HOST_TYPE),x86-win32)
PATH_SEPARATOR = ;
else
PATH_SEPARATOR = :
endif
WIND_COMPONENTS_LIBPATHS := $(subst \,/,$(WIND_COMPONENTS_LIBPATHS))
WIND_COMPONENTS_LIBPATHS_LIST := $(subst $(PATH_SEPARATOR), ,$(WIND_COMPONENTS_LIBPATHS))
COMP_LD_LINK_PATH += $(foreach dir,$(WIND_COMPONENTS_LIBPATHS_LIST), \
-L$(dir)$(MAJOR_OPTION_SUFFIX)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL)$(MINOR_OPTION_SUFFIX))
COMP_LD_LINK_PATH += $(foreach dir,$(WIND_COMPONENTS_LIBPATHS_LIST), \
-L$(dir)$(MAJOR_OPTION_SUFFIX)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_OPTION_SUFFIX))
COMP_LIBS_PRESENT += $(notdir $(foreach dir,$(WIND_COMPONENTS_LIBPATHS_LIST),\
$(wildcard $(dir)$(MAJOR_OPTION_SUFFIX)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL)$(MINOR_OPTION_SUFFIX)/lib*.a)))
COMP_LIBS_PRESENT += $(notdir $(foreach dir,$(WIND_COMPONENTS_LIBPATHS_LIST),\
$(wildcard $(dir)$(MAJOR_OPTION_SUFFIX)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_OPTION_SUFFIX)/lib*.a)))
COMP_LIBNAMES = $(foreach name,$(subst $(PATH_SEPARATOR), ,$(WIND_COMPONENTS_LIBNAMES)),lib$(name).a)
COMP_MODULES = $(subst $(PATH_SEPARATOR), ,$(WIND_COMPONENTS_MODULES))
COMP_LD_LINK_LIBS = $(patsubst lib%.a,-l%,$(filter $(COMP_LIBNAMES),$(COMP_LIBS_PRESENT)))
COMP_LIBS = $(COMPONENT_MODULES) $(COMP_MODULES) $(COMPONENT_LIBRARIES) \
$(COMP_LD_LINK_LIBS)
LD_LINK_PATH += $(COMP_LD_LINK_PATH)
endif # ifeq ($(DEFS_COMPS),)
+372
View File
@@ -0,0 +1,372 @@
# defs.default - default makefile definitions
#
# Copyright (c) 1996-2010, 2012 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 03w,16jul15,rtm Fix for VXW6-83093
# 03v,02feb12,mze add .CPP as a valid suffix
# 03u,03nov10,mze IA CPU tag work
# 03t,19jul10,mze add VENDOR_DEFAULT logic
# 03s,24feb10,mze adding icc
# 03t,31jan10,fao add be8 support.
# 03r,02jul09,pee adding VSB specific CFLAGS
# 03r,03jun09,mdo Add VFP default
# 03q,06nov08,pee WIND00139818
# 03p,02oct08,mze VSB changes
# 03o,08sep08,pee problem with bdgen output.
# 03n,02sep08,pee moving VSB definitions out to defs.vsbvars.mk
# 03r,27aug08,pee moving VSB definitions in here.
# 03q,25aug08,pee default value for new parameter _WRS_CONFIG_APP_TOOL.
# 03p,27aug08,pee moving VSB definitions in here.
# 03o,20aug08,mze fix typo
# 03n,20aug08,mze adding e500v2 case
# 03m,13aug08,mze strip the TOOL down to diab or gnu to match VSB builds
# 03l,28jul08,pee passing VSB config file in compile flags.
# 03k,30jul08,kkz Fixing DOC_CHAPTER definition
# 03i,22jul08,kkz Updating API book names
# 03h,12jul08,pee adding VSB support to CFLAGS_PIC
# 03g,27jun08,pee adding VSB CFLAG
# 03f,18jun08,pee more VSB.
# 03e,04jun08,kkz Use variables for doc version number
# 03d,23apr08,pee adding _VSB_DIR to the FLAGS.
# 03c,22jun07,kkz Updating apidoc version number
# 03b,08mar07,pee added generic option support
# 03g,28dec06,kch Removed rules.gpp include for IPNET integration.
# 03f,07dec06,kkz Updating apidoc version number to 6.5
# 03e,09mar06,kkz Updating version number for API docs
# 03d,08mar07,pee added generic option support
# 03c,15sep05,kkz Updating version number for API docs
# 03b,29apr05,kkz Changing doc directory path
# 03a,19apr05,tpw Adjust to new docs location as of WB18
# 02z,19apr06,lei added KERNEL_TYPE & DIR_EXT for SMP build
# 02y,28mar05,spm Added -include rules.gpp.
# 02x,16feb05,pee Added CFLAGS_$<
# 02w,14oct04,dlk Added OPT_DEFINE in CC_DEFINES
# 02v,14oct04,job Added DOC_KERNEL definition
# 02u,17sep04,job Changed C++_WARNINGS value to CC_WARNINGS_LOW (SPR#101877)
# 02t,12jul04,fle Moved ADRS_DEFINE definitions to defs.memory
# 02s,01jun04,fle Added CFLAGS_ADRS to CFLAGS
# 02r,27may04,dgp change DOCS_ROOT, DOC_DIR, and DOC_CHAPTER
# 02q,25may04,tpw Switch on -missingok to reduce doc build error output.
# 02p,16feb04,c_c Added the depend extention setting here
# + fix for SPR 88968.
# 02o,12jan04,bjl changed default CPU for doc builds, changed doc flags.
# 02n,11nov03,rlm Added wrn/coreip to CC_INCLUDE definition
# 02m,07nov03,c_c Unified build rules with WIN32 hosts.
# 02l,15oct03,dat Diab error/warning update, step 1 generate warnings for
# error conditions to be fixed by tech line people.
# 02k,17sep03,job Added _WRS_KERNEL to CC_DEFINES macro
# 02j,08may02,wsl change default libraries chapter name
# 02i,19mar02,dat Adding CFLAGS_PIC & CC_PIC for bootInit.o (72825)
# 02h,12mar02,wsl change DOC_CHAPTER from "Libraries" to "Standard Libraries"
# 02g,31jan02,dgp change VxWorks_Reference_Manual to VxWorks_API_Reference
# 02f,21jan02,sn removed unused C++_TEMPLATE_INST
# 02e,23oct01,jab moved toolchain specifics out
# 02d,11oct01,dat SPR 20403, CC_OPTIM_DRIVER needs -fvolatile by default
# 02c,19sep01,dat Adding TOOL_FAMILY
# 02b,17sep01,sn moved definitions of MUNCH_FLAGS and related macros to defs.gnu
# 02a,06sep01,dat Gnu-Diab, adding h/tool/$TOOL to CC_INCLUDE
# 01z,27aug01,wsl add man pages
# 01y,24jul01,r_s Diab sections should not set GCC_ make variables
# 01x,24jul01,r_s changing the make 'ifeq' conditional to work with 'gnu',
# 'sfgnu', 'sfgnule' etc for TOOL
# 01w,24jul01,r_s diab specific rules added
# 01v,28feb01,t_m merge in XScale changes
# 01u,23mar01,roz Fix check for GNU compiler.
# 01t,13mar01,sn Use $(OPTION_LANG_ASM) instead of the explicit flag
# Added $(OPTION_LANG_ASM) to $(CASFLAGS) to ensure
# correct dependency gen in BSP builds
# 01s,12mar01,sn Spell -x assembler-with-cpp without the space to
# ensure correct handling by the project facility
# 01t,01feb01,mem Added LD_PARTIAL_FLAGS and LDFLAGS
# 01s,06dec00,sn removed -xc
# 01v,04jan01,mem Remove -P from assembler invocation.
# 01r,09oct00,sn removed -nostdinc
# 01q,04mar99,sn added machinery to handle large projects
# 01p,18feb99,sn merge POST_MUNCH and MUNCH, add MUNCH_FLAGS
# 01o,02feb99,sn added defs of MUNCH and POST_MUNCH
# 01n,05jan99,fle added the DOC_OPTS_XXX flags
# 01m,25nov98,fle made doc book and chapter be variables and not hard coded
# anymore
# 01l,11nov98,sn partially link using LD_PARTIAL
# 01k,10nov98,fle doc : changed the DOCS_TARGET value
# 01j,21sep98,sn added new macro, C++_TEMPLATE_INST
# 01i,18aug98,fle added DOCS_DIR and DOCS_TARGET variables
# 01h,07may98,sn Sorted this modification history correctly
# (Re)added the flag -fno-implicit-templates to C++_COMPILER
# 01g,02apr98,pcn Removed Objcopy changes from Tempest view
# 01f,15dec97,pcn Added Objcopy in BSP build.
# 01e,10oct97,cym added OPTION_ macros to remove "GNU-centric" flags for VC++.
# 01d,20jan97,yp added -P to CFLAGS_AS to suppress "#line" directives
# 01c,06jan97,yp moved soft-float back to CFLAGS
# 01b,17dec96,yp moved soft-float to OPTIM macros so drvs get built without it
# 01a,07may96,yp derived from defs.bsp
#
# DESCRIPTION
# This file is included in Makefiles to establish defaults. The Makefiles may
# customize these definitions to suit the circumstance.
#
# Redefinitions of make variables earlier than the include of this file will
# have no affect.
#
# use this variable to fing if this file was previously included.
__DEFS_DEFAULT_INCLUDED = TRUE
include $(WIND_BASE)/target/h/make/config/defs.version
ifndef __DEFS_VSBVARS_MK_INCLUDED
include $(WIND_BASE)/target/h/make/defs.vsbvars.mk
endif
.SUFFIXES: .cpp .CPP .out .mib .cxx
## default CPU and TOOL settings
CPU?=PPC604
TOOL?=gnu
_WRS_CONFIG_APP_TOOL ?= $(TOOL)
ifeq ($(findstring sf,$(TOOL)),sf)
override _WRS_CONFIG_FP = soft
export _WRS_CONFIG_FP
endif
ifeq ($(findstring e500v2,$(TOOL)),e500v2)
override _WRS_CONFIG_FP = e500v2
export _WRS_CONFIG_FP
endif
ifneq ($(VFPVARIANT),)
override _WRS_CONFIG_FP = vector
export _WRS_CONFIG_FP
endif
ifeq ($(findstring be,$(TOOL)),be)
override _WRS_CONFIG_ENDIAN = big
export _WRS_CONFIG_ENDIAN
endif
ifeq ($(findstring be8,$(TOOL)),be8)
override _WRS_CONFIG_ENDIAN = be8
export _WRS_CONFIG_ENDIAN
endif
ifeq ($(findstring le,$(TOOL)),le)
override _WRS_CONFIG_ENDIAN = little
export _WRS_CONFIG_ENDIAN
endif
## strip TOOL back to diab or gnu or icc to match VSB TOOL settings
ifndef _BDGEN_
ifeq ($(findstring gnu,$(TOOL)),gnu)
override TOOL = gnu
endif
ifeq ($(findstring diab,$(TOOL)),diab)
override TOOL = diab
endif
ifeq ($(findstring icc,$(TOOL)),icc)
override TOOL = icc
endif
export TOOL
endif
# NOTE: we redefine MAKETAIL and CLEANTAIL: provbably unsupported from now on
MAKETAIL =
CLEANTAIL =
## default flags
CFLAGS = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_WARNINGS) \
$(CC_INCLUDE) $(CC_DEFINES) $(CC_SOFT_FLOAT) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) \
$(CFLAGS_$<) $(CFLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS) \
$(CFLAGS_VSB)
C++FLAGS = $(CC_ARCH_SPEC) $(C++_COMPILER) $(CC_OPTIM) $(C++_WARNINGS) \
$(CC_INCLUDE) $(CC_DEFINES) $(CC_SOFT_FLOAT) $(ADDED_C++FLAGS) \
$(C++FLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
CASFLAGS = $(CC_ARCH_SPEC) $(OPTION_PP) $(OPTION_LANG_ASM) $(CC_INCLUDE)\
$(CC_DEFINES) $(CASFLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
CFLAGS_AS = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_INCLUDE) \
$(CC_DEFINES) $(OPTION_PP_AS) $(OPTION_LANG_ASM) \
$(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) $(CFLAGS_AS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
# For Position Independant Code (bootInit.o)
CFLAGS_PIC = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_WARNINGS) \
$(CC_INCLUDE) $(CC_DEFINES) $(CC_PIC) $(CC_SOFT_FLOAT) \
$(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) $(CFLAGS_PIC_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
_VSB_CONFIG_ADDEDCFLAGS = $(_WRS_CONFIG_ADDEDCFLAGS)
# new default is the low setting. Library code MUST be error/warning free at
# this level.
CC_WARNINGS = $(CC_WARNINGS_LOW)
C++_WARNINGS = $(CC_WARNINGS_LOW)
CC_OPTIM = $(CC_OPTIM_NORMAL)
CC_INCLUDE = $(PRE_INCLUDE) $(OPTION_INCLUDE_DIR)$(TGT_DIR)/h \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/h/wrn/coreip \
$(INCLUDE_CC) $(EXTRA_INCLUDE)
CC_DEFINES = $(OPTION_DEFINE_MACRO)CPU=_VX_$(CPU) \
$(OPTION_DEFINE_MACRO)TOOL_FAMILY=$(TOOL_FAMILY) \
$(OPTION_DEFINE_MACRO)TOOL=$(TOOL) \
$(OPTION_DEFINE_MACRO)_WRS_KERNEL \
$(DEFINE_CC) $(EXTRA_DEFINE) $(OPT_DEFINE)
COMPILE_SYMTBL = $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS)
C++_COMPILER = $(OPTION_ANSI)
# We have this only because win95 host does not allow -DCPU=$(CPU) to be
# passed as one parameter
CC_DEPFLAGS = $(CC_OPTIM) $(CC_WARNINGS) $(CC_INCLUDE) $(CC_COMPILER) \
$(DEFINE_CC) $(EXTRA_DEFINE) $(OPT_DEFINE)
CXX_DEPFLAGS = $(CC_OPTIM) $(CC_INCLUDE) $(C++_WARNINGS) $(C++_COMPILER) \
$(DEFINE_CC) $(EXTRA_DEFINE) $(OPT_DEFINE) $(ADDED_C++FLAGS)
TARGET=default
## top of vxWorks tree
BIN_DIR=$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin
## CPU/TOOL build extension name
BUILD_EXT = $(CPU)$(LIB_DIR_TAG)$(TOOL)-$(WIND_HOST_TYPE)
## docs flags and variables
DOCS_ROOT = $(WIND_DOCS)/extensions/eclipse/plugins
DOC_DIR = $(DOCS_ROOT)/com.windriver.ide.doc.vxworks/vxworks_kernel_api_reference_$(KERNEL_MAJOR_VERSION).$(KERNEL_MINOR_VERSION)
MAN_PAGE_DIR = $(WIND_BASE)/man
DOC_BOOK = VxWorks_$(KERNEL_MAJOR_VERSION).$(KERNEL_MINOR_VERSION)
DOC_CHAPTER = VxWorks_Kernel_API_Reference
DOC_KERNEL = KERNEL
DOC_OPTS = $(DOC_OPTS_MAN)
MAN_PAGE_OPTS = $(DOC_OPTS_MAN) -config Auto2txt
DOC_OPTS_C_TCL = -config CTcl2html
DOC_OPTS_CPP = -cpp
DOC_OPTS_FILE = -config File2html
DOC_OPTS_MAN = -mg -nostrict -missingok
## map TOOL to TOOL_FAMILY, if not already done elsewhere (it should)
ifeq ($(TOOL_FAMILY),)
ifeq ($(findstring gnu,$(TOOL)),gnu)
TOOL_FAMILY = gnu
endif
ifeq ($(findstring diab,$(TOOL)),diab)
TOOL_FAMILY = diab
endif
ifeq ($(findstring icc,$(TOOL)),icc)
TOOL_FAMILY = icc
endif
include $(TGT_DIR)/h/tool/$(TOOL_FAMILY)/make.$(CPU)$(TOOL)
## Architectures default toolchain and dual build status
#
# ARM: DIAB & GNU (DIAB as default)
#
ifeq ($(VX_CPU_FAMILY),arm)
VENDOR_DEFAULT = diab
endif
#
# COLDFIRE: supports only DIAB
#
ifeq ($(VX_CPU_FAMILY),cf)
VENDOR_DEFAULT = diab
endif
#
# MC68K: supports only GNU
#
ifeq ($(VX_CPU_FAMILY),68k)
VENDOR_DEFAULT = gnu
endif
#
# MIPS: DIAB & GNU (DIAB as default)
#
ifeq ($(VX_CPU_FAMILY),mips)
VENDOR_DEFAULT = diab
endif
#
# PENTIUM: DIAB & GNU (GNU as default)
#
ifeq ($(VX_CPU_FAMILY),pentium)
VENDOR_DEFAULT = gnu
endif
#
# PPC: GNU & DIAB (DIAB as default)
#
ifeq ($(VX_CPU_FAMILY),ppc)
VENDOR_DEFAULT = diab
endif
#
# SH (Renesas): GNU & DIAB (DIAB as default)
#
ifeq ($(VX_CPU_FAMILY),sh)
VENDOR_DEFAULT = diab
endif
#
# SIMLINUX: supports GNU & DIAB (GNU as default)
#
ifeq ($(VX_CPU_FAMILY),simlinux)
VENDOR_DEFAULT = gnu
endif
#
# SIMNT: supports GNU & DIAB (GNU as default)
#
ifeq ($(VX_CPU_FAMILY),simpc)
VENDOR_DEFAULT = gnu
endif
#
# SIMSOLARIS: supports GNU & DIAB (DIAB as default)
#
ifeq ($(VX_CPU_FAMILY),simso)
VENDOR_DEFAULT = diab
endif
ifeq ($(VENDOR_DEFAULT),)
VENDOR_DEFAULT = gnu
endif
endif
+52
View File
@@ -0,0 +1,52 @@
# defs.dkm.mk - Host independent rules for making VxWorks Downloadable Kernel Modules
#
# Copyright 2008, Wind River Systems, Inc.
#
# modification history
# --------------------
# 04d,21jun10,pee modify for dkm project
# 04c,04sep08,pee removing defs.options, now included from defs.default.
# 04b,26aug08,pee created
ifndef __DEFS_DEFAULT_INCLUDED
include $(TGT_DIR)/h/make/defs.default
endif
include $(TGT_DIR)/h/tool/$(TOOL_FAMILY)/make.$(CPU)$(TOOL)
include $(TGT_DIR)/h/make/defs.option
include $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
ifneq ($(wildcard $(VSB_MAKE_CONFIG_FILE)),)
include $(VSB_MAKE_CONFIG_FILE)
endif
DEFS_DKM_MK_INCLUDED = TRUE
# default values
ifdef OBJ_BASE_NAME
OBJ_BASE_NAMES ?= $(OBJ_BASE_NAME)
endif
# set directories
OBJ_DIR_ROOT ?= .
$(foreach base,$(OBJ_BASE_NAMES),$(eval OBJ_SUBDIR_$(base)=obj$$(CPU)$$(TOOL_SPECIFIC_DIR)$(base)))
$(foreach base,$(OBJ_BASE_NAMES),$(eval OBJDIR_$(base)=$$(OBJ_DIR_ROOT)/$$(OBJ_SUBDIR_$(base))))
$(foreach base,$(OBJ_BASE_NAMES),$(eval OBJS_$(base)?=$$(OBJS)))
$(foreach base,$(OBJ_BASE_NAMES),$(eval DEPEND_$(base)=$$(OBJS_$(base):.o=.d)))
ALL_OBJS = $(foreach base,$(OBJ_BASE_NAMES),$(OBJDIR_$(base))/$(OBJS_$(base))) $(OBJS)
EXISTING_OBJECTS = $(wildcard $(ALL_OBJS))
REQUIRED_DEPFILES = $(EXISTING_OBJECTS:.o=.d)
EXISTING_DEPFILES = $(wildcard $(REQUIRED_DEPFILES))
MISSING_DEPFILES = $(filter-out $(EXISTING_DEPFILES), $(REQUIRED_DEPFILES))
+37
View File
@@ -0,0 +1,37 @@
# defs.drivers - default documentation definitions for drivers
#
# Copyright 2005, Wind River Systems
#
# modification history
# --------------------
# 01f,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01e,28jul11,jam update mapping file for docs
# 01d,12may11,jam change mapping file version
# 01c,06jan11,jph check if mapping file exists
# 01b,08nov10,jph add mapping file
# 01a,25oct10,jph remove version
# 01a,19oct10,??? change version
# 01g,18oct10,??? change version
# 01f,22jul08,kkz Updating API book names
# 01e,04jun08,kkz Use variables for doc version number
# 01d,22jun07,kkz Updating apidoc version number
# 01c,09mar06,kkz Updated to 6.3
# 01b,15sep05,kkz Updated to 6.2
# 01a,15aug05,kkz Created
#
# DESCRIPTION
# This file is included in driver Makefiles to establish documentation defaults.
#
#
## docs flags and variables
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
DOC_DIR = $(DOCS_ROOT)/$(DOC_VX_DRV_API)
DOC_BOOK = VxWorks
DOC_CHAPTER = VxWorks_Driver_API_Reference
@@ -0,0 +1,21 @@
# defs.install.lp64.mk - make options definitions for LP64
#
# Copyright (c) 2009 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 01d,02jun09,mze change comments
# 01c,02jun09,mze change _SUFFIX_OPTION_lp64 to _SUFFIX_OPTION_LP64
# 01b,01jun09,mze changing LP64 macro
# 01a,23feb09,pee created
_OPTIONS_MAJOR += LP64
_SUFFIX_OPTION_LP64 = _lp64
@@ -0,0 +1,21 @@
# defs.install.AMP.mk - make options definitions for AMP
#
# Copyright (c) 2007 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 01c,18sep07,pee created
_OPTIONS_MAJOR += AMP
CFLAGS_OPTION_AMP = -D_WRS_VX_AMP
CFLAGS_AS_OPTION_AMP = -D_WRS_VX_AMP
C++FLAGS_OPTION_AMP = -D_WRS_VX_AMP
AS_FLAGS_OPTION_AMP = -D_WRS_VX_AMP
CFLAGS_PIC_OPTION_AMP = -D_WRS_VX_AMP
@@ -0,0 +1,24 @@
# defs.install.SMP.mk - make options definitions for SMP
#
# Copyright (c) 2007 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 01c,18sep07,pee created
_OPTIONS_MAJOR += SMP
CFLAGS_OPTION_SMP = -D_WRS_VX_SMP
CFLAGS_AS_OPTION_SMP = -D_WRS_VX_SMP
C++FLAGS_OPTION_SMP = -D_WRS_VX_SMP
AS_FLAGS_OPTION_SMP = -D_WRS_VX_SMP
CFLAGS_PIC_OPTION_SMP = -D_WRS_VX_SMP
_SUFFIX_OPTION_SMP = _smp
+238
View File
@@ -0,0 +1,238 @@
# defs.library - Host independent definitions for making libraries
#
# Copyright (c) 2003-2009, 2011, 2012 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 02a,29aug12,mze change to system-headers warning
# 01z,21aug12,mze add CC_WARN_SYSTEM_HEADERS
# 01y,15jun11,mze changes to DEBUG for diab
# 01x,13jun11,mze add VSB capibility to set DEBUG flags
# 01w,15oct08,pad Moved the VSB-related make fragment up before the inclusion
# of the CPU/TOOL make fragment.
# 01v,25jun09,pee changing include order to get VSB config earlier.
# 01u,02sep08,pee moving VSB definitions out.
# 01t,26may08,pee removing rules to build and clean files outside
# libraries such as scgen and vxbus files.
# 01s,08may08,pee removing confusing warning.
# 01r,23apr08,pee vsb
# 01q,09oct07,pee WIND00105890
# 01p,19sep07,pee WIND00105231
# 01o,03apr07,pee fixing default libname for legacy Makefiles.
# 01n,08mar07,pee Adding generic option support
# 01m,22may06,pee Adding support for multiple libraries
# 01l,15may06,lei Added DIR_EXT for SMP build
# 01k,21jul05,yvp Added _WRS_LIB_BUILD
# 01j,17may04,yvp Split SCGEN_DERIVED_FILES into SCGEN_DERIVED_GENERIC etc.
# 01i,21apr04,dlk Refine below change: do not skip CPU variant submake
# for this directory if DEFS_PAL is defined; but if
# this isn't an option library, don't build the common
# (non-variant) library.
# 01h,15mar04,dlk Do not skip directory if DEFS_PAL is defined.
# 01g,13mar04,dlk Support option builds. Fix mod history.
# 01f,yvp Changed SCGEN_DERIVED_FILES to match ver 02a of scgen.tcl script.
# 01e,.......,yvp Added more files to SCGEN_DERIVED_FILES.
# 01d,.......,yvp Removed genc.* from SCGEN_DERIVED_FILES; added syscallTbl.h
# 01c,.......,kk removed syscall.c from SCGEN_DERIVED_FILES
# 01b,.......,yvp Added SCGEN_DERIVED_FILES.
# 01a,.......,c_c written from rules.library v 02b
#
# DESCRIPTION
# This file is included by every Makefile in the run-time (not BSPs).
# This file contains makefile definitions that are host independent for creating
# vxWorks libraries.
#
#
# INCLUDES
# $(TGT_DIR)/h/make/defs.option
# $(TGT_DIR)/h/make/defs.default
# $(TGT_DIR)/h/tool/$(TOOL_FAMILY)/make.$(CPU)$(TOOL)
# $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
# avoid multiple inclusion
ifeq ($(DEFS_LIBRARY),)
DEFS_LIBRARY = TRUE
define libbase2libname
lib$(1)$$(OPT).a
endef
# By default object files are installed in the toolchain independent object
# directory if LIB_BASE_NAME is set, that is when LIB_COMMON is not set.
ifeq ($(LIB_COMMON),)
LIB_COMMON = true
endif
ifneq ($(LIB_BASE_NAMES),)
else
ifneq ($(LIB_BASE_NAME),)
# LIB_BASE_NAMES not defined. Taking definitions from LIB_BASE_NAME
LIB_BASE_NAMES = $(LIB_BASE_NAME)
OBJS_PRECOMP_$(LIB_BASE_NAME) = $(OBJS_PRECOMP)
OBJS_$(LIB_BASE_NAME) = $(OBJS_TO_BUILD)
ifeq ($(LIBNAME),)
LIBNAME = $(LIBDIRBASE)/lib$(LIB_BASE_NAME)$(OPT).a
endif
else
ifneq ($(LIBNAME),)
LIBNAMES = $(LIBNAME)
LIB_BASE_NAME = $(patsubst lib%,%,$(basename $(LIBNAME)))
LIB_BASE_NAMES = $(patsubst lib%,%,$(basename $(LIBNAME)))
LIBDIR_$(LIBNAME) = $(LIBDIR)
else
LIBNAME = $(LIBDIRBASE)/lib$(LIB_BASE_NAME)$(OPT).a
LIB_BASE_NAMES = $(LIB_BASE_NAME)$(OPT)
endif # else if LIBNAME
endif # else if LIB_BASE_NAME
endif # if LIB_BASE_NAMES
ifeq ($(LIBDIRBASE),)
ifeq ($(findstring false,$(LIB_COMMON)),false)
LIBDIRBASE = $(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL_SPECIFIC_DIR)$(LIB_DIR_TAG)$(MINOR_OPTION_SUFFIX)
else
LIBDIRBASE = $(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(LIB_DIR_TAG)$(MINOR_OPTION_SUFFIX)
endif
endif
ifeq ($(LIBNAMES),)
LIBNAMES = $(foreach base, $(LIB_BASE_NAMES), $(LIBDIRBASE)/lib$(base)$(OPT).a)
endif
ifeq ($(LIBNAME),)
LIBNAME = lib$(CPU)$(TOOL)vx.a
endif
#ifneq ($(LIB_BASE_NAME),)
#ifeq ($(LIBDIRNAME),)
#LIBDIRNAME = $(LIBDIRBASE)/obj$(LIB_BASE_NAME)$(OPT)
#endif
#endif
## Build of specific target archive(s) via VX_ARCHIVE_LIST:
# If VX_ARCHIVE_LIST is set only the specified target archive(s) are built.
# This means that source directories not contributing to these archive(s)
# are skipped. VX_ARCHIVE_LIST is used with CPU variant builds.
ifneq ($(VX_ARCHIVE_LIST),)
VX_ARCHIVE_BASE_NAMES := $(foreach libname, $(VX_ARCHIVE_LIST), $(patsubst lib%,%,$(basename $(libname))))
LIB_BASE_NAMES := $(filter $(VX_ARCHIVE_BASE_NAMES), $(LIB_BASE_NAMES))
ifeq ($(LIB_BASE_NAMES),)
SKIP_DIR = true
endif
endif
include $(TGT_DIR)/h/make/defs.option
## If we are doing an option build, skip directories which
# don't build libraries specified in LIB_BASE_NAMES$(OPT).
# However, src/arch needs to be built to get the variant
# builds of its subdirectories, even though its own Makefile
# doesn't specify LIB_BASE_NAME. More generally, we don't
# skip directories where defs.pal has been included.
# Note, this assumes defs.pal is included before this file.
ifneq ($(OPT),)
ifneq ($(LIB_BASE_NAMES),)
LIB_BASE_NAMES := $(filter $(LIB_BASE_NAMES),$(LIB_BASE_NAMES$(OPT)))
endif
ifeq ($(LIB_BASE_NAMES),)
SKIP_DIR = true
SKIP_CLEAN = true
endif
# Don't skip if this is the top level of a PAL/cpu-variant build
ifneq ($(DEFS_PAL),)
ifneq ($(NO_RECURSE), TRUE)
# nevertheless, don't build the common library
ifeq ($(SKIP_DIR), true)
SKIP_LIB = true
endif
SKIP_DIR =
SKIP_CLEAN =
endif
endif # ifneq ($(DEFS_PAL),)
endif # ifneq ($(OPT),)
ifeq ($(WIND_HOST_TYPE),x86-win32)
WIND_BASE := $(subst \,/,$(WIND_BASE))
endif
TGT_DIR=$(WIND_BASE)/target
include $(TGT_DIR)/h/make/defs.default
# Include the file defining the VSB-related variables before the inclusion of
# the CPU/TOOL make fragment so that VSB configuration options can be used in
# the make fragments.
ifneq ($(wildcard $(VSB_MAKE_CONFIG_FILE)),)
include $(VSB_MAKE_CONFIG_FILE)
endif
include $(TGT_DIR)/h/tool/$(TOOL_FAMILY)/make.$(CPU)$(TOOL)
# the DEBUG settings must be done after inclusion of the TOOL specific make fragment
ifdef _WRS_CONFIG_DEBUG_FLAG
CC_OPTIM_DEBUG = -g
ifndef DEBUG_FLAG_ALLOW_OPTIMIZATION
# CC_OPTIM_DISABLE is defined only for diab in defs.diab
CC_OPTIM_XO = $(CC_OPTIM_DISABLE)
endif
endif
# Only set the following flag if enabled in the VSB
ifdef _WRS_CONFIG_WARN_SYSTEM_HEADERS
CC_WARN_SYSTEM_HEADERS = $(OPTION_SYS_HEADERS)
endif
include $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
CC_DEFINES += $(OPTION_DEFINE_MACRO)_WRS_LIB_BUILD
# This should come after including make.$(CPU)$(TOOL)
# SCGEN_DERIVED_GENERIC = $(TGT_DIR)/h/syscall.h $(TGT_DIR)/h/syscallTbl.h
# SCGEN_DERIVED_ARCH = $(TGT_DIR)/h/arch/$(ARCH_DIR)/syscallArgs$(ABI_SPEC).h
# SCGEN_DERIVED_FILES = $(SCGEN_DERIVED_GENERIC) $(SCGEN_DERIVED_ARCH)
endif # ifeq ($DEFS_LIBRARY),)
$(foreach base, $(LIB_BASE_NAMES), $(eval LIBDIRNAME_$(base)=$$(LIBDIRBASE)/obj$(base)$$(OPT)))
$(foreach base, $(LIB_BASE_NAMES), $(eval LIBDIR_$(base)=$$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRNAME_$(base)))))
$(foreach base, $(LIB_BASE_NAMES), $(eval PRECOMPDIR_$(base)=$$(TGT_DIR)/precomp/default$$(MAJOR_OPTION_SUFFIX)/$$(LIBDIRNAME_$(base))))
$(foreach base, $(LIB_BASE_NAMES), $(if $(findstring undefined,$(origin OBJS_$(base))),$(eval OBJS_$(base)=$$(OBJS)),))
# this command conditionally override the definition above.
# This construct is required because of a limitation of the current make that does not like eval inside conditions
ifneq ($(LIBDIRNAME),)
LIBDIRNAME_$(LIB_BASE_NAME) = $(LIBDIRNAME)
LIBDIRBASE =
else
LIBDIRNAME = $(LIBDIRBASE)/obj$(LIB_BASE_NAME)$(OPT)
endif
TOOL_OPTIONS_FILES_DIR = $(LIB_ROOT)/$(LIBDIRNAME)
+118
View File
@@ -0,0 +1,118 @@
# defs.link - libraries and libraries search path definitions
#
# Copyright (c) 2001, 2003-2007, Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 04u,12may08,pee deprecating legacy top level libraries.
# 04t,16oct07,dlk Fix interaction between option build and MANAGED_LIBS/
# COMPONENT_LIBS.
# 04s,02may07,tkf moved component info to defs.comps
# 04r,08mar07,pee added support for generic option framework
# 04q,03jan07,pee WIND00087260 resolved the issue of a install-path with "-L"
# 04p,26dec06,tkf Set OPT=-basic for bootrom* targets (as workaround for
# CQ84418).
# 04o,21sep06,pee WIND00066289
# 04n,15may06,lei added DIR_EXT for SMP build
# 04m,16jan06,pee exclude libraries that are managed in the CDF with MANAGED_LIBS
# add selected component libraries with COMPONENT_LIBS
# 04l,15sep05,jlb Use CPU_CLASS to access middleware component archives
# 04k,28apr05,edc Fixed component libpaths from WS_ROOT_DIR such that it
# propagates the macro when WS_ROOT_DIR is defined as UNKNOWN
# during VIP create time.
# 04j,22apr05,edc Did not (could not) break up lines 82-89.
# 04i,22apr05,edc Added component libpaths from the workspace directory,
# broke long lines, and added comments.
# 04h,19may04,dlk Include defs.option from this file.
# 04g,03feb04,dlk support option builds.
# 04f,30jan03,pch add LD_LINK_PATH_ATEND
# 04e,12nov01,j_s written
#
# DESCRIPTION
# This file defines OS libraries VX_OS_LIBS and the library search paths
# LD_LINK_PATH. LIBS is also defined here which includes LIB_EXTRA and
# VX_OS_LIBS by default. It can be overwitten by project. This file is
# included by both defs.bsp and defs.project
include $(TGT_DIR)/h/make/defs.option
## libraries
#
# LD_LINK_PATH: list of paths that ld search for archive libraries.
# It includes the tool independant and dependant directories, as
# well as any additional directory specified via
# LD_LINK_PATH_EXTRA.
# LD_LINK_LIBS: list of libraries searched by ld in the paths defined by
# LD_LINK_PATH. This list is automatically generated and
# corresponds to all of the libraries located in the directories
# specified in LD_LINK_PATH whose name is of the form libXXX.a.
#
LD_LINK_PATH = $(LD_LINK_PATH_EXTRA) \
-L$(LIB_ROOT)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL)$(MINOR_OPTION_SUFFIX)
LD_LINK_PATH += -L$(LIB_ROOT)/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_OPTION_SUFFIX)
# ifneq ($(LD_LINK_PATH_ATEND),)
LD_LINK_PATH += $(LD_LINK_PATH_ATEND)
# endif
LIBS_PRESENT = $(notdir $(foreach dir, $(patsubst -L%,%, $(LD_LINK_PATH)), \
$(wildcard $(dir)/lib*.a)))
# The option libraries are those containing a dash '-' in their name.
# No non-option library may contain a dash.
OPT_LIBS_PRESENT = $(notdir $(foreach dir, $(patsubst -L%,%, $(LD_LINK_PATH)), \
$(wildcard $(dir)/lib*-*.a)))
ifneq ($(OPT),)
OPT_LIBS = $(filter %$(OPT).a, $(LIBS_PRESENT))
THIS_OPT_LIBS = $(patsubst %,lib%.a,$(LIB_BASE_NAMES$(OPT)))
else
OPT_LIBS =
THIS_OPT_LIBS =
endif
# Override OPT, OPT_LIBS, and THIS_OPT_LIBS for the 'bootrom*' targets
bootrom bootrom_uncmp bootrom_res bootrom_res_high : OPT=-basic
bootrom bootrom_uncmp bootrom_res bootrom_res_high : OPT_LIBS = $(filter %$(OPT).a, $(LIBS_PRESENT))
bootrom bootrom_uncmp bootrom_res bootrom_res_high : THIS_OPT_LIBS = $(patsubst %,lib%.a,$(LIB_BASE_NAMES$(OPT)))
OPT_MANAGED_LIBS = $(patsubst %.a,%$(OPT).a,$(filter $(THIS_OPT_LIBS), $(MANAGED_LIBS)))
OPT_NONMANAGED_LIBS = $(filter-out $(OPT_MANAGED_LIBS), $(OPT_LIBS))
OPT_COMPONENT_LIBS = $(patsubst %.a,%$(OPT).a,$(filter $(THIS_OPT_LIBS), $(COMPONENT_LIBS)))
# Remove any option libraries, and also any libraries replaced
# by option libraries for the present $(OPT) value.
#
# COMPONENT_LIBS and MANAGED_LIBS are assumed not to contain any
# library names with OPT extensions, only the base-named libriaries.
# This keeps the OPT build orthogonal to the ARCHIVE/managed build.
NONOPT_COMPONENT_LIBS = $(filter-out $(THIS_OPT_LIBS), $(COMPONENT_LIBS))
NONOPT_LIBS = $(filter-out $(OPT_LIBS_PRESENT) $(THIS_OPT_LIBS) $(MANAGED_LIBS), \
$(LIBS_PRESENT)) $(NONOPT_COMPONENT_LIBS)
LD_LINK_LIBS = $(patsubst lib%.a,-l%, $(OPT_COMPONENT_LIBS) $(OPT_NONMANAGED_LIBS) $(NONOPT_LIBS))
ifeq ($(CPU_CLASS),)
CPU_CLASS = $(CPU)
endif
#
# VX_OS_LIBS: libraries present in LD_LINK_PATH
# LIBS: customer's libraries and VX_OS_LIBS
#
VX_OS_LIBS = $(LD_LINK_LIBS)
LIBS = $(LIB_EXTRA) $(VX_OS_LIBS)
-include $(TGT_DIR)/h/make/defs.comps
+95
View File
@@ -0,0 +1,95 @@
# defs.memory - memory oriented build definitions
#
# Copyright 2004, 2010 Wind River Systems, Inc.
#
# modification history
# --------------------
# 01c,18aug10,slk add LOCAL_MEM_PHYS_ADRS and LOCAL_UNMAPPED_BASE_ADRS to
# ADRS_MACROS
# 01b,01jun10,slk add LMM_ENABLED
# 01a,02jul04,fle written
# DESCRIPTION
# This build definition file sets the ADRS_MACROS and ADRS_DEFINE build macros.
#
# The ADRS_MACROS build macro list the build macros the kernel configuration
# tool will have to get from cdf files, and write in the kernel configuration
# Makefile.
#
# The ADRS_DEFINE build macros is part of the CC_DEFINES, and is passed to the
# compilers as a definition macro
#
# TREE
# This file is included by :
#
# $(TGT_DIR)/h/make/rules.memory
#
# SEE ALSO: vxprj
# default values for some later comparisons
DEFAULT_ADJUST_VMA = 0
DEFAULT_VMA_START = 0
DEFAULT_DATA_SEG_ALIGN = 1
ADRS_MACROS += RAM_LOW_ADRS RAM_HIGH_ADRS LOCAL_MEM_LOCAL_ADRS \
ADJUST_VMA DATA_SEG_ALIGN LMM_ENABLED \
LOCAL_UNMAPPED_BASE_ADRS LOCAL_MEM_PHYS_ADRS
ADRS_DEFINE =
# the addresses may be defined with 0x values, or just hex value without
# the leading 0x, we should make sure ADRS_DEFINE does not add extra 0x when it
# is not required
# LOCAL_MEM_LOCAL_ADRS should be given to the compilers
ifdef LOCAL_MEM_LOCAL_ADRS
ifneq ($(findstring 0x, $(LOCAL_MEM_LOCAL_ADRS)),)
ADRS_DEFINE += $(OPTION_DEFINE_MACRO)LOCAL_MEM_LOCAL_ADRS=$(LOCAL_MEM_LOCAL_ADRS)
else
ADRS_DEFINE += $(OPTION_DEFINE_MACRO)LOCAL_MEM_LOCAL_ADRS=0x$(LOCAL_MEM_LOCAL_ADRS)
endif
endif
# RAM_LOW_ADRS should be given to the compilers
ifdef RAM_LOW_ADRS
ifneq ($(findstring 0x, $(RAM_LOW_ADRS)),)
ADRS_DEFINE += $(OPTION_DEFINE_MACRO)RAM_LOW_ADRS=$(RAM_LOW_ADRS)
else
ADRS_DEFINE += $(OPTION_DEFINE_MACRO)RAM_LOW_ADRS=0x$(RAM_LOW_ADRS)
endif
endif
# RAM_HIGH_ADRS should be given to the compilers
ifdef RAM_HIGH_ADRS
ifneq ($(findstring 0x, $(RAM_HIGH_ADRS)),)
ADRS_DEFINE += $(OPTION_DEFINE_MACRO)RAM_HIGH_ADRS=$(RAM_HIGH_ADRS)
else
ADRS_DEFINE += $(OPTION_DEFINE_MACRO)RAM_HIGH_ADRS=0x$(RAM_HIGH_ADRS)
endif
endif
# DATA_SEG_ALIGN is not meant to be given to the compiler, just the linker
# scripts
ifdef DATA_SEG_ALIGN
ifneq ($(findstring 0x, $(DATA_SEG_ALIGN)),)
LD_DATA_SEG_ALIGN = $(strip $(LD_DATA_SEG_ALIGN_FLAG))=$(DATA_SEG_ALIGN)
else
LD_DATA_SEG_ALIGN = $(strip $(LD_DATA_SEG_ALIGN_FLAG))=0x$(DATA_SEG_ALIGN)
endif
else
DATA_SEG_ALIGN = $(DEFAULT_DATA_SEG_ALIGN)
LD_DATA_SEG_ALIGN = $(strip $(LD_DATA_SEG_ALIGN_FLAG))=$(DATA_SEG_ALIGN)
endif
# ADJUST_VMA is used only if it is different from the DEFAULT_ADJUST_VMA.
# If it is not set yet, just set it to DEFAULT_ADJUST_VMA
ifndef ADJUST_VMA
ADJUST_VMA = $(DEFAULT_ADJUST_VMA)
endif
+220
View File
@@ -0,0 +1,220 @@
# defs.option - makefile definitions related to option builds
#
# Copyright (c) 1984-2006 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 01z,15sep10,xhs support IPLITE
# 01y,05feb10,mry Add ipmacsec lib
# 01x,11jun09,dwb Adding vxdot1x
# 01w,16dec08,mry Add wps lib
# 01v,25mar09,pee WIND00160969
# 01u,11feb09,ggz Move coreip and bridge into CVS
# 01u,03dec08,f_g Added ipsctp to IP_LIB_BASE_NAMES.
# 01t,25aug08,pee adding to the list.
# 01t,25aug08,pee adding files to inet6 list.
# 01s,30jun08,mze allow -inet6only as a OPT and removed the -fr variations
# 01r,30may08,dlk Added vxmux to IP_LIB_BASE_NAMES.
# 01q,29oct07,mry Merging ipsupp/ipeap changes
# 01p,10sep07,mry Add 8021x lib
# 01o,05oct07,pee adding INET / INET6 definition and caching. Moved from
# ipcom.
# 01n,20sep07,pee WIND00105231
# 01m,01jun06,tkf Add netcommon, netapps, and netwrap to IP_LIB_BASE_NAMES.
# 01l,26dec06,tkf Define IPBASIC for bootrom* targets (as workaround for
# CQ84418).
# 01k,14dec06,tkf Define IPBASIC if OPT==-basic.
# 01j,13dec06,tkf Added OPT=-basic option.
# 01k,17oct06,kch Removed unsupported directories from IP_LIB_BASE_NAMES.
# Also added ipradius to IP_LIB_BASE_NAMES.
# 01j,22sep06,dlk Add interpeak stack support. Remove virtual stack OPTS.
# 01i,09jan06,kch Include firewall to the -inet6 build option for MSP.
# 01h,15apr05,kch Changed 'inet6_fr' to '-inet6_fr' and 'inet6_vs_fr'
# to '-inet6_vs_fr'.
# 01g,14apr05,kch Fixed SUPPORTED_OPTIONS such that virtual stack build
# options will be supported for MSP only. Added ROUTER_STACK
# setting to virtual stack option builds.
# 01f,31mar05,kch Added the -vs, -vs_fr, -inet6_vs and inet6_vs_fr build
# options for virtual stack.
# 01e,23sep04,dlk Use OPT_DEFINE instead of EXTRA_DEFINE. Using
# EXTRA_DEFINE requires 'override', which breaks later
# additions to EXTRA_DEFINE (e.g. in some BSPs) which
# don't use 'override'.
# 01d,02sep04,dlk Remove dsi from -inet6 builds. Tighten check
# on OPT validity. Add aim to free build libraries.
# Do not modify ADDED_CFLAGS.
# 01c,04may04,dlk Added the -inet6_fr build option. Remove references
# to the fpio library.
# 01b,20apr04,dlk Added -inet6 build option.
# 01a,04feb04,dlk written.
#
# DESCRIPTION
#
# This file is included in Makefiles to establish information related
# to option builds, in particular the lists of libraries which support
# particular option builds.
#
# Protect against multiple inclusion.
ifeq ($(DEFS_OPTION),)
DEFS_OPTION = TRUE
# For GPP build, the environment variable $FEATURE_SET is either set to "gpp"
# or simply not defined at all. Here it is assumed that the top-level Feature
# Set Makefile (if exist) has verified the setting of the $FEATURE_SET
# variable (if defined).
ifeq ($(FEATURE_SET),)
_GPP_BUILD = TRUE
else
ifeq ($(FEATURE_SET),gpp)
_GPP_BUILD = TRUE
endif
endif
# Supported build options for all products
ifeq ($(WIND_IPLITE),true)
SUPPORTED_OPTIONS = -inet6 -basic
else
SUPPORTED_OPTIONS = -inet6only -inet6 -basic
endif
# Supported build options for MSP platform products.
ifeq ($(_GPP_BUILD),)
SUPPORTED_OPTIONS +=
endif
# Check that OPT is valid. If not, fail.
_empty_ =
_space_ = $(_empty_) $(_empty_)
ifneq ($(OPT),)
ifneq ($(findstring $(_space_),$(OPT)),)
$(error OPT may not contain spaces: "$(OPT)")
endif
ifeq ($(filter $(OPT), $(SUPPORTED_OPTIONS)),)
$(error OPT="$(OPT)" is unsupported. Allowed: $(SUPPORTED_OPTIONS))
endif
endif
# It's ugly to have to list these explicitly here, but not _too_ ugly.
# Note that these are IPPROD values, which are sometimes different from
# the top level directory names; in some cases, several IPPROD values fall
# under the same top level directory.
#
# Several of these won't be used or built for VxWorks.
# Please keep in alphabetical order.
IP_LIB_BASE_NAMES := \
agent \
coex \
devkit \
engine \
ipappl \
ipcci \
ipcom \
ipcom_vxworks \
ipdhcpc6 \
ipdhcpr \
ipdhcps \
ipdhcps6 \
ipeap \
ip8021x \
ipwps \
ipfirewall \
iphwcrypto \
ipike \
ipipsec2 \
ipmcp \
ipmcrypto \
ipmip6 \
ipmip6mn \
ipmipfa \
ipmipha \
ipmipmn \
ipmpls \
ipnet \
ipnet_krn \
ipppp \
iprip \
ipripng \
ipradius \
ipsctp \
ipsntp \
ipssh \
iptcp \
mibtable \
snmp_agt \
snmpv3 \
vxcompat \
vxmux \
vxbridge \
vxcoreip \
wrsnmp \
vxdot1x \
ipmacsec
IP_COMPONENT_LIB_BASE_NAMES = ipcrypto ipcrypto_apps ipdiameter ipmip4 ipmip iprohc ipssl ipwlan
ifeq ($(OPT),-inet6)
export _INET6_BUILD := 1
OPT_DEFINE += -DINET6
endif
LIB_BASE_NAMES-inet6 := netcommon netapps netwrap $(IP_LIB_BASE_NAMES) $(IP_COMPONENT_LIB_BASE_NAMES)
ifeq ($(_GPP_BUILD),)
LIB_BASE_NAMES-inet6 +=
endif
ifeq ($(OPT),-basic)
OPT_DEFINE += -DIPBASIC
endif
# Workaround for CQ84418
bootrom bootrom_uncmp bootrom_res bootrom_res_high: OPT_DEFINE += -DIPBASIC
LIB_BASE_NAMES-basic := netcommon netapps netwrap $(IP_LIB_BASE_NAMES)
###
# The following section is added to support IPv6-Only build. The macro INET
# is always defined by default unless the INET6_ONLY macro is defined
#
# This code fragment is not to be use during vxWorks image build since
# the macros INET6_ONLY, INET6 are not guranteed to be defined.
#
ifeq ($(BSP_NAME),)
ifeq ($(findstring -inet6only,$(OPT)),-inet6only)
_INET6_ONLY_BUILD = 1
else
ifeq ($(findstring -inet6,$(OPT)),-inet6)
_INET6_BUILD = 1
endif
endif
ifneq ($(_INET6_ONLY_BUILD),)
ifeq ($(filter -DINET6,$(EXTRA_DEFINE)),)
EXTRA_DEFINE += -DINET6
endif
else
ifeq ($(filter -DINET,$(EXTRA_DEFINE)),)
EXTRA_DEFINE += -DINET
endif
ifneq ($(_INET6_BUILD),)
ifeq ($(filter -DINET6,$(EXTRA_DEFINE)),)
EXTRA_DEFINE += -DINET6
endif
endif
endif
endif
endif # ifeq ($(DEFS_OPTION),)
+141
View File
@@ -0,0 +1,141 @@
# defs.options - build option framework
#
# Copyright (c) 2007 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 01g,13may09,mze change reference to TGT_DIR to be WIND_BASE/target
# 01f,08oct08,pee WIND00137789
# 01e,04sep08,pee adding variable to allow protection from multiple
# inclusion.
# 01d,04feb08,pee adding make variables to define selected options.
# 01c,18sep07,pee separating SMP & AMP definitions in a separate optional file.
# 01b,13jul07,ebh Added AMP flag support
# 01a,08mar07,pee created
# DESCRIPTION
# This file implements a build oprtion framework for vxWorks kernel
# libraries and applications.
#
# This framework accepts build options and expands associated make
# variables to be used in building and using vxWorks kernel libraries.
#
# This file contains the make code to perform the variable expansion,
# as well as alll the architecture independent definitions.
# use this variable to find if this file was already included
__DEFS_OPTIONS_INCLUDED = TRUE
# this variable defines the name of the variable to use to pass options
# to make
_OPTION_COMMAND = VXBUILD
# define the classes of options
_OPTION_CLASSES = MAJOR ARCH CPU MINOR
# define option variables
_OPTION_VARS = CFLAGS CFLAGS_AS C++FLAGS AS_FLAGS CFLAGS_PIC
# major options.
# may define default lib directory
# this is the list of accepted options
_OPTIONS_MAJOR =
_OPTIONS_ARCH =
_OPTIONS_CPU =
_OPTIONS_MINOR =
###################################################################
#
# beginning of option specific definition section
#
# in this section, you may define, for a given option,
# - any of the variable defined in _OPTION_VARS
# <var>_OPTION_<option> = <value>
# - a specific subroutine to be evaluated for the option
# define _option_sub_<option>
# <>
# endef
# - a class suffix for the option
# _SUFFIX_OPTION_<option> = <value>
# suffix should normally include a leading underscore
#
###################################################################
# load optional feature installation files
__OPTION_INSTALL_FILES__ = $(wildcard $(WIND_BASE)/target/h/make/defs.install.*.mk)
ifneq ($(__OPTION_INSTALL_FILES__),)
include $(__OPTION_INSTALL_FILES__)
endif
############################################
#
# end of option specific definition section
#
############################################
#
# variable expansion section
#
############################################
_ALL_OPTIONS = $(foreach class,$(_OPTION_CLASSES),$(_OPTIONS_$(class)))
# processing user selected options
$(foreach class,$(_OPTION_CLASSES),\
$(eval _USER_$(class)_OPTIONS =\
$(filter $(_OPTIONS_$(class)),$($(_OPTION_COMMAND)))))
# verify that all options used are defined
_USER_INVALID_OPTIONS = $(filter-out $(_ALL_OPTIONS),$($(_OPTION_COMMAND)))
ifneq ($(strip $(_USER_INVALID_OPTIONS)),)
$(error *** invalid options $(_USER_INVALID_OPTIONS) selected)
endif
# list concatenation function
_concat = $(if $(word 2,$(1)),$(firstword $1)$(call _concat,$(wordlist 2,$(words $1),$1)),$1)
###############################################
# generate the option variables
# <var>_OPTIONS_ALL
###############################################
$(foreach class,$(_OPTION_CLASSES),\
$(foreach var,$(_OPTION_VARS),\
$(eval $(var)_$(class)_OPTIONS =\
$(foreach option,$(_USER_$(class)_OPTIONS),$($(var)_OPTION_$(option))))))
$(foreach var,$(_OPTION_VARS),\
$(eval $(var)_OPTIONS_ALL =\
$(foreach class,$(_OPTION_CLASSES),$($(var)_$(class)_OPTIONS))))
###############################################
# generate the class suffixes
# <class>_OPTION_SUFFIX
###############################################
# specify suffixes defiend from command line
$(foreach class,$(_OPTION_CLASSES),\
$(eval $(class)_CLI_OPTION_SUFFIX = \
$(call _concat,$(sort \
$(foreach option,$(_USER_$(class)_OPTIONS), $(_SUFFIX_OPTION_$(option)))))))
# main suffixes defined from VSB configuration
$(foreach class,$(_OPTION_CLASSES),\
$(eval $(class)_OPTION_SUFFIX =\
$$(call _concat,$$(sort \
$$(foreach option,$(_OPTIONS_$(class)),$$(if $$(_WRS_CONFIG_$$(option)),$$(_SUFFIX_OPTION_$$(option)))))))\
)
###############################################
# call option specific subroutines
###############################################
$(foreach option,$($(_OPTION_COMMAND)),$(eval $(call _option_sub_$(option))))
+93
View File
@@ -0,0 +1,93 @@
# defs.pal - PAL related definitions for making libraries
#
# Copyright 2003-2009, Wind River Systems, Inc.
#
# modification history
# --------------------
# 01l,15oct10,pee WIND00210572
# 01k,21sep10,pee WIND00234014
# 01j,11dec09,mze add echo to string
# 01i,27jul09,pee adding tags
# 01h,20may09,pee adding support for interface target
# 01g,05nov08,mze pass VSB_DIR down in recursive make
# 01f,16sep08,pee fixing recursion problem.
# 01e,17jun08,pee VSB adaptation
# 01d,29apr05,md added CPU variant make depend
# 01c,15mar04,dlk Set DEFS_PAL. Fix modification history.
# 01b,.......,c_c Added a definition for cleaning the CPU variant dependent
# libraries.
# 01a,.......,c_c written from rules.library v 02b
#
## CPU variant builds:
# List of CPU variant builds: CPU_VARIANT_TAG_LIST
# This list is computed for the current CPU/TOOL combinaison. Note that CPU
# variant build(s) are started as part of the 'Default' rule (see rules.library)
# Defining DEFS_PAL non-empty is needed in defs.library by the option build
# logic to ensure we don't skip any directory including this file,
# particularly src/arch.
DEFS_PAL = TRUE
# this is a workaround to a deficiency in make 3.80.
# will be fixed in 3.81
# eval functions in defs.library cannot be put inside coditional, so the condition
# is tested here
ifeq ($(DEFS_LIBRARY),)
include $(TGT_DIR)/h/make/defs.library
endif
TOOL_TAG = $(BUILD_FP_PREFIX)$(TOOL_FAMILY)$(BUILD_ENDIAN_SUFFIX)
ifneq ($(CPU_VARIANT_LIST),)
CPU_VARIANT_TAG_LIST_TMP1 = \
$(foreach cpuVariantTag, $(CPU_VARIANT_LIST), \
$(filter $(CPU)$(TOOL_TAG), \
$(CPU_VARIANT_CPU_TOOL_LIST$(cpuVariantTag)))$(cpuVariantTag))
CPU_VARIANT_TAG_LIST_TMP2 = $(filter $(CPU)$(TOOL_TAG)%, \
$(CPU_VARIANT_TAG_LIST_TMP1))
CPU_VARIANT_TAG_LIST = $(patsubst $(CPU)$(TOOL_TAG)%, %, \
$(CPU_VARIANT_TAG_LIST_TMP2))
# Generate list of make commands for CPU variant builds: CPU_VARIANT_MAKE_CMD
ifneq ($(CPU_VARIANT_TAG_LIST),)
CPU_VARIANT_MAKE_CMD = echo "Build of CPU variants" $(newline)
CPU_VARIANT_MAKE_CMD += $(foreach cpuVariant, $(CPU_VARIANT_TAG_LIST), \
$(tab) $(MAKE) CPU=$(CPU) TOOL=$(TOOL) VSB_DIR=$(VSB_DIR) LIB_DIR_TAG=$(cpuVariant) \
VX_ARCHIVE_LIST="$(VX_ARCHIVE_LIST$(cpuVariant))" TARGET=$(TARGET) \
NO_RECURSE=TRUE _WRS_CONFIG_FP=$(_WRS_CONFIG_FP) $(RECURSE_TARGET) $(newline))
CPU_VARIANT_MAKE_CLEAN = echo "Removal of CPU variants" $(newline)
CPU_VARIANT_MAKE_CLEAN += $(foreach cpuVariant, $(CPU_VARIANT_TAG_LIST), \
$(tab) $(MAKE) CPU=$(CPU) TOOL=$(TOOL) VSB_DIR=$(VSB_DIR) LIB_DIR_TAG=$(cpuVariant) \
VX_ARCHIVE_LIST="$(VX_ARCHIVE_LIST$(cpuVariant))" TARGET=$(TARGET) \
NO_RECURSE=TRUE rclean $(newline))
CPU_VARIANT_MAKE_DEPEND = echo "Build of CPU variant depend files" $(newline)
CPU_VARIANT_MAKE_DEPEND += $(foreach cpuVariant, $(CPU_VARIANT_TAG_LIST), \
$(tab) $(MAKE) CPU=$(CPU) TOOL=$(TOOL) VSB_DIR=$(VSB_DIR) LIB_DIR_TAG=$(cpuVariant) \
VX_ARCHIVE_LIST="$(VX_ARCHIVE_LIST$(cpuVariant))" TARGET=$(TARGET) \
NO_RECURSE=TRUE rdepend $(newline))
CPU_VARIANT_MAKE_TAGS += @echo "Build of CPU variant kernel tags" $(newline)
CPU_VARIANT_MAKE_TAGS += $(foreach cpuVariant, $(CPU_VARIANT_TAG_LIST), \
$(tab) $(MAKE) CPU=$(CPU) TOOL=$(TOOL) VSB_DIR=$(VSB_DIR) LIB_DIR_TAG=$(cpuVariant) \
VX_ARCHIVE_LIST="$(VX_ARCHIVE_LIST$(cpuVariant))" TARGET=$(TARGET) \
NO_RECURSE=TRUE tags $(newline))
CPU_VARIANT_MAKE_INTERFACE += @echo "Build of CPU variant interfaces" $(newline)
CPU_VARIANT_MAKE_INTERFACE += $(foreach cpuVariant, $(CPU_VARIANT_TAG_LIST), \
$(tab) $(MAKE) CPU=$(CPU) TOOL=$(TOOL) VSB_DIR=$(VSB_DIR) LIB_DIR_TAG=$(cpuVariant) \
VX_ARCHIVE_LIST="$(VX_ARCHIVE_LIST$(cpuVariant))" TARGET=$(TARGET) \
NO_RECURSE=TRUE interface $(newline))
CPU_VARIANT_MAKE_CLEAN_INTERFACE += @echo "Removal of CPU variant interfaces" $(newline)
CPU_VARIANT_MAKE_CLEAN_INTERFACE += $(foreach cpuVariant, $(CPU_VARIANT_TAG_LIST), \
$(tab) $(MAKE) CPU=$(CPU) TOOL=$(TOOL) VSB_DIR=$(VSB_DIR) LIB_DIR_TAG=$(cpuVariant) \
VX_ARCHIVE_LIST="$(VX_ARCHIVE_LIST$(cpuVariant))" TARGET=$(TARGET) \
NO_RECURSE=TRUE clean_interface $(newline))
endif
endif
+152
View File
@@ -0,0 +1,152 @@
# defs.project - project default makefile definitions
#
# Copyright (c) 1997-2008, 2010, 2012 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement
#
# modification history
# --------------------
# 02j,02feb12,mze add .CPP as a valid suffix
# 02i,24feb10,mze adding icc
# 02h,09feb10,pee include order
# 02g,15oct08,pad Added VSB-related definitions before the inclusion of the
# CPU/TOOL make fragment.
# 02f,08mar07,pee added support for generic option framework
# 02e,06Feb06,pee added support for linker symbol definition.
# 02d,08Aug05,pee added definition of files generated by configGen
# 02c,09sep04,fle SPR#88074 : added PRJ_MAKEFILE
# 02b,09feb04,fle Adapted to new host utilities locations
# 02a,19aug03,fle removed references to cxrGen.tcl and mxrGen.tcl
# SPR#88802 : use WTXTCL macro for TRIM_TOOL
# 01z,15jan02,rbl define a WIND_PROJECT_MAKEFILE variable so we can tell
# if it's a project build
# 01y,12nov01,j_s changed to include defs.link for libraries definitions
# 01x,20oct01,dat Relocating tool specific macro
# 01w,25sep01,dat Default values for TOOL_FAMILY
# 01v,17sep01,sn moved definitions of LARGE_PROJECT, MUNCH_FLAGS and related
# macros to defs.gnu; moved uses of LARGE_PROJECT to
# rules.project
# 01u,13jul01,t_m fix test for SIM CPU type definitions
# 01t,20apr01,mem Add LD_ENDIAN_FLAG
# 01s,23mar01,roz Fix check for GNU compiler.
# 01r,25jan00,dra Suppress warnings when compiling symbol table.
# 01q,02nov99,dra Added back hack for collect2.
# 01p,27oct99,rsh Add definition of OBJCPY
# 01o,10aug99,jld Revert LARGE_PROJECT change -- no longer using T1 compiler.
# 01n,23jun99,rsh Edit to turn off LARGE_PROJECT facility so that it will
# work with T1 compiler.
# 01m,31mar99,tdl added $(LD_PARTIAL_LAST_FLAGS)
# 01l,04mar99,sn added machinery to handle large projects
# 01k,18feb99,sn merge POST_MUNCH and MUNCH, add MUNCH_FLAGS
# 01j,17nov98,sn reworked munch
# 01i,11nov98,sn partially link using LD_PARTIAL
# 01h,11nov98,sn munch -> orderCtors
# 01g,05nov98,ms -traditional -> -fdollars-in-identifiers
# 01f,30oct98,yh added TRIM_TOOL.
# 01e,26oct98,ms added Cy's OPTION_* flags
# 01e,08apr99,bc Merge in objcopy invocations from Aeolus
# 01d,29jun98,ms removed "-n" from NM_GLOB_FLAGS
# 01c,29jun98,ms added NM_GLOB_FLAGS, MXR_USR_OBJS.
# 01c,26jun98,ms tool suffix change: VX_CPU_FAMILY->TOOLENV.
# 01b,02apr98,pcn Removed Objcopy changes from Tempest view
# 01a,10oct97,ms written based on defs.bsp
#
# DESCRIPTION
# This file is included into project makefiles to define the default makefile
# definitions. After the include the Makefile may customize the definitions
# found here to suit the circumstance.
#
# Redefinitions of make variables earlier than the include of this file will
# have no affect.
#
.SUFFIXES: .cpp .CPP .out .cxx
.PRECIOUS: %_downLoadable %_rom %_romCompressed %_romResident %_reloc %.o
.PHONY: __always_build__ clean
## exe target is the cannonical starting point.
default : exe
## toolchain binaries
CFG_GEN = $(TCL) $(WIND_BASE)/host/resource/hutils/tcl/configGen.tcl
TRIM_TOOL = $(TCL) $(WIND_BASE)/host/resource/hutils/tcl/trim.tcl
## generated files
CFG_GEN_FILES = $(PRJ_DIR)/prjConfig.c $(PRJ_DIR)/prjComps.h $(PRJ_DIR)/prjParams.h $(PRJ_DIR)/linkSyms.c
## module cross reference macros
# by default, just generate xref's for the main vxWorks archive,
# and regenerate the xref every time the archive changes
MXR_LIBS = $(TGT_DIR)/lib/lib$(CPU)$(TOOL)vx.a
MXR_USR_OBJS = $(filter-out linkSyms.o prjConfig.o, $(PRJ_OBJS))
MXR_DEPEND = $(MXR_LIBS)
## bsp flags
COMPILE_TRADITIONAL = $(CC) $(OPTION_OBJECT_ONLY) $(OPTION_DOLLAR_SYMBOLS)\
$(CFLAGS)
COMPILE_SYMTBL = $(CC) $(OPTION_OBJECT_ONLY) $(OPTION_DOLLAR_SYMBOLS)\
$(CFLAGS) $(OPTION_NO_WARNINGS)
COMP_DIR = $(TGT_DIR)/config/comps
DATA_SEG_PAD_C = $(COMP_DIR)/src/dataSegPad.c
VERSION_C = $(COMP_DIR)/src/version.c
USR_ENTRY_C = $(COMP_DIR)/src/usrEntry.c
LINKER_SYMDEFS = $(foreach pair, $(PROJECT_LINK_SYMDEFS), $(call link_symdef, $($(pair))))
## libraries
include $(TGT_DIR)/h/make/defs.link
# map TOOL to TOOL_FAMILY, if not already done elsewhere (it should).
# Do not expand to include other tools, define TOOL_FAMILY directly
# in the relevent Makefile.
ifeq ($(TOOL_FAMILY),)
ifeq ($(findstring gnu,$(TOOL)),gnu)
TOOL_FAMILY = gnu
endif
ifeq ($(findstring diab,$(TOOL)),diab)
TOOL_FAMILY = diab
endif
ifeq ($(findstring icc,$(TOOL)),icc)
TOOL_FAMILY = icc
endif
endif
ifndef PRJ_MAKEFILE
PRJ_MAKEFILE = $(PRJ_DIR)/Makefile
endif
## this is a project build
WIND_PROJECT_MAKEFILE = TRUE
# Define the VSB-related variables before the inclusion of the CPU/TOOL make
# fragment so that VSB configuration options can be used in the make
# fragments.
VSB_CONFIG_DIR = $(VSB_DIR)/h/config
VSB_CONFIG_FILE_NAME = vsbConfig.h
VSB_AUTOCONF_FILE_NAME = autoconf.h
VSB_MAKE_CONFIG_FILE_NAME = auto.conf
VSB_CONFIG_FILE = $(VSB_CONFIG_DIR)/$(VSB_CONFIG_FILE_NAME)
VSB_MAKE_CONFIG_FILE = $(VSB_CONFIG_DIR)/$(VSB_MAKE_CONFIG_FILE_NAME)
ifneq ($(wildcard $(VSB_MAKE_CONFIG_FILE)),)
include $(VSB_MAKE_CONFIG_FILE)
endif
include $(TGT_DIR)/h/make/defs.options
include $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
include $(TGT_DIR)/h/tool/$(TOOL_FAMILY)/make.$(CPU)$(TOOL)
include $(TGT_DIR)/h/make/defs.$(PRJ_TYPE)
@@ -0,0 +1,19 @@
# defs.singleCpuVariant - support for building a single CPU_VARIANT
#
# Copyright 2005, Wind River Systems, Inc.
#
# modification history
# --------------------
# 01a,20sep05,pch written
#
# This fragment is to be included into the Makefile in only those directories
# whose contents must be built differently for each CPU_VARIANT. It translates
# the ONLY_CPU_VARIANT setting from vxprj into a LIB_DIR_TAG setting which
# will cause the appropriate variant-dependent build flags to be used.
# ONLY_CPU_VARIANT is examined nowhere else, and is not intended to be set
# by the "normal" build mechanism (which builds all applicable variants for
# the current CPU and TOOL).
ifneq ($(ONLY_CPU_VARIANT),)
LIB_DIR_TAG=$(ONLY_CPU_VARIANT)
endif
@@ -0,0 +1,19 @@
# defs.sun4-solaris2 - Host specific default definitions
#
# modification history
# --------------------
# 01e,02apr98,pcn Removed Objcopy changes from Tempest view
# 01d,15dec97,pcn Added Objcopy in BSP build.
# 01c,02jul96,dat SPR 6141, proper use of TGT_DIR
# 01b,04dec95,ms changed RM so solaris won't complain if no file is specified
# 01a,01jun95,yp created
#
# DESCRIPTION
# This file contains default definitions, and flags used in building targets
# that are host specific to sun4-solaris2.
TGT_DIR=$(WIND_BASE)/target
include $(TGT_DIR)/h/make/defs.unix
RM = rm -f ""
+180
View File
@@ -0,0 +1,180 @@
# defs.unix - standard unix host specific makefile
#
# Copyright 1995-2007, Wind River Systems.
#
# modification history
# --------------------
# 02s,08oct08,pee WIND00137789.
# 02r,30apr08,pee vsb tuning.
# 02q,11mar08,pee vsb
# 02p,08mar07,pee added support for generic option framework
# 02o,06sep05,h_k added USRENTRY. (SPR #111954)
# 02n,09may05,j_c merging 02l and 02m changes from the 2 branches
# 02m,22apr05,h_a Redoing a LIB_ROOT change that was erratically undone
# 02m,19apr05,tpw Adjust to new docs location as of WB18
# 02l,18Apr05,pee Added support for precomp objects
# 02l,07apr05,h_a Definition of LIB_ROOT for externel lib targets
# 02l,07apr05,h_a LIB_ROOT to replace $(TGT_DIR)/lib for building components
# 02k,02sep04,c_c Modified tclsh location.
# 02j,07jul04,c_c Removed usage of romfs_image.h.
# 02i,15jul04,kab SPR 99488: requires /bin/echo
# 02h,26may04,dgp remove references to refgen.tcl
# 02g,26apr04,f_b Removed absolute path to objcopy to prepare for new
# directory structure and align with how nm & size are found
# 02f,20feb04,c_c Avoid eror message if no file is given to sed.
# 02e,09feb04,fle Adapted to new host utilities locations
# 02d,12jan04,pad Now call directly makeSymTbl.tcl instead of the Unix and
# Windows wrapper files (SPR #92936).
# 02c,01dec03,c_c Added macros for postprocessing dependencies.
# 02b,26nov03,bpn Fixed DIRCHAR macro.
# 02a,07nov03,c_c Unified build rules with WIN32 hosts.
# 01z,09oct03,md make ROMFS location resident in project root
# 01y,02jul03,md added ROMFS variables
# 01x,17apr02,jab added NULL_DEVICE make variable
# 01w,14dec01,tam added CMD_SEPARATOR def
# 01v,02nov01,tam added RMDIR
# 01u,01nov01,jab added MKDIR
# 01t,20oct01,dat Relocting tool specific macros
# 01s,27aug01,wsl add man pages
# 01r,19dec00,rec add endian flag to CPP definition
# 01q,06dec00,sn removed -xc
# 01q,08apr99,bc Merge in objcopy invocations from Aeolus
# 01p,07sep98,fle added doc related variable : DOCS_ROOT
# 01o,02apr98,pcn Removed Objcopy changes from Tempest view
# 01n,25feb98,ms added NOP def, removed VX_CPU_FAMILY=$(TOOLENV) from CPP
# 01m,15dec97,pcn Added Objcopy in BSP build.
# 01l,20oct97,tm added constants to support objcopy gated by USE_OBJCOPY flag
# 01k,10oct97,ms added MV and ECHO. Don't define USRCONFIG, BOOTINIT, ...
# macros if using new build rules.
# 01j,17aug96,yp Added definition of LIBDIR and BSPBUILD_TCL and DIRCHAR
# 01i,18aug96,ms use deflate to compress bootROM images
# 01h,18apr96,dat
# +yp added MKPREP
# 01g,06mar96,dat removed makeVersion
# 01f,13nov95,p_m added DEMO_DIR.
# 01e,03nov95,yp Made CPP arch specific so .s.o targets don't get generate
# 01d,24oct95,dat recovered CONFIG_ALL macro
# 01c,29jun95,kkk added VXSIZE definition.
# 01b,19jun95,yp allowed arch. specific tools to be inherited from
# make.$(CPU)$(TOOL)
# 01a,01jun95,yp created
#
# DESCRIPTION
# This file contains default definitions, and flags used in building targets
# that are host specific to a standard unix environment.
## directories
BIN_DIR = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin
FOUNDATION_DIR = $(WIND_FOUNDATION_PATH)/$(WIND_HOST_TYPE)/bin
ifeq ($(WIND_PROJECT_MAKEFILE),)
TGT_DIR = $(WIND_BASE)/target
endif
# temporay, until all occurent of LIB_ROOT are removed.
LIB_ROOT = $(VSB_DIR)
CONFIG_ALL = $(TGT_DIR)/config/all
DEMO_DIR = $(TGT_DIR)/lib/obj$(CPU)$(TOOL)test
LIBDIR = $(LIB_ROOT)/$(LIBDIRNAME)
PRECOMPBASE = $(TGT_DIR)/precomp
PRECOMPDIR = $(TGT_DIR)/precomp/default$(MAJOR_OPTION_SUFFIX)/$(LIBDIRNAME)
RESOURCE_DIR = $(WIND_BASE)/host/resource
## doc files
DOCS_ROOT = $(WIND_DOCS)/extensions/eclipse/plugins
MAN_PAGE_DIR = $(WIND_BASE)/man
DOC_OPTS = $(DOC_OPTS_MAN)
DOC_OPTS_C_TCL = -config CTcl2html
DOC_OPTS_CPP = -cpp
DOC_OPTS_FILE = -config File2html
DOC_OPTS_MAN = -mg -missingok
## tools
ENV_BIN = VX_CPU_FAMILY=$(TOOLENV) $(BIN_DIR)/
EXTRACT_BIN = $(OBJCPY) $(EXTRACT_BIN_FLAG)
BINXSYM = $(OBJCPY) $(EXTRACT_SYM_FLAG)
BINHEX = $(OBJCPY) $(EXTRACT_HEX_FLAG)
BINCONV = $(OBJCPY)
COMPRESS = $(ENV_BIN)deflate
ROMSIZEPROG = $(ENV_BIN)romsize
VXSIZEPROG = $(ENV_BIN)vxsize
MKSYMTBL = $(TCL) $(WIND_BASE)/host/resource/hutils/tcl/makeSymTbl.tcl \
$(TOOLENV)
BINTOASM = $(ENV_BIN)binToAsm
MKPREP = $(ENV_BIN)mkprep
MG = $(ENV_BIN)mg
MKROMFS = $(ENV_BIN)mkromfs
LDOUT_SYMS = true
LDOUT_CONV = true
LDOUT_HOST = true
MV_BIN = echo
MKDIR = mkdir -p
RMDIR = rm -f -r
RM = rm -f
MV = mv
ECHO = /bin/echo
CP = cp
SED = sed
TR = tr
ASM_P1 = cat
ASM_P2 = cat
TARGET =
BSPBUILD_TCL = $(BIN_DIR)/bspBuild.tcl
NOP = \#
## macro for postprocessing dependencies
PROCESS_DEP = if [ -f $@ ]; then \
$(SED) -e 's|^.*\.o|\$$\(LIBDIR\)/&|g' \
-e "s|$(TGT_DIR)|\\$$\(TGT_DIR\)|g" \
-e "s|$(WIND_GNU_PATH)|\\$$\(WIND_GNU_PATH\)|g" \
-e "s|$(WIND_DIAB_PATH)|\\$$\(WIND_DIAB_PATH\)|g" \
-e "s|$(WIND_BASE)|\\$$\(WIND_BASE\)|g" $@ > $@.post; \
$(MV) $@.post $@; fi
PROCESS_DEP_PRECOMP = if [ -f $@.precomp ]; then \
$(SED) -e 's|^.*\.o|\$$\(PRECOMPDIR\)/&|g' \
-e "s|$(TGT_DIR)|\\$$\(TGT_DIR\)|g" \
-e "s|$(WIND_GNU_PATH)|\\$$\(WIND_GNU_PATH\)|g" \
-e "s|$(WIND_DIAB_PATH)|\\$$\(WIND_DIAB_PATH\)|g" \
-e "s|$(WIND_BASE)|\\$$\(WIND_BASE\)|g" $@.precomp >> $@; \
$(RM) $@.precomp; fi
BSP_PROCESS_DEP = if [ -f $@ ]; then \
$(SED) -e "s|$(CONFIG_ALL)|\\$$\(CONFIG_ALL\)|g" \
-e "s|$(TGT_DIR)|\\$$\(TGT_DIR\)|g" \
-e "s|$(WIND_GNU_PATH)|\\$$\(WIND_GNU_PATH\)|g" \
-e "s|$(WIND_DIAB_PATH)|\\$$\(WIND_DIAB_PATH\)|g" \
-e "s|$(WIND_BASE)|\\$$\(WIND_BASE\)|g" $@ > $@.post; \
$(MV) $@.post $@; fi
## DIRCHAR exists for compatibility reason. It should be removed
DIRCHAR = /
## We now rely on the path to get the right tcl exe.
TCL = tclsh
# REFGEN = $(WTXTCL) $(RESOURCE_DIR)/doctools/apigen.pl
HTMLLINK = $(WTXTCL) $(RESOURCE_DIR)/doctools/htmlLink.tcl
HTMLBOOK = $(WTXTCL) $(RESOURCE_DIR)/doctools/htmlBook.tcl
ifneq ($(NEW_RULES),TRUE)
## files
USRCONFIG = $(CONFIG_ALL)/usrConfig.c
USRENTRY = $(CONFIG_ALL)/usrEntry.c
BOOTCONFIG = $(CONFIG_ALL)/bootConfig.c
BOOTINIT = $(CONFIG_ALL)/bootInit.c
DATASEGPAD = $(CONFIG_ALL)/dataSegPad.c
CONFIG_ALL_H = $(CONFIG_ALL)/configAll.h
endif
## Miscellaneous
CMD_SEPARATOR = ;
NULL_DEVICE = /dev/null
+39
View File
@@ -0,0 +1,39 @@
# rules.vsb.mk - Host independent definitions for making VxWorks Source Build projects
#
# Copyright 2008, Wind River Systems, Inc.
#
# modification history
# --------------------
# 01c,15oct09,mze convert WIND_HOME and WIND_USR to remove backslash
# 01b,02oct09,mze adding a new macro
# 01a,16apr09,mze adding usr into the VSB
#
# 01a,04apr08,pee created
# use this variable to protect from multiple inclusion.
# with make 3.80, it is not possible to use eval inside ifdef
# so, the user needs to test this flag beforeinclusion of this file
__DEFS_LIBPRJ_MK__ = TRUE
WIND_BASE := $(subst \,/,$(WIND_BASE))
WIND_HOME := $(subst \,/,$(WIND_HOME))
WIND_USR := $(subst \,/,$(WIND_USR))
TGT_DIR = $(WIND_BASE)/target
SRCDIR = $(TGT_DIR)/src
CDFDIR = $(TGT_DIR)/config/comps/vxWorks
VSB_DIR := $(subst \,/,$(shell pwd))
ifeq ($(BSP_DIR),)
BSP_DIR = $(TGT_DIR)/config
endif
#
_CONFIG_SRC_DIRS = $(TGT_DIR)/src
_CONFIG_USR_DIRS = $(WIND_USR)
_CONFIG_USR_SRC_DIRS = $(WIND_USR)/src
_CONFIG_USR_APPS_DIRS = $(WIND_USR)/apps
+63
View File
@@ -0,0 +1,63 @@
# defs.vsbvars.mk - VSB default variable defintions.
#
# Copyright 2008-2009 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 01h,28aug09,pee pass #VSB_DIR# to bdgen
# 01g,24jul09,pee modification to tag file path.
# 01f,15jun09,pee adding tag files.
# 01g,20may09,pee moification to VSB header path.
# 01f,04may09,pee adding VSB private include directory
# 01e,16mar09,pee adding VSB_INCLUDE_DIR
# 01d,06nov08,pee WIND00139818
# 01c,08oct08,pee WIND00137789.
# 01b,02oct08,mze changes to the use of _WRS_CONFIG_ADDEDCFLAGS
# 01a,29Auu08,pee created
# use this variable to find if this file was already included
__DEFS_VSBVARS_MK_INCLUDED = TRUE
ifndef __DEFS_OPTIONS_INCLUDED
include $(WIND_BASE)/target/h/make/defs.options
endif
# VSB default and definitions
ifdef VSB_DIR
ifeq ($(origin VSB_DIR),command line)
ifndef __VSB_DIR_ABS
__ABS_VSB_DIR := $(shell cd $(subst \,/,$(VSB_DIR));pwd)
override VSB_DIR := $(__ABS_VSB_DIR)
MAKEOVERRIDES := $(patsubst VSB_DIR=%,VSB_DIR=$(__ABS_VSB_DIR), $(MAKEOVERRIDES)) __VSB_DIR_ABS=TRUE
endif
endif
else
VSB_DIR = $(WIND_BASE)/target/lib$(MAJOR_CLI_OPTION_SUFFIX)
endif
VSB_INCLUDE_DIR = $(VSB_DIR)/h/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(LIB_DIR_TAG)$(MINOR_OPTION_SUFFIX)
VSB_PRIVATE_INCLUDE_DIR=$(VSB_INCLUDE_DIR)/private
VSB_CONFIG_DIR = $(VSB_DIR)/h/config
VSB_CONFIG_FILE_NAME = vsbConfig.h
VSB_AUTOCONF_FILE_NAME = autoconf.h
VSB_MAKE_CONFIG_FILE_NAME = auto.conf
VSB_CONFIG_FILE = $(VSB_CONFIG_DIR)/$(VSB_CONFIG_FILE_NAME)
VSB_MAKE_CONFIG_FILE = $(VSB_CONFIG_DIR)/$(VSB_MAKE_CONFIG_FILE_NAME)
ALLFLAGS_VSBDEFS = -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\" $(_VSB_CONFIG_ADDEDCFLAGS) -I$(VSB_INCLUDE_DIR)
# tag data
ifeq ($(_BDGEN_),TRUE)
VSB_TAG_DIR = \#VSB_DIR\#/tags/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(LIB_DIR_TAG)$(MINOR_OPTION_SUFFIX)
else
VSB_TAG_DIR = $(VSB_DIR)/tags/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(LIB_DIR_TAG)$(MINOR_OPTION_SUFFIX)
endif
TAG_FILENAME_KERNEL = kernel.tags
VSB_TAG_FILE_KERNEL = $(VSB_TAG_DIR)/$(TAG_FILENAME_KERNEL)
TAG_FILENAME_DKM = dkm.tags
VSB_TAG_FILE_DKM = $(VSB_TAG_DIR)/$(TAG_FILENAME_DKM)
+14
View File
@@ -0,0 +1,14 @@
# defs.vxApp - makefile target definitions for vxWorks application projects
#
# modification history
# --------------------
# 01a,30may02,cjs added modhist. Got rid of linkedObjs.o reference and
# changed ARCHIVE too.
#
ifeq ($(DEFAULT_RULE),)
DEFAULT_RULE = $(basename $(notdir $(PRJ_FILE))).out
endif
ifeq ($(ARCHIVE),)
ARCHIVE = $(basename $(notdir $(PRJ_FILE))).a
endif
+183
View File
@@ -0,0 +1,183 @@
# defs.vxWorks - vxworks default makefile definitions
#
# Copyright 1984-2012, 2017 Wind River Systems, Inc.
#
# modification history
# --------------------
# 02c,24jan17,pee add support for user CFLAGS in VIP (VXW6-85583)
# 02b,16jul15,rtm Fix for VXW6-83093
# 02a,28may12,pee WIND00343181
# 01z,15jun11,mze add debug
# 01y,19jan11,pee WIND00250470
# 01x,04nov10,mze fix typo
# 01w,03nov10,mze IA CPU tag work
# 01v,28oct10,pee WIND00233594
# 01u,09apr10,pee adding specific flag for cmpScripLib
# 01t,08apr10,pee tuning FLAGS
# 01r,19mar10,pee tuning FLAGS
# 01q,02feb10,pee adding CFLAGS, no longer hardcoded in project.
# 01p,19may09,pee include defs.vsbvars.mk to avoid replication.
# 01o,24jul09,pee modification to tag file path.
# 01n,30jun09,pee include VSB configuration
# 01m,16jun09,pee adding kernel tag support
# 01l,22aug08,pee adding VSB information.
# 01k,10aug04,fle SPR#100638 : wrong values used for ROM Flags
# 01j,04mar04,fle Added CC_ROM_FLAGS
# 01i,25sep03,dat adding _WRS_KERNEL to compile flags (TEMPORARY)
# 01h,23jul03,jmp always define MAKE_SYM if INCLUDE_STANDALONE_SYM_TBL is not
# defined.
# 01g,28jan02,sn always build ctdt.o
# 01f,24apr00,dat SPR 30819, fix project link of ROM images
# 01e,11apr00,dra Added RES_LDFLAGS where needed.
# 01d,05may99,bc fix BINXSYM command for objcopy version.
# 01c,07jul98,ms fixed MAKE_SYM definition.
# 01b,29jun98,ms renamed vxWorks_downLoadable to just vxWorks.
# 01a,10oct97,ms written based on defs.bsp.
#
# DESCRIPTION
# This file is included into project makefiles for vxWorks based projects.
# It overrides some of the defintions from defs.project
#
## link addresses
ifeq ($(ROM_LINK_ADRS),)
ROM_LINK_ADRS = $(ROM_TEXT_ADRS)
endif
# HELP: Temporary fix to get -D_WRS_KERNEL into the project build of a
# VxWorks image.
CC_ROM_FLAGS = -DRAM_DATA_ADRS=0x$(RAM_LOW_ADRS) \
-DRAM_DST_ADRS=0x$(RAM_LOW_ADRS)
CC_ROM_HIGHLOW_FLAGS = -DRAM_DATA_ADRS=0x$(RAM_HIGH_ADRS) \
-DRAM_DST_ADRS=0x$(RAM_LOW_ADRS)
CC_ROM_RES_FLAGS= -DROM_RESIDENT $(CC_ROM_FLAGS)
CC_ROM_CPY_FLAGS= -DROM_COPY $(CC_ROM_HIGHLOW_FLAGS)
CC_ROM_CMP_FLAGS= -DROM_COMPRESS $(CC_ROM_HIGHLOW_FLAGS)
# default build images
ifeq ($(DEFAULT_RULE),)
DEFAULT_RULE = vxWorks
endif
RELEASE = vxWorks
# For simplicity always build ctdt.o (an array of compiler generated
# static initializers).
POSTLINK_MODULES += ctdt.o
# If INCLUDE_STANDALONE_SYM_TBL component is included, then add the symbol
# table module to POSTLINK_MODULES. Otherwise MAKE_SYM is always defined,
# so that vxWorks symbol table is always built (to match behavior with bsp
# build), and can be used by components like INCLUDE_NET_SYM_TBL or
# INCLUDE_PASS_FS_TBL.
ifneq ($(filter INCLUDE_LOADER INCLUDE_WDB, $(COMPONENTS)),)
_COMPONENT_LDFLAGS = $(_LD_VXWORKS_LOADER_FLAGS)
endif
ifneq ($(findstring INCLUDE_STANDALONE_SYM_TBL, $(COMPONENTS)),)
POSTLINK_MODULES += symTbl.o
else
define MAKE_SYM
$(BINXSYM) $@ $@.sym
endef
define MAKE_SYM_CVT
$(LDOUT_SYMS) $@.sym
endef
endif
# compile flags
CC_WARNINGS = $(CC_WARNINGS_MED)
# CC_DEBUG = -g
# The debug fals are now part of the CC_OPTIM FLAGS as debug really requires some
# of the optimizations to be turned off, to function properly. For a VIP debug is toggled on and off
# with -debug and -debug_opt see >vxprj help for details.
_PROJECT_INCLUDE = -I$(PRJ_DIR) -I$(BSP_DIR)
_PROJECT_CFLAGS = -DPRJ_BUILD
EXTRA_CFLAGS = $(EXTRA_DEFINE) $(OPT_DEFINE) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS)
# this flag is defaulted the same way that defs.bsp defaults it
CC_OPTIM = $(CC_OPTIM_TARGET)
__CFLAGS = $(CMPSCRIPTLIB_CFLAGS) $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_WARNINGS) \
$(_PROJECT_INCLUDE) $(CC_INCLUDE) $(CC_DEFINES) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) \
$(CC_SOFT_FLOAT) $(CFLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS) \
$(_PROJECT_CFLAGS) $(EXTRA_CFLAGS) $(_USER_CFLAGS)
CFLAGS = $(if $(findstring YES,$(findstring $(USE_USER_FLAGS),YES)),$(USER_CFLAGS),$(__CFLAGS))
C++FLAGS = $(CC_ARCH_SPEC) $(C++_COMPILER) $(CC_OPTIM) $(C++_WARNINGS) \
$(_PROJECT_INCLUDE) $(CC_INCLUDE) $(CC_DEFINES) $(ADDED_C++FLAGS) \
$(CC_SOFT_FLOAT) $(C++FLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS) \
$(_PROJECT_CFLAGS) $(EXTRA_CFLAGS) $(_USER_CFLAGS)
CASFLAGS = $(CC_ARCH_SPEC) $(OPTION_PP) $(OPTION_LANG_ASM) $(CC_INCLUDE)\
$(CC_DEFINES) $(CASFLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS) \
$(_PROJECT_CFLAGS) $(EXTRA_CFLAGS) $(_USER_CAS_FLAGS)
CFLAGS_AS = $(CMPSCRIPTLIB_CFLAGS_AS) $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) \
$(_PROJECT_INCLUDE) $(CC_INCLUDE) \
$(CC_DEFINES) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) $(OPTION_PP_AS) \
$(OPTION_LANG_ASM) $(CFLAGS_AS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS) \
$(_PROJECT_CFLAGS) $(EXTRA_CFLAGS) $(_USER_CFLAGS_AS)
# Special flags for Position Independent Code (bootInit.o)
CFLAGS_PIC = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_WARNINGS) \
$(CC_INCLUDE) $(CC_DEFINES) $(ADDED_CFLAGS) $(_ARCH_ADDED_CFLAGS) $(CC_PIC) \
$(CC_SOFT_FLOAT) $(CFLAGS_PIC_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS)
CC_INCLUDE = $(OPTION_INCLUDE_DIR)$(TGT_DIR)/h \
$(INCLUDE_CC) $(EXTRA_INCLUDE) $(OPTION_INCLUDE_DIR). \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/h/wrn/coreip \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/src/config \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/config/comps/src \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/src/drv \
$(OPTION_INCLUDE_DIR)$(TGT_DIR)/src/hwif/h
CC_DEFINES = $(OPTION_DEFINE_MACRO)CPU=_VX_$(CPU) \
$(OPTION_DEFINE_MACRO)TOOL_FAMILY=$(TOOL_FAMILY) \
$(OPTION_DEFINE_MACRO)TOOL=$(TOOL) \
$(OPTION_DEFINE_MACRO)_WRS_KERNEL \
$(DEFINE_CC) $(EXTRA_DEFINE) $(OPT_DEFINE)
WIND_VXCONFIG := $(subst \,/,$(WIND_VXCONFIG))
WIND_COMPONENTS_INCLUDES := $(subst \,/,$(WIND_COMPONENTS_INCLUDES))
ifeq ($(WIND_HOST_TYPE),x86-win32)
EXTRA_INCLUDE += $(foreach dir,$(subst ;, ,$(WIND_COMPONENTS_INCLUDES)), $(OPTION_INCLUDE_DIR)$(dir))
EXTRA_INCLUDE += $(foreach dir,$(subst ;, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/src)
EXTRA_INCLUDE += $(foreach dir,$(subst ;, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/h)
else
EXTRA_INCLUDE += $(foreach dir,$(subst :, ,$(WIND_COMPONENTS_INCLUDES)), $(OPTION_INCLUDE_DIR)$(dir))
EXTRA_INCLUDE += $(foreach dir,$(subst :, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/src)
EXTRA_INCLUDE += $(foreach dir,$(subst :, ,$(WIND_VXCONFIG)), $(OPTION_INCLUDE_DIR)$(dir)/h)
endif
EXTRA_INCLUDE += $(COMPONENT_INCLUDES)
include $(TGT_DIR)/h/make/defs.vsbvars.mk
VSB_MAKE_CONFIG_FILE = $(VSB_CONFIG_DIR)/$(VSB_MAKE_CONFIG_FILE_NAME)
-include $(VSB_MAKE_CONFIG_FILE)
# tag data
VSB_TAG_DIR = $(VSB_DIR)/tags/$(VX_CPU_FAMILY)$(ARCH_OPTION_SUFFIX)/$(CPU)$(CPU_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(LIB_DIR_TAG)$(MINOR_OPTION_SUFFIX)
TAG_FILENAME_KERNEL = kernel.tags
VSB_TAG_FILE_KERNEL = $(VSB_TAG_DIR)/$(TAG_FILENAME_KERNEL)
+28
View File
@@ -0,0 +1,28 @@
# defs.vxcom - makefile target rules for vxcom and vxdcom
#
# modification history
# --------------------
# 01c,22oct01,dbs add extra subdirs to vxcom build
# 01b,19oct01,dbs add config to allow derived files to be checked in
# 01a,19sep01,nel created
VXDCOM_BUILD_HOST=t2
VXCOM_BASE = $(WIND_BASE)/target/src/vxcom
VXDCOM_BASE = $(WIND_BASE)/target/src/vxdcom
VXCOM_PUBLIC_H_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXCOM_PRIVATE_H_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXCOM_PS_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXCOM_GUID_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXDCOM_PUBLIC_H_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXDCOM_PRIVATE_H_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXDCOM_PS_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXDCOM_GUID_DIR = $(WIND_BASE)/target/src/vxcom/veloce-hack
VXCOM_NO_AUTOMATIC_IDLCOMP = 1
VXCOM_EXTRA_CFLAGS = -I$(WIND_BASE)/target/src/vxcom/veloce-hack
VXCOM_EXTRA_SUBDIRS = veloce-hack
@@ -0,0 +1,15 @@
# defs.x86-freebsd - Host specific default definitions
#
# modification history
# --------------------
# 01a,13dec99,dra created, based on defs.sun4-solaris2 rev 01e.
#
# DESCRIPTION
# This file contains default definitions, and flags used in building targets
# that are host specific to x86-freebsd.
TGT_DIR=$(WIND_BASE)/target
include $(TGT_DIR)/h/make/defs.unix
RM = rm -f ""
+19
View File
@@ -0,0 +1,19 @@
# defs.x86-linux2 - Host specific default definitions
#
# Copyright 2003-2004 Wind River Systems, Inc.
#
# modification history
# --------------------
# 01c,15jul04,kab SPR 99488: requires /bin/echo
# 01b,25jun04,fle SPR#98612 : defined ECHO as echo -e
# 01a,17jul03,dbt copied from defs.sun4-solaris2
#
# DESCRIPTION
# This file contains default definitions, and flags used in building targets
# that are host specific to x86-linux2.
TGT_DIR=$(WIND_BASE)/target
include $(TGT_DIR)/h/make/defs.unix
ECHO = /bin/echo -e
RM = rm -f ""
+129
View File
@@ -0,0 +1,129 @@
# defs.x86-win32 - Host specific default definitions
#
# Copyright 1995-2007 Wind River Systems, Inc.
#
# modification history
# --------------------
# 02s,13jul07,tkf Substitue backslash chars with forwardslash in
# WRVX_COMPBASE.
# 02r,16may07,pee WIND00094593
# 02q,02dec05,pee \ substitution in WIND_HOME
# 02p,18apr05,pee added support for precomp objects
# 02o,25jun04,fle SPR#98612 : defined ECHO as echo -e
# 02n,20feb04,c_c Avoid eror message if no file is given to sed.
# 02m,12jan04,c_c Fixed SPR 93116.
# 02l,01dec03,c_c Added dependencies processing overrides.
# 02k,07nov03,c_c Unified build rules with WIN32 hosts.
# 02j,09oct03,md make ROMFS location resident in project root
# 02i,02jul03,md added ROMFS variables
# 02h,17apr02,jab added NULL_DEVICE make variable
# 02g,04feb02,fmk change definition of MKSYMTBL to add .bat for x86-win32
# 02f,11dec01,rbl add OUTPUT_OPTION to get implicit rules working better on
# Windows.
# Don't redefine TGT_DIR if already defined, especially not
# with a backslash: project defines TGT_DIR with a forward
# slash and make is sensitive to the difference
# 02f,14dec01,tam added CMD_SEPARATOR def
# 02e,02nov01,tam added RMDIR
# 02d,01nov01,jab added MKDIR
# 02c,20oct01,dat Relocting tool specific macros
# 02b,29may01,jb Adding big-endian support
# 01z,19dec00,rec add endian flag to CPP definition
# 01y,06dec00,sn removed -xc
# 01x,18jan99,sn removed hack that worked around collect2 bug (now fixed)
# 01w,05jan99,fle added the DOC_OPTS_XXX flags
# 01v,07dec98,sn added comment indicating changes that will be required
# when we get collect2 working on windows.
# 01u,10nov98,fle added DOCS_DIR variable for man pages generation
# 01t,26oct98,fle added WTXTCL, REFGEN, HTMLLINK and HTMLBOOK variables for
# documentation generation
# 01t,08apr99,bc Merge in objcopy invocations from Aeolus
# 01s,21jul98,cym changed cpp$(ARCH) to cc$(ARCH) -E
# 01q,16jun98,sn Corrected definition of CPP
# 01p,02apr98,pcn Removed Objcopy changes from Tempest view
# 01o,15dec97,pcn Added Objcopy in BSP build.
# 01n,10oct97,ms added MV and ECHO. Don't define USRCONFIG, BOOTINIT, ...
# macros if using new build rules.
# 01m,21jan97,j_k Fixed DIRCHAR to be result of a macro.
# 01l,17aug96,yp Added definition of LIBDIR and BSPBUILD_TCL and DIRCHAR
# 01k,18aug96,ms use deflate to compress bootROM images
# 01j,06jun96,dat SPR 6141, proper use of TGT_DIR
# 01i,18apr96,dat
# +yp added MKPREP
# 01h,06mar96,dat removed makeVersion
# 01g,13nov95,p_m added DEMO_DIR.
# 01f,03nov95,yp Made CPP arch specific .s.o targets don't get generate
# 01g,24oct95,dat recovered CONFIG_ALL
# 01f,31jul95,jmb changed 'rm' to 'vxrm' and added CC_DEBUG
# 01e,28jul95,sks removed 'echo' and replaced with '@rem' for 'true'
# 01d,25jul95,jmb added VX_CPU_FAMILY for romsize and vxsize
# 01c,14jul95,yp added definition for VXSIZEPROG
# 01b,19jun95,yp allowed arch. specific tools to be inherited from
# make.$(CPU)$(TOOL)
# 01a,01jun95,yp created
#
# DESCRIPTION
# This file contains default definitions, and flags used in building targets
# that are host specific to win32.
#
MAKESHELL = sh.exe
WIND_BASE := $(subst \,/,$(WIND_BASE))
WIND_HOME := $(subst \,/,$(WIND_HOME))
WRVX_COMPBASE := $(subst \,/,$(WRVX_COMPBASE))
ifeq ($(LIBNAME),)
LIBNAME = lib$(CPU)$(TOOL)vx.a
endif
include $(TGT_DIR)/h/make/defs.unix
## make internals
# used by make for its predefined implicit rules. It is already
# set for UNIX (compiled in to make), but it is not set for
# Windows.
OUTPUT_OPTION = -o $@
# override some Unix definitions
NULL_DEVICE := NULL
VXSIZEPROG = $(BIN_DIR)/vxsize $(VX_CPU_FAMILY)
ROMSIZEPROG = $(BIN_DIR)/romsize $(VX_CPU_FAMILY)
ECHO = echo -e
## those overrides take care of '\r' management when processing dependencies,
## plus the translation of '\' path delimiter that DIAB gives, to '/'
## also take care of <drive>:// path that GNU may produce.
PROCESS_DEP = if [ -f $@ ]; then \
$(TR) -d '\r'< $@ > $@.tr; \
$(RM) $@; \
$(SED) -e 's|\\|/|g' -e 's|//|/|g' \
-e 's|^.*\.o|\$$\(LIBDIR\)/&|g' \
-e "s|$(TGT_DIR)|\\$$\(TGT_DIR\)|g" \
-e "s|$(WIND_BASE)|\\$$\(WIND_BASE\)|g" \
-e 's|/$$|\\|g' $@.tr > $@; \
$(RM) $@.tr; fi
PROCESS_DEP_PRECOMP = if [ -f $@.precomp ]; then \
$(TR) -d '\r'< $@.precomp > $@.precomp.tr; \
$(RM) $@.precomp; \
$(SED) -e 's|\\|/|g' -e 's|//|/|g' \
-e 's|^.*\.o|\$$\(PRECOMPDIR\)/&|g' \
-e "s|$(TGT_DIR)|\\$$\(TGT_DIR\)|g" \
-e "s|$(WIND_BASE)|\\$$\(WIND_BASE\)|g" \
-e 's|/$$|\\|g' $@.precomp.tr >> $@; \
$(RM) $@.precomp.tr; fi
BSP_PROCESS_DEP = if [ -f $@ ]; then \
$(TR) -d '\r'< $@ > $@.tr; \
$(RM) $@; \
$(SED) -e 's|\\|/|g' -e 's|//|/|g' \
-e "s|$(CONFIG_ALL)|\\$$\(CONFIG_ALL\)|g" \
-e "s|$(TGT_DIR)|\\$$\(TGT_DIR\)|g" \
-e "s|$(WIND_BASE)|\\$$\(WIND_BASE\)|g" \
-e 's|/$$|\\|g' $@.tr > $@; \
$(RM) $@.tr; fi
+16
View File
@@ -0,0 +1,16 @@
# makearch.mf - Makefile to create vxWorks archive
#
# modification history
# --------------------
# 01b,08nov01,tam added TGT_DIR use
# 01a,10jul96,yp written
#
# DESCRIPTION
# Given the name of the archiver ranlib and library name create the library
# with all of object files (*.o) in the current directory. One of the primary
# reasons for doing things this way is the confusion between long and short
# filenames in windows 95
#
default :
$(AR) crus $(TGT_DIR)\lib\$(LIBNAME) $(wildcard *.o)
@@ -0,0 +1,4 @@
#rules-apps.sun4-solaris2
include $(TGT_DIR)/h/make/rules-apps.unix
+86
View File
@@ -0,0 +1,86 @@
#rules-apps.unix
.NeverBuilt : appsclean
# applibsall builds both applib types (downloadable .o and linkable .a) as well
# as any subdirectories.
applibsall : applib objapplib applibsubdirs
# Linkable .a
applib : $(TGT_DIR)/lib/$(APPLIBNAME)
# Downloadable .o.
objapplib : $(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME)
# Since we need to force the rules to execute so that applibs will be
# generated from existing objects, we need to prevent them from executing
# if there are no objects, since the linker will fail.
ifneq ($(LIBOBJS),)
# By specifying FORCE as a dependency, we force the rules to be executed
# even if no object modules needed to be recompiled. This allows the
# applibs to be regenerated using existing objects instead of having to
# recompile all of them if we touched one.
$(TGT_DIR)/lib/$(APPLIBNAME): $(LIBOBJS) FORCE
$(AR) r $@ $(LIBOBJS)
# If the applib already exists, copy it to a temporary file, link the new
# objects to a different temporary file, then link to the target applib.
$(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME): $(LIBOBJS) FORCE
@ - if [ -d $(@D) ] ; then \
echo ; \
else \
mkdir $(@D) ; \
fi
@-$(RM) $(@D)/temp1.o $(@D)/temp2.o
@ - if [ -w $@ ] ; then \
$(CP) $@ $(@D)/temp2.o; \
fi
@-$(RM) $@
$(LD) $(LD_PARTIAL_FLAGS) -nostdlib -r -o $(@D)/temp1.o $(LIBOBJS)
@ - if [ -w $(@D)/temp2.o ] ; then \
($(LD) $(LD_PARTIAL_FLAGS) -nostdlib -r -o $@ $(@D)/temp1.o $(@D)/temp2.o); \
else \
($(LD) $(LD_PARTIAL_FLAGS) -nostdlib -r -o $@ $(@D)/temp1.o); \
fi
@-$(RM) $(@D)/temp1.o $(@D)/temp2.o
FORCE:
else
$(TGT_DIR)/lib/$(APPLIBNAME): $(LIBOBJS)
$(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME):
endif
# if APPLIBSUBDIRS is not null we need to build the subdirectories before building
# the current directory.
# if we have APPLIBSUBDIRS
ifneq ($(APPLIBSUBDIRS),)
# Because APPLIBSUBDIRS and SUBDIRS (used for creating the vxWorks archive) will
# often contain the same directories, and therefore will often generate the
# same targets below, we have to play some games to generate unique target names.
# We do this by placing a | on each end of the directory name for the rule
# generation but then strip it off when spawning the recursive make.
FAKE_APPLIBSUBDIRS := $(foreach dir,$(APPLIBSUBDIRS),|$(dir)|)
applibsubdirs : $(FAKE_APPLIBSUBDIRS)
$(FAKE_APPLIBSUBDIRS)::
cd $(subst |,,$@) && $(MAKE) CPU=$(CPU) TOOL=$(TOOL) applibsall
else
applibsubdirs :
endif
applibsclean :
-$(RM) $(TGT_DIR)/lib/$(APPLIBNAME)
-$(RM) $(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME)
@@ -0,0 +1,4 @@
#rules-apps.x86-freebsd
include $(TGT_DIR)/h/make/rules-apps.unix
@@ -0,0 +1,86 @@
#rules-apps.unix
.NeverBuilt : appsclean
# applibsall builds both applib types (downloadable .o and linkable .a) as well
# as any subdirectories.
applibsall : applib objapplib applibsubdirs
# Linkable .a
applib : $(TGT_DIR)/lib/$(APPLIBNAME)
# Downloadable .o.
objapplib : $(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME)
# Since we need to force the rules to execute so that applibs will be
# generated from existing objects, we need to prevent them from executing
# if there are no objects, since the linker will fail.
ifneq ($(LIBOBJS),)
# By specifying FORCE as a dependency, we force the rules to be executed
# even if no object modules needed to be recompiled. This allows the
# applibs to be regenerated using existing objects instead of having to
# recompile all of them if we touched one.
$(TGT_DIR)/lib/$(APPLIBNAME): $(LIBOBJS) FORCE
$(AR) r $@ $(LIBOBJS)
# If the applib already exists, copy it to a temporary file, link the new
# objects to a different temporary file, then link to the target applib.
$(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME): $(LIBOBJS) FORCE
@ - if [ -d $(@D) ] ; then \
echo ; \
else \
mkdir $(@D) ; \
fi
@-$(RM) $(@D)/temp1.o $(@D)/temp2.o
@ - if [ -w $@ ] ; then \
$(CP) $@ $(@D)/temp2.o; \
fi
@-$(RM) $@
$(LD) $(LD_PARTIAL_FLAGS) -nostdlib -r -o $(@D)/temp1.o $(LIBOBJS)
@ - if [ -w $(@D)/temp2.o ] ; then \
($(LD) $(LD_PARTIAL_FLAGS) -nostdlib -r -o $@ $(@D)/temp1.o $(@D)/temp2.o); \
else \
($(LD) $(LD_PARTIAL_FLAGS) -nostdlib -r -o $@ $(@D)/temp1.o); \
fi
@-$(RM) $(@D)/temp1.o $(@D)/temp2.o
FORCE:
else
$(TGT_DIR)/lib/$(APPLIBNAME): $(LIBOBJS)
$(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME):
endif
# if APPLIBSUBDIRS is not null we need to build the subdirectories before building
# the current directory.
# if we have APPLIBSUBDIRS
ifneq ($(APPLIBSUBDIRS),)
# Because APPLIBSUBDIRS and SUBDIRS (used for creating the vxWorks archive) will
# often contain the same directories, and therefore will often generate the
# same targets below, we have to play some games to generate unique target names.
# We do this by placing a | on each end of the directory name for the rule
# generation but then strip it off when spawning the recursive make.
FAKE_APPLIBSUBDIRS := $(foreach dir,$(APPLIBSUBDIRS),|$(dir)|)
applibsubdirs : $(FAKE_APPLIBSUBDIRS)
$(FAKE_APPLIBSUBDIRS)::
cd $(subst |,,$@) && $(MAKE) CPU=$(CPU) TOOL=$(TOOL) applibsall
else
applibsubdirs :
endif
applibsclean :
-$(RM) $(TGT_DIR)/lib/$(APPLIBNAME)
-$(RM) $(TGT_DIR)/lib/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME)
@@ -0,0 +1,10 @@
#rules-apps.x86-win32
#
# modification history
# --------------------
# 01a,22oct03,c_c Merged with Unix rules
#
# DESCRIPTION
# This file contains rules that are host specific to sun4-solaris2 platform.
include $(WIND_BASE)/target/h/make/rules-app.unix
@@ -0,0 +1,10 @@
# rules-lib.sun4-solaris2 - host specific rules
#
# modification history
# --------------------
# 01a,01jun95,yp created
#
# DESCRIPTION
# This file contains rules that are host specific to sun4-solaris2 platform.
include $(WIND_BASE)/target/h/make/rules-lib.unix
+326
View File
@@ -0,0 +1,326 @@
# rules-lib.unix - Host specific default definitions
#
# modification history
# --------------------
# 01g,27may15,pee VXW6-84178 reduce size of archive command
# 01f,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01e,28jul11,jam update mapping file for docs
# 01d,12may11,jam change mapping file version
# 01c,06jan11,jph check if mapping file exists
# 01b,08nov10,jph add mapping file
# 01a,25oct10,jph remove version
# 01a,19oct10,??? change version
# 01e,18oct10,??? change version
# 01d,13apr10,pee fix to basic ipnet build
# 01c,23mar10,mze allow -basic for SMP
# 01b,03feb10,mze fix for -basic libraries
# 01a,01feb10,mze allow -basic for LP64
# 02z,06jul09,??? Updating version number for VxWorks 6.8
# 02y,17dec08,pee WIND00137359
# 02x,05nov08,mze Pass VSB_DIR down in submakes
# 02w,27oct08,pee WIND00137359
# 02v,17sep08,mze add logic to stop building basic for _WRS_CONFIG_SMP case
# 02u,20jun08,pee VSB
# 02t,04jun08,kkz Use variables for doc version number
# 02s,15may08,pee blocking basic build for OPT and FEATURE_SET
# 02r,02may08,kkz Adding explicit archive instruction, in addition to *.o
# 02r,23apr08,pee vsb
# 02q,17sep07,pee cleaning up messages.
# 02p,22jun07,kkz Updating apidoc version number
# 02o,10may07,pch refine -basic automation to apply only to normal builds
# (null VXBUILD)
# 02n,03may07,pch automate -basic build step
# 02m,30mar07,mmg update for parallel make operation
# 02l,07dec06,kkz Updating apidoc version number to 6.5
# 02l,22may06,pee Adding support for multiple libraries
# Cleaned up obsolete code.
# 02k,09mar06,kkz Updating version number for API docs
# 02j,15sep05,kkz Updating version number for API docs
# 02i,18aug05,pee Filtering object list for dependency generation
# 02h,31may05,md,pee move dependencies to object directory
# 02k,29apr05,kkz Changing doc directory path
# 02j,26apr05,pee Forcing library update with MAKE_LIBDIR
# 02i,07apr05,h_a LIB_ROOT to replace $(TGT_DIR)/lib for building components
# 02h,18apr05,pee added support for precomp objects.
# 02g,22apr05,h_a LIB_ROOT changes for external lib targets
# 02f,14feb05,bpn Removed shell command directory from doc link rule.
# 02e,14oct04,job Set KERNEL condition when building docs
# 02d,26may04,dgp modify default output directory for docs build
# 02c,13mar04,dlk When library exists, do not archive an empty set of
# objects newer than the library.
# 02b,04mar04,c_c Fixed library build introduced by the SPR 92805 fix.
# 02a,25feb04,c_c Fixed SPR 92805
# 01z,20feb04,c_c Dependencies rework.
# 01y,12jan04,bjl changed refgen to apigen.
# 01x,26dec03,dat ignore errors during dependency generation
# 01w,28nov03,c_c Use dependencies processing macro.
# 01v,07nov03,c_c Unified build rules with WIN32 hosts.
# 01u,01sep03,fle SPR#84899 : do not use make -C anymore, rather change
# directory first, and call make
# 01t,19aug03,fle SPR#88802 : modified depend.tcl use since it now takes
# output file as an argument
# 01s,12nov01,dbs fix dependency-build warnings for C++ source
# 01r,01nov01,jab added LIBDIR directory creation
# 01q,24oct01,jab fixed dependency generation
# 01p,23oct01,jab cleaned up dependency rules
# 01o,27aug01,wsl add man pages and other doc niceties
# 01n,24jul01,r_s changing the make 'ifeq' conditional to work with 'gnu',
# 'sfgnu', 'sfgnule' etc for TOOL
# 01m,24jul01,r_s diab specific rules added
# 01l,05jan99,fle added the DOC_OPTS_XXX flags
# + made synopsis rule use refLib (refgen)
# 01k,25nov98,fle doc : made man rule use variables DOC_BOOK and DOC_CHAPTER
# 01j,10nov98,fle doc : made doc generated in DOC_DIR, and not in a hard
# coded destination, so we can over write it
# 01i,08sep98,fle changed refgen options format since refgen.tcl
# 01h,02sep98,fle doc : replaced mangen with refgen
# 01g,31aug98,ms fixed LIBNAME creation rule when no objects exist
# 01f,28jul98,pr added "/" to LIBDIR path
# 01e,02apr98,pcn Removed Objcopy changes from Tempest view
# 01d,02dec97,jmp added synopsis rules.
# 01c,04oct96,yp added LOCAL_CLEAN to clean objs
# 01b,17may96,yp brought clean rule here
# 01a,07may96,yp created
#
# DESCRIPTION
# This file contains the makefile rules that are specific to unix to build
# vxWorks libraries. It is included by rules.library where rules common to
# all hosts and the default rule exist. This file contains rules for managing
# archives on Unix hosts using sub-shells. If the archive is write-able we
# update it. If not we assume that it is a link you want to break or that it
# doesn't exist. The archive are created from where the object files exist to
# avoid including paths in the archive.
#
# The dependency list is generated by target depend.$(BUILD_EXT)
# which creates a dependency list for all files c,s and cpp suffixes.
#
# Sub directories to be built are expected to be defined in the SUBDIRS macro.
# if it not defined the subdirs target is not seen.
#
# We build the man pages in the directories specified in the macro SUBDIRS
# before we deal with DOC_FILES in the current directory
include $(WIND_BASE)/target/h/make/config/defs.version
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
ifeq ($(LIBNAME),)
LIBNAME = lib$(CPU)$(TOOL)vx.a
endif
LIBOBJS_DIRS = $(foreach base, $(LIB_BASE_NAMES), $(LIBDIR_$(base)))
ifneq ($(strip $(LIBOBJS_PRECOMP)),)
LIBOBJS_DIRS += $(foreach base, $(LIB_BASE_NAMES), $(PRECOMPDIR_$(base)))
endif
.PHONY : lib clean arupdate libupdate parobjs objs objsonly conf
lib: | $(PRECOMP_DIRS) $(LIBOBJS_DIRS)
ifneq ($(strip $(PARAMAKE)),)
lib: preobjs parobjs arupdate
else
lib: conf objs libupdate
endif
clean:
$(RM) $(LIBOBJS) $(LIBOBJS:.o=.d) $(LOCAL_CLEAN)
parobjs :
$(MAKE) -j $(PARAMAKE) objsonly
conf : $(VSB_CONFIG_FILE)
objs: | $(PRECOMP_DIRS) $(LIBOBJS_DIRS)
objs: objsonly
objsonly :
arupdate:
libupdate:
# this internal rule is required to avoid a deficiency in make 3.80. WIll not be required with version 3.81
define librule_internal
$$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) : $(2)
endef
define librules
objsonly : objsonly_$(2)
objsonly_$(2): | $$(LIBDIR_$(2))
objsonly_$(2): $$(LIBOBJS_$(2))
libupdate: $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1))
arupdate: arupdate_$(2)
arupdate_$(2): $$(LIBDIR_$(2))
@ $(AR) crusv $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) $$(LIBOBJS_$(2))
.PHONY : $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1))
# $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) : $$(LIBDIR_$(2)) $$(LIBOBJS_$(2))
$(foreach obj, $(LIBOBJS_$(2)), $(call librule_internal,$(1),$(obj)))
$$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) : $$(LIBDIR_$(2))
$$(if $$(strip $$(LIBOBJS_$(2))), \
$$(if $$(wildcard $$@),\
@ (cd $$(LIBDIR_$(2)); \
echo updating $$@; \
$$(AR) crusv $$@ $$(LIBOBJS_$(2)); \
),\
@ (cd $$(LIBDIR_$(2)); \
echo creating $$@; \
$$(AR) crusv $$@ *.o; \
) \
))
endef
$(eval $(foreach base, $(LIB_BASE_NAMES), $(call librules,$(call libbase2libname,$(base)),$(base))))
LIBOBJS_DEPEND = $(filter-out $(foreach file, $(NODEPENDOBJS), $(LIBDIR)/$(file)), $(LIBOBJS))
depend: $(filter %.dummy_d, $(LIBOBJS_DEPEND:.o=.dummy_d))
- @ :
# Dependency list generation. We generate dependencies for the intersection of
# files listed in OBJS and file present in the local directory, and remove those
# specified in the NODEPENDOBJS list
# If SUBDIRS is not null we need to build the subdirectories before building
# the current directory. If COMMON_BASIC_SUBDIRS is also not null -- and
# _WRS_CONFIG_BUILD_BASIC_IPNET is defined -- we then need to rebuild those
# subdirectories with the additional specification of OPT=-basic
# -basic now allowed for MSP, UP, SMP, LP64
# if we have SUBDIRS
ifneq ($(SUBDIRS),)
BASIC_SUBDIRS = $(filter $(COMMON_BASIC_SUBDIRS),$(SUBDIRS))
subdirs : $(SUBDIRS)
$(SUBDIRS)::
cd $@ && $(MAKE) CPU=$(CPU) TOOL=$(TOOL) _WRS_CONFIG_FP=$(_WRS_CONFIG_FP) $(TARGET)
ifneq ($(BASIC_SUBDIRS),)
ifeq ($(OPT),)
ifneq ($(_WRS_CONFIG_BUILD_BASIC_IPNET),)
$(BASIC_SUBDIRS)::
cd $@ && $(MAKE) CPU=$(CPU) TOOL=$(TOOL) OPT=-basic $(TARGET)
endif
endif
endif
# No SUBDIRS
else
subdirs:
endif
########
#
# doc rules
# re-define the DOC_DIR for the libraries as the default DOC_DIR is for BSPs
DOC_DIR = $(DOCS_ROOT)/$(DOC_KERNEL_API)
PLUGIN_DIR = $(shell echo $(DOC_KERNEL_API) | cut -d / -f 1)
DOC_OPTS = -mg -nostrict -missingok
# When the desired set of directories to be documented is different from the
# directories whose software must be built (common for component products),
# set DOCSUBDIRS to the subdirectories to be documented.
ifeq ($(DOCSUBDIRS),)
DOCSUBDIRS = $(SUBDIRS)
endif
ifneq ($(DOCSUBDIRS),)
# define the man target and the default output directory for libraries
man:
-for DIR in $(DOCSUBDIRS) ; \
do ( cd $$DIR; $(MAKE) CPU=$(CPU) TOOL=$(TOOL) man ) ; \
done
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) -format xml $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(MAN_PAGE_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(MAN_PAGE_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
@date
link ::
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/htmlLink -R \
$(DOCS_ROOT)/$(PLUGIN_DIR)
synopsis ::
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen \
-d $(WIND_BASE)/host/resource/synopsis $(DOC_FILES)
for DIR in $(DOCSUBDIRS) ; \
do ( cd $$DIR; $(MAKE) CPU=$(CPU) TOOL=$(TOOL) synopsis ) ; \
done
@date
clean_synopsis ::
for DIR in $(DOCSUBDIRS) ; \
do ( cd $$DIR; $(MAKE) CPU=$(CPU) TOOL=$(TOOL) clean_synopsis ) ; \
done
ifneq ($(DOC_FILES),)
$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen -clean \
-d $(WIND_BASE)/host/resource/synopsis
endif
# No DOCSUBDIRS
else
man:
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) -format xml $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(MAN_PAGE_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(MAN_PAGE_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
@date
synopsis ::
ifneq ($(DOC_FILES),)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen \
-d $(WIND_BASE)/host/resource/synopsis $(DOC_FILES)
@date
endif
clean_synopsis ::
ifneq ($(DOC_FILES),)
$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen -clean \
-d $(WIND_BASE)/host/resource/synopsis
endif
endif
# end doc rules
#
######
@@ -0,0 +1,10 @@
# rules-lib.x86-freebsd - host specific rules
#
# modification history
# --------------------
# 01a,12dec99,dra created
#
# DESCRIPTION
# This file contains rules that are host specific to x86-freebsd platform.
include $(WIND_BASE)/target/h/make/rules-lib.unix
@@ -0,0 +1,326 @@
# rules-lib.unix - Host specific default definitions
#
# modification history
# --------------------
# 01g,27may15,pee VXW6-84178 reduce size of archive command
# 01f,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01e,28jul11,jam update mapping file for docs
# 01d,12may11,jam change mapping file version
# 01c,06jan11,jph check if mapping file exists
# 01b,08nov10,jph add mapping file
# 01a,25oct10,jph remove version
# 01a,19oct10,??? change version
# 01e,18oct10,??? change version
# 01d,13apr10,pee fix to basic ipnet build
# 01c,23mar10,mze allow -basic for SMP
# 01b,03feb10,mze fix for -basic libraries
# 01a,01feb10,mze allow -basic for LP64
# 02z,06jul09,??? Updating version number for VxWorks 6.8
# 02y,17dec08,pee WIND00137359
# 02x,05nov08,mze Pass VSB_DIR down in submakes
# 02w,27oct08,pee WIND00137359
# 02v,17sep08,mze add logic to stop building basic for _WRS_CONFIG_SMP case
# 02u,20jun08,pee VSB
# 02t,04jun08,kkz Use variables for doc version number
# 02s,15may08,pee blocking basic build for OPT and FEATURE_SET
# 02r,02may08,kkz Adding explicit archive instruction, in addition to *.o
# 02r,23apr08,pee vsb
# 02q,17sep07,pee cleaning up messages.
# 02p,22jun07,kkz Updating apidoc version number
# 02o,10may07,pch refine -basic automation to apply only to normal builds
# (null VXBUILD)
# 02n,03may07,pch automate -basic build step
# 02m,30mar07,mmg update for parallel make operation
# 02l,07dec06,kkz Updating apidoc version number to 6.5
# 02l,22may06,pee Adding support for multiple libraries
# Cleaned up obsolete code.
# 02k,09mar06,kkz Updating version number for API docs
# 02j,15sep05,kkz Updating version number for API docs
# 02i,18aug05,pee Filtering object list for dependency generation
# 02h,31may05,md,pee move dependencies to object directory
# 02k,29apr05,kkz Changing doc directory path
# 02j,26apr05,pee Forcing library update with MAKE_LIBDIR
# 02i,07apr05,h_a LIB_ROOT to replace $(TGT_DIR)/lib for building components
# 02h,18apr05,pee added support for precomp objects.
# 02g,22apr05,h_a LIB_ROOT changes for external lib targets
# 02f,14feb05,bpn Removed shell command directory from doc link rule.
# 02e,14oct04,job Set KERNEL condition when building docs
# 02d,26may04,dgp modify default output directory for docs build
# 02c,13mar04,dlk When library exists, do not archive an empty set of
# objects newer than the library.
# 02b,04mar04,c_c Fixed library build introduced by the SPR 92805 fix.
# 02a,25feb04,c_c Fixed SPR 92805
# 01z,20feb04,c_c Dependencies rework.
# 01y,12jan04,bjl changed refgen to apigen.
# 01x,26dec03,dat ignore errors during dependency generation
# 01w,28nov03,c_c Use dependencies processing macro.
# 01v,07nov03,c_c Unified build rules with WIN32 hosts.
# 01u,01sep03,fle SPR#84899 : do not use make -C anymore, rather change
# directory first, and call make
# 01t,19aug03,fle SPR#88802 : modified depend.tcl use since it now takes
# output file as an argument
# 01s,12nov01,dbs fix dependency-build warnings for C++ source
# 01r,01nov01,jab added LIBDIR directory creation
# 01q,24oct01,jab fixed dependency generation
# 01p,23oct01,jab cleaned up dependency rules
# 01o,27aug01,wsl add man pages and other doc niceties
# 01n,24jul01,r_s changing the make 'ifeq' conditional to work with 'gnu',
# 'sfgnu', 'sfgnule' etc for TOOL
# 01m,24jul01,r_s diab specific rules added
# 01l,05jan99,fle added the DOC_OPTS_XXX flags
# + made synopsis rule use refLib (refgen)
# 01k,25nov98,fle doc : made man rule use variables DOC_BOOK and DOC_CHAPTER
# 01j,10nov98,fle doc : made doc generated in DOC_DIR, and not in a hard
# coded destination, so we can over write it
# 01i,08sep98,fle changed refgen options format since refgen.tcl
# 01h,02sep98,fle doc : replaced mangen with refgen
# 01g,31aug98,ms fixed LIBNAME creation rule when no objects exist
# 01f,28jul98,pr added "/" to LIBDIR path
# 01e,02apr98,pcn Removed Objcopy changes from Tempest view
# 01d,02dec97,jmp added synopsis rules.
# 01c,04oct96,yp added LOCAL_CLEAN to clean objs
# 01b,17may96,yp brought clean rule here
# 01a,07may96,yp created
#
# DESCRIPTION
# This file contains the makefile rules that are specific to unix to build
# vxWorks libraries. It is included by rules.library where rules common to
# all hosts and the default rule exist. This file contains rules for managing
# archives on Unix hosts using sub-shells. If the archive is write-able we
# update it. If not we assume that it is a link you want to break or that it
# doesn't exist. The archive are created from where the object files exist to
# avoid including paths in the archive.
#
# The dependency list is generated by target depend.$(BUILD_EXT)
# which creates a dependency list for all files c,s and cpp suffixes.
#
# Sub directories to be built are expected to be defined in the SUBDIRS macro.
# if it not defined the subdirs target is not seen.
#
# We build the man pages in the directories specified in the macro SUBDIRS
# before we deal with DOC_FILES in the current directory
include $(WIND_BASE)/target/h/make/config/defs.version
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
ifeq ($(LIBNAME),)
LIBNAME = lib$(CPU)$(TOOL)vx.a
endif
LIBOBJS_DIRS = $(foreach base, $(LIB_BASE_NAMES), $(LIBDIR_$(base)))
ifneq ($(strip $(LIBOBJS_PRECOMP)),)
LIBOBJS_DIRS += $(foreach base, $(LIB_BASE_NAMES), $(PRECOMPDIR_$(base)))
endif
.PHONY : lib clean arupdate libupdate parobjs objs objsonly conf
lib: | $(PRECOMP_DIRS) $(LIBOBJS_DIRS)
ifneq ($(strip $(PARAMAKE)),)
lib: preobjs parobjs arupdate
else
lib: conf objs libupdate
endif
clean:
$(RM) $(LIBOBJS) $(LIBOBJS:.o=.d) $(LOCAL_CLEAN)
parobjs :
$(MAKE) -j $(PARAMAKE) objsonly
conf : $(VSB_CONFIG_FILE)
objs: | $(PRECOMP_DIRS) $(LIBOBJS_DIRS)
objs: objsonly
objsonly :
arupdate:
libupdate:
# this internal rule is required to avoid a deficiency in make 3.80. WIll not be required with version 3.81
define librule_internal
$$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) : $(2)
endef
define librules
objsonly : objsonly_$(2)
objsonly_$(2): | $$(LIBDIR_$(2))
objsonly_$(2): $$(LIBOBJS_$(2))
libupdate: $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1))
arupdate: arupdate_$(2)
arupdate_$(2): $$(LIBDIR_$(2))
@ $(AR) crusv $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) $$(LIBOBJS_$(2))
.PHONY : $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1))
# $$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) : $$(LIBDIR_$(2)) $$(LIBOBJS_$(2))
$(foreach obj, $(LIBOBJS_$(2)), $(call librule_internal,$(1),$(obj)))
$$(subst //,/,$$(LIB_ROOT)/$$(LIBDIRBASE)/$(1)) : $$(LIBDIR_$(2))
$$(if $$(strip $$(LIBOBJS_$(2))), \
$$(if $$(wildcard $$@),\
@ (cd $$(LIBDIR_$(2)); \
echo updating $$@; \
$$(AR) crusv $$@ $$(LIBOBJS_$(2)); \
),\
@ (cd $$(LIBDIR_$(2)); \
echo creating $$@; \
$$(AR) crusv $$@ *.o; \
) \
))
endef
$(eval $(foreach base, $(LIB_BASE_NAMES), $(call librules,$(call libbase2libname,$(base)),$(base))))
LIBOBJS_DEPEND = $(filter-out $(foreach file, $(NODEPENDOBJS), $(LIBDIR)/$(file)), $(LIBOBJS))
depend: $(filter %.dummy_d, $(LIBOBJS_DEPEND:.o=.dummy_d))
- @ :
# Dependency list generation. We generate dependencies for the intersection of
# files listed in OBJS and file present in the local directory, and remove those
# specified in the NODEPENDOBJS list
# If SUBDIRS is not null we need to build the subdirectories before building
# the current directory. If COMMON_BASIC_SUBDIRS is also not null -- and
# _WRS_CONFIG_BUILD_BASIC_IPNET is defined -- we then need to rebuild those
# subdirectories with the additional specification of OPT=-basic
# -basic now allowed for MSP, UP, SMP, LP64
# if we have SUBDIRS
ifneq ($(SUBDIRS),)
BASIC_SUBDIRS = $(filter $(COMMON_BASIC_SUBDIRS),$(SUBDIRS))
subdirs : $(SUBDIRS)
$(SUBDIRS)::
cd $@ && $(MAKE) CPU=$(CPU) TOOL=$(TOOL) _WRS_CONFIG_FP=$(_WRS_CONFIG_FP) $(TARGET)
ifneq ($(BASIC_SUBDIRS),)
ifeq ($(OPT),)
ifneq ($(_WRS_CONFIG_BUILD_BASIC_IPNET),)
$(BASIC_SUBDIRS)::
cd $@ && $(MAKE) CPU=$(CPU) TOOL=$(TOOL) OPT=-basic $(TARGET)
endif
endif
endif
# No SUBDIRS
else
subdirs:
endif
########
#
# doc rules
# re-define the DOC_DIR for the libraries as the default DOC_DIR is for BSPs
DOC_DIR = $(DOCS_ROOT)/$(DOC_KERNEL_API)
PLUGIN_DIR = $(shell echo $(DOC_KERNEL_API) | cut -d / -f 1)
DOC_OPTS = -mg -nostrict -missingok
# When the desired set of directories to be documented is different from the
# directories whose software must be built (common for component products),
# set DOCSUBDIRS to the subdirectories to be documented.
ifeq ($(DOCSUBDIRS),)
DOCSUBDIRS = $(SUBDIRS)
endif
ifneq ($(DOCSUBDIRS),)
# define the man target and the default output directory for libraries
man:
-for DIR in $(DOCSUBDIRS) ; \
do ( cd $$DIR; $(MAKE) CPU=$(CPU) TOOL=$(TOOL) man ) ; \
done
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) -format xml $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(MAN_PAGE_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(MAN_PAGE_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
@date
link ::
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/htmlLink -R \
$(DOCS_ROOT)/$(PLUGIN_DIR)
synopsis ::
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen \
-d $(WIND_BASE)/host/resource/synopsis $(DOC_FILES)
for DIR in $(DOCSUBDIRS) ; \
do ( cd $$DIR; $(MAKE) CPU=$(CPU) TOOL=$(TOOL) synopsis ) ; \
done
@date
clean_synopsis ::
for DIR in $(DOCSUBDIRS) ; \
do ( cd $$DIR; $(MAKE) CPU=$(CPU) TOOL=$(TOOL) clean_synopsis ) ; \
done
ifneq ($(DOC_FILES),)
$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen -clean \
-d $(WIND_BASE)/host/resource/synopsis
endif
# No DOCSUBDIRS
else
man:
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR) \
-set $(DOC_KERNEL) -format xml $(DOC_FILES)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(MAN_PAGE_OPTS) \
-book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(MAN_PAGE_DIR) \
-set $(DOC_KERNEL) $(DOC_FILES)
@date
synopsis ::
ifneq ($(DOC_FILES),)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen \
-d $(WIND_BASE)/host/resource/synopsis $(DOC_FILES)
@date
endif
clean_synopsis ::
ifneq ($(DOC_FILES),)
$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/syngen -clean \
-d $(WIND_BASE)/host/resource/synopsis
endif
endif
# end doc rules
#
######
@@ -0,0 +1,11 @@
# rules-lib.x86-win32 - host specific rules
#
# modification history
# --------------------
# 02a,24sep03,c_c now use unix defaults
#
# DESCRIPTION
# This file contains the makefile rules that are specific to Windows to build
# vxWorks libraries.
include $(WIND_BASE)/target/h/make/rules-lib.unix
+30
View File
@@ -0,0 +1,30 @@
# rules.apps
# This file depends on rules.library having been included elsewhere.
# Eventually, one of these files may include the other.
#
# Must do applibsclean first so that we can ensure that only one munch is
# performed on the file. It follows that when trying to only re-compile
# some files, you must make all from the top-most level so that all files
# get placed in the app files.
#
# Building applibsubdirs causes all subdirectories named in APPLIBSUBDIRS to
# build into the .o and .a by building applibsall. The resulting .o needs
# to be munched when done, so we do that here.
# Provided for T1 compatibility.
ifeq ($(MUNCH),)
MUNCH=munch
endif
applibs: applibsclean applibsall applibsubdirs
$(CP) $(LIB_ROOT)/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME) $(LIB_ROOT)/$(APPLIBDIRNAME)/temp1.o
$(NM) $(LIB_ROOT)/$(APPLIBDIRNAME)/temp1.o | $(MUNCH) > $(LIB_ROOT)/$(APPLIBDIRNAME)/ctdt.c
$(CC) -c $(C++FLAGS) -traditional $(LIB_ROOT)/$(APPLIBDIRNAME)/ctdt.c -o $(LIB_ROOT)/$(APPLIBDIRNAME)/ctdt.o
$(LD) $(LD_PARTIAL_FLAGS) -o $(LIB_ROOT)/$(APPLIBDIRNAME)/$(OBJAPPLIBNAME) $(LIB_ROOT)/$(APPLIBDIRNAME)/temp1.o $(LIB_ROOT)/$(APPLIBDIRNAME)/ctdt.o
@ $(RM) $(LIB_ROOT)/$(APPLIBDIRNAME)/ctdt.c $(LIB_ROOT)/$(APPLIBDIRNAME)/ctdt.o $(LIB_ROOT)/$(APPLIBDIRNAME)/temp1.o
include $(TGT_DIR)/h/make/rules-apps.$(WIND_HOST_TYPE)
File diff suppressed because it is too large Load Diff
+221
View File
@@ -0,0 +1,221 @@
# rules.bsp2.mk - BSP2 makefile target rules
#
# Copyright (c) 2010 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 01f,14dec10,mze change tools
# 01e,13dec10,mze update
# 01d,13dec10,pee tuning
# 01c,10dec10,pee update
# 01b,08dec10,mze more tweaks
# 01a,01dec10,mze created
#
# DESCRIPTION
# This file contains rules used in building targets from the BSP2 directories.
#
# This file is only for command line builds from the BSP directory. BSPs that include
# rules.bsp2.mk are only capable of building VIP projects this is inclusive of bootroms
# of all natures.
#
include $(WRVX_COMPBASE)/$(COMP_IPNET2)/osconfig/vxworks/make/defs.ipcom
include $(TGT_DIR)/h/make/rules.memory
include $(TGT_DIR)/h/make/defs.base.mk
################################################################################
#
# Dependency search path of .a files
#
vpath %.a $(patsubst -L%,%,$(LD_LINK_PATH))
################################################################################
#
# meta build targets
#
release : $(RELEASE)
#$(warning release is set to $(RELEASE))
## make will default to "exe"
# check to see if it is a SMP project
ifdef _WRS_CONFIG_SMP
prjOpt = -smp
newPRJNAME = $(BSP_NAME)_$(TOOL)_$(newName)_vxWorks
_BOOTROM_TARGETS = bootrom bootrom_uncmp bootrom_res bootrom_res_high bootapp bootapp.sym bootapp.hex
$(_BOOTROM_TARGETS):
@echo ERROR: SMP bootrom image builds are not supported.
@cho " Please build VxWorks UP bootrom image to boot"
echo " VxWorks $(VXBUILD) images."
newName = smp
# check to see if it is also LP64 project
ifdef _WRS_CONFIG_LP64
prjOpt += -lp64
newName =lp64_smp
endif
else
# check if LP64 project
ifdef _WRS_CONFIG_LP64
prjOpt += -lp64
newName = lp64
newPRJNAME = $(BSP_NAME)_$(TOOL)_$(newName)_vxWorks
endif
endif
# parameters:
# $1 project name - will be preceedeed by $(BSP_NAME)_$(TOOL)
# $2 build targets
# $3 profile
# $4 options
_VIP_TOOLS = $(TOOL)
release : _VIP_TOOLS=$(RELEASE_TOOLS)
release : _PreWarning=
release : _PostWarning=
define __createVIP
$(call print,$(call _PreWarning,$(BSP_NAME)_$(TOOL)$1,$(TGT_DIR)/proj/),)
@echo creating project
$(foreach tool,$(_VIP_TOOLS),$(newline)$(tab)cd $(TGT_DIR)/proj && vxprj create -force $4 $(if $3, -profile $3) $(BSP_NAME) $(tool) $(BSP_NAME)_$(tool)$1)
@echo building project
$(foreach btool,$(_VIP_TOOLS),$(foreach spec, $2,$(newline)$(tab)cd $(TGT_DIR)/proj/$(BSP_NAME)_$(btool)$1 && vxprj build $(spec)))
$(call print,$(call _PostWarning,$(BSP_NAME)_$(TOOL)$1,$(TGT_DIR)/proj/),)
@echo done
endef
exe :
ifndef _WRS_CONFIG_SMP
ifndef _WRS_CONFIG_LP64
$(call __createVIP,, default)
endif
endif
ifdef _WRS_CONFIG_SMP
ifndef _WRS_CONFIG_LP64
$(call __createVIP,_smp,default,,-smp)
endif
endif
ifndef _WRS_CONFIG_SMP
ifdef _WRS_CONFIG_LP64
$(call __createVIP,_lp64,default,,-lp64)
endif
endif
ifdef _WRS_CONFIG_SMP
ifdef _WRS_CONFIG_LP64
$(call __createVIP,_lp64_smp,default,,-lp64 -smp)
endif
endif
vxWorks :
$(call __createVIP,, default)
vxWorks_smp:
$(call __createVIP,_smp,default,,-smp)
vxWorks_lp64:
$(call __createVIP,_lp64,default,,-lp64)
vxWorks_lp64_smp:
$(call __createVIP,_lp64_smp,default,,-lp64 -smp)
vxWorks.st:
$(call __createVIP,_vxWorks.st,default,PROFILE_STANDALONE_DEVELOPMENT,)
vxWorks.st_smp:
$(call __createVIP,_smp_vxWorks.st,default,PROFILE_STANDALONE_DEVELOPMENT,-smp)
vxWorks.st_lp64:
$(call __createVIP,_lp64_vxWorks.st,default,PROFILE_STANDALONE_DEVELOPMENT,-lp64)
vxWorks.st_lp64_smp:
$(call __createVIP,_lp64_smp_vxWorks.st,default,PROFILE_STANDALONE_DEVELOPMENT,-lp64 -smp)
vip_bootrom:
$(call __createVIP,_bootrom,vxWorks_romCompress.bin,PROFILE_BOOTROM_COMPRESSED_BASIC,)
vip_lp64_bootrom:
$(call __createVIP,_lp64_bootrom,vxWorks_romCompress.bin,PROFILE_BOOTROM_COMPRESSED_BASIC,-lp64)
vip_bootrompxe:
$(call __createVIP,_bootrom,vxWorks_romCompress.bin vxWorks_romCompress.pxe,PROFILE_BOOTROM_COMPRESSED_BASIC,)
vip_lp64_bootrompxe:
$(call __createVIP,_lp64_bootrom,vxWorks_romCompress.bin vxWorks_romCompress.pxe,PROFILE_BOOTROM_COMPRESSED_BASIC,-lp64)
NEW_VX_TARGETS = exe vxWorks_lp64 vxWorks_lp64_smp vxWorks vxWorks_smp vxWorks.st vxWorks.st_smp vxWorks.st_lp64 vxWorks.st_lp64_smp
NEW_VIP_BOOT = vip_lp64_bootrom vip_bootrom
NEW_VIP_BOOTPXE = vip_lp64_bootrompxe vip_bootrompxe
# _BOOTROM_TARGETS = bootrom bootrom_uncmp bootapp
# bootrom_uncmp: PROFILE= -profile PROFILE_BOOTROM_BASIC
# bootapp : PROFILE= -profile PROFILE_BOOTAPP_BASIC
# bootrom_uncmp: newPRJNAME = $(BSP_NAME)_$(TOOL)_$(newName)_bootrom_uncmp
# bootapp : newPRJNAME = $(BSP_NAME)_$(TOOL)_$(newName)_bootram
define _PreWarning
"*********************************************************************"
"* WARNING: make from the BSP directory is not supported for $(BSP_NAME),"
"* please move to using the 'vxprj' command line build."
"* To ease migration, the project $(1)"
" will be created in directory:"
" $(2)"
"*********************************************************************"
endef
define _PostWarning
"*********************************************************************"
"* WARNING: make from the BSP directory is not supported for $(BSP_NAME),"
"* please move to using the 'vxprj' command line build."
"* To ease migration, the project $(1)"
" has been created in directory:"
""
" $(2)"
""
"* Changes made in $(1) will be"
" deleted the next time make is invoked in the BSP directory."
"* Do not mix using BSP builds and vxprj command builds."
"*********************************************************************"
endef
newPRJ_FULLPATH = $(TGT_DIR)/proj/$(newPRJNAME)
_OTHER_TARGETS = vxWorks_rom vxWorks.res_rom vxWorks.res_rom_res_low vxWorks.res_rom_nosym vxWorks.res_rom_nosym_res_low vxWorks.sym vxWorks.hex vxWorks.old vxWorks.bin
.PHONY : $(_BOOTROM_TARGETS) $(_STANDALONE_TARGETS) $(_OTHER_TARGETS) clean
$(_OTHER_TARGETS) :
@echo ERROR: Building target $@ is not supported for
@echo " VxWorks $(BSP_NAME) from BSP builds."
@echo " Please use the 'vxprj' project facility."
clean :
@echo ERROR: Cleaning $(BSP_NAME) project is not supported from BSP directory.
@echo " Please look at $(newPRJ_FULLPATH)"
@echo " for the $(BSP_NSME) project created from this directory."
%.old %.bin %.hex : % ;
include $(TGT_DIR)/h/make/rules.bspmacros.mk
@@ -0,0 +1,199 @@
# rules.bspmacros.mk - BSP2 makefile target rules
#
# Copyright (c) 2010-2013, 2017 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 01i,24jan17,pee add support for user CFLAGS in VIP (VXW6-85583)
# 01h,22aug13,rtm fix for defect WIND00429956
# 01g,02feb12,mze add .CPP as a valid suffix
# 01f,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01e,28jul11,jam update mapping file for docs
# 01d,12may11,jam change mapping file version
# 01c,06jan11,jph check if mapping file exists
# 01b,03dec10,mze created
# 01a,01dec10,mze created
#
# DESCRIPTION
# This file contains rules used in building macros and header from the BSP directories.
#
#
###############################################################################
#
# headerMacros - output the values of all header macros
#
# Used by the project creation scripts
headerMacros: sysLib.c $(TOOL_OPTIONS_FILES_ALL)
@@ $(CPP_PRINT_MACROS) $(CDF_OVERRIDE) $(CFLAGS_OPTIONS_ALL) $(ALLFLAGS_VSBDEFS) sysLib.c
###############################################################################
#
# makeMacrosReferred - output makefile-macros referred by project
#
makeMacrosReferred:
$(NOP) VX_OS_LIBS = $(VX_OS_LIBS)
###############################################################################
#
# makeMacros - output makefile-macros related to toolchain settings
#
# Used by the project creation scripts
makeMacros:
@ $(ECHO) '$(NOP) CPU = $(CPU)\n\
$(NOP) TOOL = $(TOOL)\n\
$(NOP) AR = $(AR)\n\
$(NOP) CC = $(CC)\n\
$(NOP) CPP = $(CPP)\n\
$(NOP) NM = $(NM)\n\
$(NOP) SIZE = $(SIZE)\n\
$(NOP) AS = $(AS)\n\
$(NOP) LD = $(LD)\n\
$(NOP) USER_CFLAGS = <put your custom flags here> \n\
$(NOP) USE_USER_FLAGS = NO \n\
$(NOP) CFLAGS_AS = $(CFLAGS_AS)\n\
$(NOP) C++FLAGS = $(C++FLAGS)\n\
$(NOP) CFLAGS_PROJECT = $(CFLAGS_PROJECT)\n\
$(NOP) CFLAGS_AS_PROJECT = $(CFLAGS_AS_PROJECT)\n\
$(NOP) EXTRA_CFLAGS = $(EXTRA_INCLUDE) $(EXTRA_DEFINE) $(OPT_DEFINE) $(ADDED_CFLAGS)\n\
$(NOP) EXTRA_DEFINE = $(EXTRA_DEFINE)\n\
$(NOP) EXTRA_INCLUDE = $(EXTRA_INCLUDE)\n\
$(NOP) LIBS = $(LIB_EXTRA) $$(VX_OS_LIBS)\n\
$(NOP) LD_LINK_PATH = $(LD_LINK_PATH)\n\
$(NOP) LDDEPS = $(LDDEPS)\n\
$(NOP) BOOT_EXTRA = $(BOOT_EXTRA)\n\
$(NOP) MACH_DEP = $(MACH_DEP)\n\
$(NOP) OPTION_DEPEND = $(OPTION_DEPEND)\n\
$(NOP) OPTION_LANG_C = $(OPTION_LANG_C)\n\
$(NOP) TOOL_FAMILY = $(TOOL_FAMILY)\n\
$(NOP) HEX_FLAGS = $(HEX_FLAGS)'
ifneq ($(DEPEND_GEN_UTIL),)
@ $(ECHO) "$(NOP) DEPEND_GEN_UTIL = $(DEPEND_GEN_UTIL)"
endif
ifeq ($(TC_INFO),TRUE)
@ $(ECHO) "$(NOP) CC_ARCH_SPEC = $(CC_ARCH_SPEC)"
endif
ifeq ($(CPU_TO_BUILD),$(CPU))
ifeq ($(TOOL_TO_USE),$(TOOL))
checkCpuAndBuild: $(TARGET)
@echo done
else
checkCpuAndBuild:
@echo nothing to do for BSP $(BSP_NAME)
endif
else
checkCpuAndBuild:
@echo nothing to do for BSP $(BSP_NAME)
endif
.PHONY : echoBsp
.PHONY : echoCpuVariant
echoBsp :
@echo Bsp $(BSP_NAME) {
@echo CPU $(CPU)
ifdef ENDIAN
@echo ENDIAN $(ENDIAN)
endif
ifdef FP
@echo FP $(FP)
endif
@echo }
echoCpuVariant :
@echo $(CPU_VARIANT)
#
# It is possible to generate dependency lists automatically by depending on
# a make include file:
#
# with: GNU make, SunOS 4.x/5.x make.
# but not with: clearmake, HPUX 9.x make, and probably plenty of others.
#
# If depend.$(BSP_NAME) has been removed and you are haplessly without
# a copy of GNU make:
#
# % # In the BSP in question...
# % touch depend.$(BSP_NAME)
# % make depend.$(BSP_NAME)
# % make
#
# Order in the Universe should be restored.
#
C_FILES := $(wildcard *.c $(CONFIG_ALL)/*.c)
CPP_FILES := $(wildcard *.cpp *.CPP $(CONFIG_ALL)/*.cpp $(CONFIG_ALL)/*.CPP)
#
# Create a dependency file if there are any C_FILES or CPP_FILES discovered
#
depend.$(BSP_NAME) : $(TOOL_OPTIONS_FILES_ALL)
@echo "# Dependency file created for $@" > $@
ifneq ($(C_FILES),)
# C dependencies found
#
$(CC) $(OPTION_DEPEND_C) $(CFLAGS) $(filter-out $(NODEPENDOBJS),$(C_FILES)) >> $@
endif
ifneq ($(CPP_FILES),)
# CPP dependencies found
#
$(CPP) $(OPTION_DEPEND_C) $(C++FLAGS) $(filter-out $(NODEPENDOBJS),$(CPP_FILES)) >> $@
endif
# The two files below may not be present for simulators. So ignore the error
# returned by the compiler if the file does not exist.
ifneq ($(wildcard romInit.s),)
$(CPP) $(OPTION_DEPEND_AS) $(CASFLAGS) romInit.s >> $@
endif
ifneq ($(wildcard sysALib.s),)
$(CPP) $(OPTION_DEPEND_AS) $(CASFLAGS) sysALib.s >> $@
endif
# Post process the dependencies to substitute WIND variables
- @ $(BSP_PROCESS_DEP)
# XXX generic rule for assembly files forthcoming
ifneq ($(IS_PRJ),TRUE)
BSP2PRJ=FALSE
ifeq ($(BSP2PRJ),FALSE)
ifneq ($(MAKECMDGOALS),clean)
ifeq ($(wildcard depend.$(BSP_NAME)),depend.$(BSP_NAME))
-include depend.$(BSP_NAME)
endif
endif
endif
endif
# Include BSP Test component rules if installed.
-include $(TGT_DIR)/h/make/rules.bsptest
include $(TGT_DIR)/h/make/rules.$(WIND_HOST_TYPE)
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
# Include rules that support packaging of a bsp
-include $(WIND_HOME)/setup/make/rules.resourcezip
DOC_DIR = $(DOCS_ROOT)/$(DOC_BSP_DIR)
# Include IPCOM make rules to support IPCOM build
include $(WRVX_COMPBASE)/$(COMP_IPNET2)/osconfig/vxworks/make/rules.ipcom
+79
View File
@@ -0,0 +1,79 @@
# rules.dkm.mk - Host independent rules for making VxWorks Downloadable Kernel Modules
#
# Copyright 2008, 2010, 2012 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 01e,07aug12,pee WIND00368576 fixed typo in c++/s rules
# 01d,02feb12,mze add .CPP as a valid suffix
# 01c,02jul10,pee update clean
# 01b,21jun10,pee modify for dkm project
# 01a,26aug08,pee created
ifndef DEFS_DKM_MK_INCLUDED
include $(TGT_DIR)/h/make/defs.dkm.mk
endif
define buildrule
$$(OBJDIR_$(1)) :
$$(MKDIR) $$(OBJDIR_$(1))
# rules to build objects in $(OBJDIR)
$$(OBJDIR_$(1))/%.o : %.c | $(TOOL_OPTIONS_FILES_ALL) $$(OBJDIR_$1)
$$(CC) $$(CFLAGS) $$(CFLAGS_OBJ_$1) $$(CC_SDA_FLAGS) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_$$(<:.c=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
$$(OBJDIR_$(1))/%.o : %.s $(TOOL_OPTIONS_FILES_ALL) $$(OBJDIR_$1)
$$(CC) $$(CFLAGS_AS) $$(CFLAGS_AS_OBJ_$1) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_AS_$$(<:.s=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
# rule for munchless C++ compiles
$$(OBJDIR_$(1))/%.o : %.CPP $(TOOL_OPTIONS_FILES_ALL) $$(OBJDIR_$1)
$$(CXX) $$(C++FLAGS) $$(C++FLAGS_OBJ_$1) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_$$(<:.CPP=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
$$(OBJDIR_$(1))/%.o : %.cpp $(TOOL_OPTIONS_FILES_ALL) $$(OBJDIR_$1)
$$(CXX) $$(C++FLAGS) $$(C++FLAGS_OBJ_$1) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_$$(<:.cpp=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
endef
# rules to build objects in current directory
%.o : %.c | $(TOOL_OPTIONS_FILES_ALL)
$(CC) $(CFLAGS) $(CFLAGS_$@) $(CC_SDA_FLAGS) $(OPTION_DEPEND_GEN_D) $(CFLAGS_$(<:.c=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$@ $<
%.o : %.s | $(TOOL_OPTIONS_FILES_ALL)
$(CC) $(CFLAGS_AS) $(CFLAGS_AS_$@) $(OPTION_DEPEND_GEN_D) $(CFLAGS_AS_$(<:.s=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$@ $<
# rule for munchless C++ compiles
%.o : %.CPP | $(TOOL_OPTIONS_FILES_ALL)
$(CXX) $(C++FLAGS) $(C++FLAGS_$@) $(OPTION_DEPEND_GEN_D) $(CFLAGS_$(<:.CPP=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$@ $<
%.o : %.cpp | $(TOOL_OPTIONS_FILES_ALL)
$(CXX) $(C++FLAGS) $(C++FLAGS_$@) $(OPTION_DEPEND_GEN_D) $(CFLAGS_$(<:.cpp=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$@ $<
# define targets
all : $(ALL_OBJS)
release : all
clean :
$(RM) $(ALL_OBJS)
$(RM) $(EXISTING_DEPFILES)
precomp :
# expand build rules
$(eval $(foreach base, $(OBJ_BASE_NAMES), $(call buildrule,$(base))))
# include dependency files
ifneq ($(EXISTING_DEPFILES),)
include $(EXISTING_DEPFILES)
endif
ifneq ($(MISSING_DEPFILES),)
$(warning missing dependency files $(MISSING_DEPFILES))
endif
+125
View File
@@ -0,0 +1,125 @@
# rules.fs - makefile target rules for embedding a ROMFS file system image
#
# Copyright 2004-2005, Wind River Systems, Inc.
#
# modification history
# --------------------
# 01g,29jul05,rec coldfire support.
# 01f,02feb05,lei print out a message for target ROMFS_CONTENT.
# 01e,06oct04,h_k added prefix "_" to romfsImage and romfsImageEnd for SH.
# (SPR #102341)
# 01d,24sep04,c_c Allow possible previous definition of ROMFS_CONTENT to take
# precedence over the default value.
# 01c,24sep04,c_c Fixed a problem when ROMFS_CONTENT is set to nothing.
# 01b,17sep04,c_c Fixed SPR 99797.
# 01a,22jun04,c_c written
#
# DESCRIPTION
# This file contains rules used for embedding a filesystem within vxWorks image.
# One can change default build by overriding either:
# ROMFS_CONTENT, which is a binary image of a ROMFS filesystem filled with
# files that are to be embedded on the target
# ROMFS_DIR, which represent a directory tree on the local filesystem that
# contains all the files that are to be embedded on the target.
#
# This file is included by rules.project and rules.bsp, and rely on all the
# rules that are defined by regular target builds (.o.s, $(CC), ...), and
# therefore may not work is included standalone.
# We must provide different name for the generated assembly file (ROMFS_IMAGE),
# to avoid any problem if the generated file exists in the BSP directory, and,
# therefore could be fetched through the vpath directive.
ifneq ($(PRJ_DIR),)
ifeq ($(ROMFS_DIR),)
ROMFS_DIR = $(PRJ_DIR)/romfs
endif
ifeq ($(ROMFS_CONTENT),)
ROMFS_CONTENT = $(PRJ_DIR)/content.romfs
endif
ROMFS_IMAGE = romfs_image_prj.o
else
ifeq ($(ROMFS_DIR),)
ROMFS_DIR = romfs
endif
ifeq ($(ROMFS_CONTENT),)
ROMFS_CONTENT = content.romfs
endif
ROMFS_IMAGE = romfs_image.o
endif
ifneq ($(VX_CPU_FAMILY),sh)
ifeq ($(VX_CPU_FAMILY),cf)
# cf require leading prefix "_"
ROMFSIMAGE_SYM_NAME = _romfsImage
else
# everyone else
ROMFSIMAGE_SYM_NAME = romfsImage
endif
else
# sh require leading prefix "_"
ROMFSIMAGE_SYM_NAME = _romfsImage
endif
# Be sure that if some variable have been given as WIN32 path we handle them
# correctly
override ROMFS_CONTENT := $(subst \,/,$(ROMFS_CONTENT))
override ROMFS_DIR := $(subst \,/,$(ROMFS_DIR))
###############################################################################
#
# Rule for rebuilding ROMFS image
#
# mkromfs: -q quiet mode
# -n only create filesys if files changed in input
# -o $(ROMFS_CONTENT)output file name
#
# Dummy target to force call to MKROMFS, which will take care of updating
# ROMFS content.
__always_build:
# Create a filesystem binary image from a directory content.
# We do the binary image if ROMFS_DIR is really a dir. Otherwise, we create a
# zero-length file if no file was existing before.
$(ROMFS_CONTENT) : __always_build
@if [ -d "$(ROMFS_DIR)" ]; then \
$(MKROMFS) -q -n -o $@ $(ROMFS_DIR) ; \
else \
if [ ! -f "$@" ]; then touch $@; fi; \
fi
@$(ECHO) "$(ROMFS_CONTENT) build done"
# Create on object file from a filesystem image;
# - We use an assembly file that will include the binary image.
# - we create two symbols that will point to the beginning and the end of this
# binary image.
#
# The configlette and the BSP init code will guess if there is an embedded file
# system if the difference between the two symbols' address is > 0.
$(ROMFS_IMAGE:.o=.s) : $(ROMFS_CONTENT)
@if [ -s "$<" ]; then \
$(ECHO) "\t.section \".rodata\"\n\
\t.global $(ROMFSIMAGE_SYM_NAME)\n\
\t.global $(ROMFSIMAGE_SYM_NAME)End\n\
$(ROMFSIMAGE_SYM_NAME):\n\
\t.incbin \"$<\"\n\
$(ROMFSIMAGE_SYM_NAME)End:\n" > $@; \
else \
$(ECHO) "\t.section \".rodata\"\n\
\t.global $(ROMFSIMAGE_SYM_NAME)\n\
\t.global $(ROMFSIMAGE_SYM_NAME)End\n\
$(ROMFSIMAGE_SYM_NAME):\n\
$(ROMFSIMAGE_SYM_NAME)End:\n" > $@;\
fi
+786
View File
@@ -0,0 +1,786 @@
# rules.library - Host independent rules for making libraries
#
# Copyright 1984-2012 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 04w,11sep12,pee WIND00328069
# 04v,06feb12,mze fix typo
# 04u,02feb12,mze add .CPP as a valid suffix
# 04t,26jan11,mze fix WIND00252737
# 04s,27oct10,mze change AUTOCONF_INCLUDED macro for posix compliance
# 04r,20sep10,pee WIND00233058
# 04q,05apr10,gvm Added rules to remove .ARM.attributes sections from objects
# for GCC
# 04p,27aug09,pee WIND00179104
# 04o,23jul09,pee add DKM tags for .out files..
# 04n,30jun09,pee adding support for optional rule files.
# 04m,22apr09,pee adding optional CC wrapper.
# 04l,04may09,pee adding VSB private include directory
# 04k,03apr09,pee generation of VSB header file directory.
# 04l,25mar09,pee WIND00161015
# 04k,30jan09,pee WIND00153935
# 04j,06nov08,pee WIND00139818
# 04i,05nov08,mze Pass VSB_DIR down in submakes
# 04h,18sep08,pee WIND00134809.
# 04g,16sep08,pee fixing recursion problem.
# 04f,11sep08,pee more precomp...
# 04e,09sep08,pee adding variant build to precomp.
# 04d,26aug08,pee added named rule for vsb config file.
# 04c,27aug08,pee adding WV_INSTRUMENTATION def to vsbConfig.h for code
# transition.
# 04b,17jul08,pee VSB
# 04a,17jul08,pee precomp dependency on directory.
# 03z,16jul08,pee adding precomp target to build precomp only.
# 03y,15jul08,pee missing dependency for precomp
# 03x,11jul08,pee Fixing flag expansion for precomp objects.
# 03w,05jul08,jpb Fixed typo. Added ifndef in case _WRS_VX_SMP
# already defined.
# 03v,26may08,pee removing rules to build and clean files outside
# libraries such as scgen and vxbus files.
# 03u,12may08,pee deprecating top level legacy libraries lib$(CPU)$(TOOL)vx.a
# 03t,30apr08,pee more vsb.
# 03s,23apr08,pee vsb
# 03s,03mar08,pee adding lib specific flag.
# 03r,11oct07,pee cleaning up dependencies for implicit rules.
# 03q,28sep07,pee WIND00105890
# 03p,22sep07,tor move vxbUsrCmdLine.c to BSP build
# 03o,17sep07,pee WIND00101242, WIND00101957
# 03n,01aug07,tor vxbUsrCmdLine.c and vxbMethodDecl.h dependency improvements
# 03m,19jul07,tor dependency on vxbUsrCmdLine.c and vxbMethodDecl.h
# 03l,16jul07,mcm Further updates to remove unrecognized sections when files
# are compiled with GCC.
# 03k,13jul07,mcm Adding temporary rules to remove .gnu.attributes and
# .ARM.attributes sections when compiling with gnu.
# 03j,19jun07,tpw Use WRVX_COMPBASE vs. WIND_COMPONENTS correctly.
# 03i,30may07,dcc removed CC_SDA_FLAGS from asm and c++ builds.
# 03h,01jun07,tkf ipcom_ipdomain now generated in _IPCOM_OBJ_DIR.
# 03g,05may07,dcc added CC_SDA_FLAGS.
# 03f,23apr07,pee support for building project from source with multiple libs
# 03e,30mar07,mmg update for parallel make operation
# 03d,03mar07,tkf Add dependency on IPCOM include path file for .o targets.
# 03c,15nov06,jpb added TOOL parameter for scgen
# 03b,10nov06,tkf Added -include rules.ipcom
# 03a,15jun06,tfo added rule for .c files in obj path
# 02z,22may06,pee Adding support for multiple libraries
# 02y,22aug05,pee added target name to make depend rules
# 02x,05aug05,??? fix for too long expansion
# 02w,22jul05,pee cleaned precomp rules. They failed on large paths.
# 02v,07jul05,pee added opath target to help find object files.
# 02u,31may05,md,pee moved dependencies to object directory
# 02t,18apr05,pee added support for precomp objs.
# 02s,07apr05,h_a LIB_ROOT to replace $(TGT_DIR)/lib for building components
# 02r,04feb05,lei no need a dependency file for "make man"
# 02q,14may04,yvp Added LOCAL_RCLEAN rule.
# 02p,22mar04,yvp Changed rules for scgen-derived-files to match scgen ver02a.
# 02o,13mar04,dlk Support option builds.
# 02n,02mar04,yvp Added separate rule to make TGT_DIR/h/syscall.h.
# 02m,26feb04,yvp Added copy rules for syscall.h (SPR 93550).
# 02l,20feb04,c_c Added BUILD_EXT in ctdt file to allow parallel builds
# (SPR 79165).
# + merged fix for SPR #93014.
# 02k,22jan04,pch SPR 93014: unify build rules for CPUGEN_EXISTS
# and remove debug code introduced in 02e.
# 02j,16dec03,yvp Ignore error deleting scgen temp files.
# 02i,15dec03,yvp Cleanup scgen invocation rules.
# 02h,04dec03,yvp Changed options to scgen.
# 02g,03dec03,c_c Clean variant directories when invoking rclean.
# 02f,07nov03,c_c Unified build rules with WIN32 hosts.
# 02e,03nov03,pch don't try to run cpuGen if it does not exist
# 02d,10oct03,yvp Added -h (header file only) option to scgen.
# 02c,18sep03,yvp Added syscalldeps.
# 02b,14feb02,jab use LD_PARTIAL_LAST_FLAGS in last link for .out targets
# 02a,14dec01,tam made CPU variant builds automatic
# 01z,06dec01,tam added support for building CPU variant archive(s)
# 01y,04dec01,sn added BUILD_ALL_OBJS
# 01x,12nov01,tam added use of TOOL_COMMON_DIR
# 01w,09nov01,tam removed '//' in paths
# 01v,08nov01,tam fix x86-win32 build; added build of empty lib$CPU$TOOLvx.a
# 01u,01nov01,tam updated rclean rule for new archive directory hierarchy
# 01t,19oct01,pch Add rules and dependencies for generation of
# target/src/arch/Makefile and target/h/types/vxCpu.h
# 01s,01nov01,jab added LIBDIR directory creation
# 01r,24oct01,tam updated for repackaging
# 01q,23oct01,jab cleaned up
# 01p,11oct01,dbs add EXCLUDE_SUBDIRS variable as per AE
# 01o,20sep01,dat Moving make files to h/tool/
# 01n,19sep01,mem Prefix $(VX_CPU_FAMILY) to LIBDIRBASE path.
# 01m,06aug01,mem Updated for new runtime arrangement.
# 01l,25jul01,sn Add per-file CFLAGS capability for C++ files
# 01k,24jul01,r_s changing the make 'ifeq' conditional to work with 'gnu',
# 'sfgnu', 'sfgnule' etc for TOOL
# 01j,24jul01,r_s diab specific rules added
# 01j,05jun01,mem Add per-file CFLAGS_AS capability.
# 01i,12jan00,dra add per-file CFLAGS capability
# 01h,19jan99,dra use LD_PARTIAL_FLAGS for partial links with ctdt.o
# 01g,23feb99,sn removed references to $(POST_MUNCH)
# -traditional -> -fdollars-in-identifiers
# 01f,02feb99,sn added rules to build standalone "munched" C++ modules
# (useful for building test programs)
# 01e,11dec98,j_w add clean rule to remove lib$(CPU)$(TOOL).a
# 01d,11nov98,sn undid 01d
# 01c,07nov96,yp made the RM commands in implicit rules windows friendly
# 01b,17may96,yp moved clean rule to host specific stubs so Windows will work
# 01a,07may96,yp created
#
# DESCRIPTION
# This file is included by every Makefile in the run-time (not BSPs).
# This file contains makefile rules that are host independent for creating
# vxWorks libraries. It also contains implicit rules for .c .s .cpp and .cxx
# files in either the current directory or in $(LIBDIR).
#
# In each source directory, the list of source files is obtained and matched
# against the objects specified to be built in the OBJS macro. In this way
# extraneous .c and .s files are ignored and make does not fail if it doesn't
# find the source file to an object in OBJS (This is the case with most source
# customers).
#
# The MAKETAIL and CLEANTAIL macros, designed by Sott H. although obsolete
# from here on, are still available and known to work only in Unix environments.
#
# If the macro SUBDIRS is defined with directories we build the subdirectories
# before we build the current dir.
#
# INCLUDES
# $(TGT_DIR)/h/make/defs.library
# $(TGT_DIR)/h/make/rules-lib.$(WIND_HOST_TYPE)
# depend.$(BUILD_EXT)
# By default object files are installed in the toolchain independent object
# directory if LIB_BASE_NAME is set, that is when LIB_COMMON is not set.
# this is a workaround to a deficiency in make 3.80.
# will be fixed in 3.81
# eval functions in defs.library cannot be put inside coditional, so the condition
# is tested here
ifeq ($(DEFS_LIBRARY),)
include $(TGT_DIR)/h/make/defs.library
endif
# CPUGEN_EXISTS := $(shell [ -x $(BIN_DIR)/cpuGen ] && echo TRUE)
## implicit rules
%.o : %.s $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CC) $(CFLAGS_AS) $(CFLAGS_AS_$(<:.s=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$@ $<
# do not attempt to build dependency on their own.
%.d:
- @ :
# rules to build objects in $(LIBDIR) from sources in $(LIBDIR)
$(LIBDIR)/%.o : $(LIBDIR)/%.c $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CC_WRAPPER) $(CC) $(CFLAGS) $(CC_SDA_FLAGS) $(OPTION_DEPEND_GEN_D) $(CFLAGS_$(<:.c=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$@ $<
%.o : %.c $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CC_WRAPPER) $(CC) $(CFLAGS) $(CC_SDA_FLAGS) $(OPTION_DEPEND_GEN_D) $(CFLAGS_$(<:.c=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$@ $<
define buildrule
# rules to build objects in $(LIBDIR)
$$(LIBDIR_$(1))/%.o : %.c $(TOOL_OPTIONS_FILES_ALL)
@ $$(RM) $$@
$$(CC_WRAPPER) $$(CC) $$(CFLAGS) $$(CFLAGS_LIB_$1) $$(CC_SDA_FLAGS) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_$$(<:.c=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
@(if [ "$(TOOL_FAMILY)" = "gnu" -a "$(VX_CPU_FAMILY)" = "arm" ]; \
then \
$(OBJCPY) -R .ARM.attributes $$@; \
fi)
$$(LIBDIR_$(1))/%.o : %.s $(TOOL_OPTIONS_FILES_ALL)
@ $$(RM) $$@
$$(CC) $$(CFLAGS_AS) $$(CFLAGS_AS_LIB_$1) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_AS_$$(<:.s=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
@(if [ "$(TOOL_FAMILY)" = "gnu" -a "$(VX_CPU_FAMILY)" = "arm" ]; \
then \
$(OBJCPY) -R .ARM.attributes $$@; \
fi)
# rule for munchless C++ compiles
$$(LIBDIR_$(1))/%.o : %.CPP $(TOOL_OPTIONS_FILES_ALL)
@ $$(RM) $$@
$$(CXX) $$(C++FLAGS) $$(C++FLAGS_LIB_$1) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_$$(<:.cpp=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
@(if [ "$(TOOL_FAMILY)" = "gnu" -a "$(VX_CPU_FAMILY)" = "arm" ]; \
then \
$(OBJCPY) -R .ARM.attributes $$@; \
fi)
$$(LIBDIR_$(1))/%.o : %.cpp $(TOOL_OPTIONS_FILES_ALL)
@ $$(RM) $$@
$$(CXX) $$(C++FLAGS) $$(C++FLAGS_LIB_$1) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_$$(<:.cpp=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
@(if [ "$(TOOL_FAMILY)" = "gnu" -a "$(VX_CPU_FAMILY)" = "arm" ]; \
then \
$(OBJCPY) -R .ARM.attributes $$@; \
fi)
endef
$(eval $(foreach base, $(LIB_BASE_NAMES), $(call buildrule,$(base))))
## Rule for standalone "munched" C++ modules.
# In general the only library modules that should be munched are
# standalone test programs. Certainly nothing in the runtime should be
# munched until BSP or Project build time. If you want your
# module to be munched, specify a .out target in $(OBJS) instead
# of a .o.
$(LIBDIR)/%.out : %.CPP $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME) $(basename $@).o $<
@ $(RM) $(LIBDIR)/__$(*F)_ctdt__.c
$(NM) $(basename $@).o | $(MUNCH_DKM) > $(LIBDIR)/__$(*F)_ctdt__.c
$(MAKE) CC_COMPILER=$(OPTION_DOLLAR_SYMBOLS) $(LIBDIR)/__$(*F)_ctdt__.o
$(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) $(OPTION_OBJECT_NAME)$@ $(basename $@).o $(LIBDIR)/__$(*F)_ctdt__.o
@ $(RM) $(basename $@).o $(LIBDIR)/__$(*F)_ctdt__.c $(LIBDIR)/__$(*F)_ctdt__.o $(LIBDIR)/__$(*F)_ctdt__.d
$(LIBDIR)/%.out : %.cpp $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME) $(basename $@).o $<
@ $(RM) $(LIBDIR)/__$(*F)_ctdt__.c
$(NM) $(basename $@).o | $(MUNCH_DKM) > $(LIBDIR)/__$(*F)_ctdt__.c
$(MAKE) CC_COMPILER=$(OPTION_DOLLAR_SYMBOLS) $(LIBDIR)/__$(*F)_ctdt__.o
$(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) $(OPTION_OBJECT_NAME)$@ $(basename $@).o $(LIBDIR)/__$(*F)_ctdt__.o
@ $(RM) $(basename $@).o $(LIBDIR)/__$(*F)_ctdt__.c $(LIBDIR)/__$(*F)_ctdt__.o $(LIBDIR)/__$(*F)_ctdt__.d
# rule for munchless C++ compiles
%.o : %.CPP $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
%.o : %.cpp $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
%.o : %.cxx $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
# C++ compile and munch
%.out : %.CPP $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
@ $(RM) $@ ctdt_$(BUILD_EXT).c
$(NM) $*.o | $(MUNCH_DKM) > ctdt_$(BUILD_EXT).c
$(MAKE) CC_COMPILER=$(OPTION_DOLLAR_SYMBOLS) ctdt_$(BUILD_EXT).o
$(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) $(OPTION_OBJECT_NAME)$@ $*.o ctdt_$(BUILD_EXT).o
@ $(RM) ctdt_$(BUILD_EXT).c ctdt_$(BUILD_EXT).o
%.out : %.cpp $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
@ $(RM) $@ ctdt_$(BUILD_EXT).c
$(NM) $*.o | $(MUNCH_DKM) > ctdt_$(BUILD_EXT).c
$(MAKE) CC_COMPILER=$(OPTION_DOLLAR_SYMBOLS) ctdt_$(BUILD_EXT).o
$(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) $(OPTION_OBJECT_NAME)$@ $*.o ctdt_$(BUILD_EXT).o
@ $(RM) ctdt_$(BUILD_EXT).c ctdt_$(BUILD_EXT).o
%.out : %.cxx $(TOOL_OPTIONS_FILES_ALL)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
@ $(RM) $@ ctdt_$(BUILD_EXT).c
$(NM) $*.o | $(MUNCH_DKM) > ctdt_$(BUILD_EXT).c
$(MAKE) CC_COMPILER=$(OPTION_DOLLAR_SYMBOLS) ctdt_$(BUILD_EXT).o
$(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) $(OPTION_OBJECT_NAME)$@ $*.o ctdt_$(BUILD_EXT).o
@ $(RM) ctdt_$(BUILD_EXT).c ctdt_$(BUILD_EXT).o
## rules to build dependencies in $(LIBDIR)
$(LIBDIR)/%.dummy_d : $(WIND_BASE)/target/h/hwif/vxbus/vxbMethodDecl.h %.c $(TOOL_OPTIONS_FILES_ALL)
@ $(MKDIR) $(LIBDIR)
@ $(RM) $@
$(CC) $(CFLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.c=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_DEPEND_TARGET)$(@:.dummy_d=.o) $< >$(@:.dummy_d=.d)
$(LIBDIR)/%.dummy_d : %.s $(TOOL_OPTIONS_FILES_ALL)
@ $(MKDIR) $(LIBDIR)
@ $(RM) $@
$(CC) $(CFLAGS_AS) $(OPTION_DEPEND) $(CFLAGS_AS_$(<:.s=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_DEPEND_TARGET)$(@:.dummy_d=.o) $< >$(@:.dummy_d=.d)
$(LIBDIR)/%.dummy_d : %.CPP $(TOOL_OPTIONS_FILES_ALL)
@ $(MKDIR) $(LIBDIR)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.cpp=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_DEPEND_TARGET)$(@:.dummy_d=.o) $< >$(@:.dummy_d=.d)
$(LIBDIR)/%.dummy_d : %.cpp $(TOOL_OPTIONS_FILES_ALL)
@ $(MKDIR) $(LIBDIR)
@ $(RM) $@
$(CXX) $(C++FLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.cpp=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_DEPEND_TARGET)$(@:.dummy_d=.o) $< >$(@:.dummy_d=.d)
## rules to construct object lists
# vxWorks source distribution do not always have all of the
# sources to object files specified in macro OBJS macro.
# We use GNU make functions to find what we need to build
# get the list of .c, .cpp and .s files
FILE_LIST = $(wildcard *.[cs]) $(wildcard *.cpp) $(wildcard *.CPP) $(INDIRECT_SOURCES)
# Change .c to .o in FILE_LIST and store in TMP_LIST
TMP_LIST = $(FILE_LIST:.c=.o)
# Change .cpp to .o in TMP_LIST and store in TMP1_LIST
TMP1_LIST = $(TMP_LIST:.cpp=.o) $(TMP_LIST:.CPP=.o)
# We can also build .out files from .cpp files
TMP2_LIST = $(subst .cpp,.out,$(filter %.cpp,$(FILE_LIST))) $(subst .CPP,.out,$(filter %.CPP,$(FILE_LIST)))
# Change .s to .o in TMP1_LIST, concat with TMP2_LIST, and store in
# OBJ_PRESENT. These are the objects we can build
OBJ_PRESENT := $(TMP1_LIST:.s=.o) $(TMP2_LIST)
# Find the intersection of the objects we can build and the objects we'd
# like to build
# Normally we just build objects that can be built from source
# files in this directory. However if BUILD_ALL_OBJS is non-empty
# then trust the definition of $(OBJS).
ifneq ($(OBJ_SELECTION),)
OBJS_TO_BUILD = $(filter $(OBJ_SELECTION),$(OBJS))
_cmd = OBJS_TO_BUILD_$(base) = $$(filter $$(OBJ_SELECTION),$$(OBJS_$(base)))
else
ifeq ($(BUILD_ALL_OBJS),)
OBJS_TO_BUILD = $(filter $(OBJ_PRESENT),$(OBJS))
_cmd = OBJS_TO_BUILD_$(base) = $$(filter $$(OBJ_PRESENT),$$(OBJS_$(base)))
else
OBJS_TO_BUILD = $(OBJS)
_cmd = OBJS_TO_BUILD_$(base) = $$(OBJS_$(base))
endif
endif
$(foreach base,$(LIB_BASE_NAMES),$(eval $(_cmd)))
define precompbuildrule
PRECOMP_DIRS += $(PRECOMPDIR_$(1))
$(PRECOMPDIR_$(1))/%.o : %.c $(TOOL_OPTIONS_FILES_ALL) | $(PRECOMPDIR_$(1))
@ $(RM) $$@
$$(CC) $$(CFLAGS) $$(CFLAGS_LIB_$1) $$(CC_SDA_FLAGS) $$(OPTION_DEPEND_GEN_D) $$(CFLAGS_$$(<:.c=.o)) $$(OPTION_OBJECT_ONLY) $$(OPTION_OBJECT_NAME)$$@ $$<
$(PRECOMPDIR_$(1))/%.o : %.s $(TOOL_OPTIONS_FILES_ALL) | $(PRECOMPDIR_$(1))
@ $(RM) $$@
$(CC) $$(CFLAGS_AS) $(OPTION_DEPEND_GEN_D) $(CFLAGS_AS_$(<:.s=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$$@ $$<
# rule for munchless C++ compiles
$(PRECOMPDIR_$(1))/%.o : %.CPP $(TOOL_OPTIONS_FILES_ALL) | $(PRECOMPDIR_$(1))
@ $(RM) $$@
$(CXX) $$(C++FLAGS) $(OPTION_DEPEND_GEN_D) $(CFLAGS_$(<:.cpp=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$$@ $$<
$(PRECOMPDIR_$(1))/%.o : %.cpp $(TOOL_OPTIONS_FILES_ALL) | $(PRECOMPDIR_$(1))
@ $(RM) $$@
$(CXX) $$(C++FLAGS) $(OPTION_DEPEND_GEN_D) $(CFLAGS_$(<:.cpp=.o)) $(OPTION_OBJECT_ONLY) $(OPTION_OBJECT_NAME)$$@ $$<
endef
_DOBASES := $(foreach base,$(LIB_BASE_NAMES),\
$(if $(strip $(OBJS_PRECOMP_$(base))), $(if $(filter $(OBJ_PRESENT), $(OBJS_PRECOMP_$(base))),$(base),),))
$(eval $(foreach base, $(_DOBASES),$(call precompbuildrule,$(base))))
_DOBASES =
# Now we fix up where they will go once they are built
LIBOBJS_FROM_SRC = $(foreach file, $(OBJS_TO_BUILD), $(LIBDIR)/$(file))
LIBOBJS_PRECOMP = $(foreach file, $(OBJS_PRECOMP), $(LIBDIR)/$(file))
LIBOBJS = $(LIBOBJS_FROM_SRC) $(LIBOBJS_PRECOMP)
$(foreach base, $(LIB_BASE_NAMES), $(eval LIBOBJS_PRECOMP_$(base)=$$(foreach obj, $$(OBJS_PRECOMP_$(base)), $$(LIBDIR_$(base))/$$(obj))))
$(foreach base, $(LIB_BASE_NAMES), $(eval OBJ_PRESENT_$(base) = \
$$(filter $$(OBJ_PRESENT),$$(OBJS_$(base)))))
$(foreach base, $(LIB_BASE_NAMES), $(eval LIBOBJS_$(base) = \
$$(foreach obj, $$(OBJS_TO_BUILD_$(base)), $$(LIBDIR_$(base))/$$(obj)) \
$$(LIBOBJS_PRECOMP_$(base)) \
))
LIBOBJS = $(foreach base,$(LIB_BASE_NAMES),$(LIBOBJS_$(base)))
# It is safe to assume that if a subdirectory exists with a Makefile in it
# that we want to build it. If this is not the case one needs to over ride
# this definition in the Makefile for the directory in concern.
# NOTE: to over ride this definition one must define SUBDIRS before the
# include directive for this file (rules.library) in the Makefile
ifeq ($(SUBDIRS),)
ALL_SUBDIRS = $(patsubst %/,%,$(dir $(wildcard */Makefile)))
else
ALL_SUBDIRS = $(SUBDIRS)
endif
SUBDIRS_TMP = $(filter-out $(EXCLUDE_SUBDIRS), $(ALL_SUBDIRS))
override SUBDIRS := $(filter-out $(UNSUPPORTED_SUBDIRS), $(SUBDIRS_TMP))
# architecturedb, and files which are generated from it
# see the files in $(WIND_BASE)/host/src/cpuGen,
# and the comments in architecturedb, for details
# ARCH_DB = $(WIND_BASE)/host/resource/target/architecturedb
# ARCH_FILES = $(TGT_DIR)/src/arch/Makefile $(TGT_DIR)/h/types/vxCpu.h
## Default rule:
# The default rule builds directories recursively starting from the top level
# directory. For every directory, the selected archive is also created and/or
# populated with object files.
# In addition CPU variant build(s) if enabled for the current CPU/TOOL
# combinaison are started at the end of the top level directory build
# (target/src/).
ifeq ($(SKIP_LIB), true)
LIB_DEP =
else
LIB_DEP = lib
endif
ifneq ($(SKIP_DIR), true)
Default: $(LIB_DEP) subdirs
ifneq ($(CPU_VARIANT_MAKE_CMD),)
## Check if we are already in a CPU_VARIANT generated build command line, and
## avoid recursion.
ifneq ($(NO_RECURSE), TRUE)
$(CPU_VARIANT_MAKE_CMD)
endif
endif
ifneq ($(MAKETAIL),)
($(MAKE) -f Makefile CPU=$(CPU) TOOL=$(TOOL) \
$(MAKETAIL) \
MAKETAIL='')
endif
else
Default: subdirs
@echo skipping directory
endif
#######################################
#
# target opath will output a list of object target objects with full path
# the rule is implemented so that there is one file per line
# and no other blank lines or blank characters.
# The output would normally be fed to a linker. The GNU link does not like blanks.
#
%.opath:
@echo $(@:.opath=.o)
opath: $(LIBOBJS:.o=.opath)
opath: $(foreach base,$(LIB_BASE_NAMES),$(LIBOBJS_$(base):.o=.opath))
## recursive clean rule
rclean:
$(RM) $(LOCAL_RCLEAN)
ifneq ($(SUBDIRS),)
$(MAKE) CPU=$(CPU) TOOL=$(TOOL) _WRS_CONFIG_FP=$(_WRS_CONFIG_FP) _WRS_CONFIG_ENDIAN=$(_WRS_CONFIG_ENDIAN) \
TGT_DIR=$(TGT_DIR) TARGET=rclean $(SUBDIRS)
endif
ifeq ($(SKIP_CLEAN),)
ifneq ($(CPU_VARIANT_MAKE_CLEAN),)
## Check if we are already in a CPU_VARIANT generated build command line, and
## avoid recursion.
ifneq ($(NO_RECURSE), TRUE)
$(CPU_VARIANT_MAKE_CLEAN)
endif
endif
$(MAKE) CPU=$(CPU) TOOL=$(TOOL) _WRS_CONFIG_FP=$(_WRS_CONFIG_FP) _WRS_CONFIG_ENDIAN=$(_WRS_CONFIG_ENDIAN) TGT_DIR=$(TGT_DIR) clean
ifeq ($(CLEANLIBS),YES)
$(RM) $(wildcard $(LIB_ROOT)/lib$(CPU)$(TOOL)*.a)
$(RM) $(wildcard $(LIB_ROOT)/$(VX_CPU_FAMILY)/$(CPU)/$(TOOL)/lib*$(OPT).a)
$(RMDIR) $(wildcard $(LIB_ROOT)/$(VX_CPU_FAMILY)/$(CPU)/$(TOOL)/obj*$(OPT))
$(RM) $(wildcard $(LIB_ROOT)/$(VX_CPU_FAMILY)/$(CPU)/$(TOOL_COMMON_DIR)/lib*$(OPT).a)
$(RMDIR) $(wildcard $(LIB_ROOT)/$(VX_CPU_FAMILY)/$(CPU)/$(TOOL_COMMON_DIR)/obj*$(OPT))
$(RMDIR) $(wildcard $(LIB_ROOT)/obj$(CPU)$(TOOL)*)
endif
endif # ifneq ($(SKIP_CLEAN),)
## recursive depend rule
rdepend:
ifneq ($(SUBDIRS),)
$(MAKE) CPU=$(CPU) TOOL=$(TOOL) TGT_DIR=$(TGT_DIR) \
TARGET=rdepend $(SUBDIRS)
endif
ifeq ($(SKIP_CLEAN),)
ifneq ($(CPU_VARIANT_MAKE_DEPEND),)
## Check if we are already in a CPU_VARIANT generated build command line, and
## avoid recursion.
ifneq ($(NO_RECURSE), TRUE)
$(CPU_VARIANT_MAKE_DEPEND)
endif
endif
$(MAKE) CPU=$(CPU) TOOL=$(TOOL) TGT_DIR=$(TGT_DIR) depend
endif # ifneq ($(SKIP_CLEAN),)
# Make sure the object directory exists.
ifneq ($(LIBDIR),$(LIB_ROOT)/)
MAKE_LIBDIR = make_libdir
make_libdir:
-$(MKDIR) $(LIBDIR)
endif
$(LIB_ROOT) :
-$(MKDIR) $@
$(VSB_INCLUDE_DIR) $(VSB_PRIVATE_INCLUDE_DIR) :
-$(MKDIR) $@
ifneq ($(MK_VXBMETHODDECL),TRUE)
$(WIND_BASE)/target/h/hwif/vxbus/vxbMethodDecl.h:
$(MAKE) -C $(WIND_BASE)/target/src/hwif/methods $(WIND_BASE)/target/h/hwif/vxbus/vxbMethodDecl.h
endif
.PHONY: make_hwif hwifclean
MAKE_HWIF = make_hwif
make_hwif: $(WIND_BASE)/target/h/hwif/vxbus/vxbMethodDecl.h
hwifclean:
$(RM) $(WIND_BASE)/target/h/hwif/vxbus/vxbMethodDecl.h
define libdirrule
$$(LIBDIR_$(1)) :
$$(MKDIR) $$@
$$(PRECOMPDIR_$(1)) :
$$(MKDIR) $$@
endef
$(eval $(foreach base, $(LIB_BASE_NAMES), $(call libdirrule,$(base))))
#
# This section generates explicit rules to map the precomp objs.
#
define precompdep
$(LIBDIR_$(1))/$(2) : $(PRECOMPDIR_$(1))/$(2)
$(CP) $$< $$@
chmod +w $$@
endef
$(eval $(foreach base, $(LIB_BASE_NAMES), $(foreach file, $(OBJS_PRECOMP_$(base)), $(call precompdep,$(base),$(file)))))
# recursive build of all objects. The hope is that this rule will help
# with parallel builds. Calling lib and subdirs with parallel builds
# has the adverse effect of trying to create libraries from multiple
# subdirectories that tends to destroy the library.
all-objs : objs
ifneq ($(SUBDIRS),)
$(MAKE) CPU=$(CPU) TOOL=$(TOOL) TGT_DIR=$(TGT_DIR) \
TARGET=all-objs $(SUBDIRS)
endif
# Just in case you want to build objects and not update the archives
objs: $(MAKE_HWIF) $(MAKE_LIBDIR) $(LIBOBJS)
preobjs: $(MAKE_HWIF) $(MAKE_LIBDIR)
objsonly: $(LIBOBJS)
precomp: TARGET=precomp
precomp: RECURSE_TARGET=precomp
precomp: | $(sort $(foreach base, $(LIB_BASE_NAMES),$(foreach file, $(OBJS_PRECOMP_$(base)), $(PRECOMPDIR_$(base)))))
precomp: $(foreach base, $(LIB_BASE_NAMES), $(foreach obj, $(OBJS_PRECOMP_$(base)), $(PRECOMPDIR_$(base))/$(obj))) $(SUBDIRS)
ifdef CPU_VARIANT_MAKE_CMD
ifneq ($(NO_RECURSE), TRUE)
$(CPU_VARIANT_MAKE_CMD)
endif
endif
release:
$(MAKE) CPU=$(CPU) TOOL=$(TOOL) TGT_DIR=$(TGT_DIR) \
TARGET=release
# Files which are generated from the architecturedb
# archdeps: $(ARCH_FILES)
# ifeq ($(CPUGEN_EXISTS),TRUE)
# $(TGT_DIR)/h/types/vxCpu.h: $(TGT_DIR)/h/types/vxCpu.in $(ARCH_DB)
# cpuGen -t -i $< -o $@
#
# $(TGT_DIR)/src/arch/Makefile: $(TGT_DIR)/src/arch/Makefile.in $(ARCH_DB)
# cpuGen -m -i $< -o $@
# endif
ifeq ($(wildcard $(VSB_CONFIG_DIR)),)
$(VSB_CONFIG_FILE) : $(VSB_CONFIG_DIR)
$(VSB_CONFIG_DIR) :
$(MKDIR) $@
endif
# VSB configuration file
# this file is a wrapper, and has no dependencies
vsbconfig : $(VSB_CONFIG_FILE)
$(VSB_CONFIG_FILE) :
@echo "/* this file is automatically generated */" > $@
@echo "/* Do not edit */" >> $@
@echo >> $@
@echo "#if defined _WRS_AUTOCONF_INCLUDED || defined AUTOCONF_INCLUDED" >> $@
@echo "#else" >> $@
@echo "#include \"autoconf.h\"" >> $@
@echo "#endif" >> $@
@echo >> $@
@echo "#ifndef __vsbConfig_INCLUDED" >> $@
@echo "#define __vsbConfig_INCLUDED" >> $@
@echo >> $@
@echo "/* this is a temporary wrapper " >> $@
@echo " * defined to ease transition to " >> $@
@echo " * new coding convention" >> $@
@echo " *" >> $@
@echo " * PLEASE DO NOT USE THE VARIABLE" >> $@
@echo " * _WRS_VX_SMP" >> $@
@echo " * IN SOURCE CODE" >> $@
@echo " * PLEASE USE" >> $@
@echo " * _WRS_CONFIG_SMP" >> $@
@echo " * INSTEAD" >> $@
@echo " */" >> $@
@echo "#ifdef _WRS_CONFIG_SMP" >> $@
@echo "#ifndef _WRS_VX_SMP" >> $@
@echo "#define _WRS_VX_SMP _WRS_CONFIG_SMP" >> $@
@echo "#endif /* _WRS_VX_SMP */" >> $@
@echo "#endif /* _WRS_CONFIG_SMP */" >> $@
@echo >> $@
@echo "/* this is a temporary wrapper " >> $@
@echo " * defined to ease transition to " >> $@
@echo " * new coding convention" >> $@
@echo " *" >> $@
@echo " * PLEASE DO NOT USE THE VARIABLE" >> $@
@echo " * WV_INSTRUMENTATION" >> $@
@echo " * IN SOURCE CODE" >> $@
@echo " * PLEASE USE" >> $@
@echo " * _WRS_CONFIG_SV_INSTRUMENTATION" >> $@
@echo " * INSTEAD" >> $@
@echo " */" >> $@
@echo "#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) && !defined(_POSIX_AEP_RT_CONTROLLER_C_SOURCE)" >> $@
@echo "#ifdef _WRS_CONFIG_SV_INSTRUMENTATION" >> $@
@echo "#ifndef WV_INSTRUMENTATION" >> $@
@echo "#define WV_INSTRUMENTATION _WRS_CONFIG_SV_INSTRUMENTATION" >> $@
@echo "#endif /* WV_INSTRUMENTATION */" >> $@
@echo "#endif /* _WRS_CONFIG_SV_INSTRUMENTATION */" >> $@
@echo "#endif /* _POSIX_xxx_SOURCE */" >> $@
@echo >> $@
@echo "#endif" >> $@
# Files that are generated from syscallNum.def, syscallApi.def etc.
# These rules are provided primarily for released products where syscallXP*.def
# and syscallUsr*.def may not be shipped by Wind River. These dummy rules will
# create a zero-length file so that make should not fail due to missing
# dependencies. The intent here is for scgen to parse syscallXPNum.def,
# syscallXPApi.def, syscallUsrNum.def and syscallUsrApi.def only if they exist.
# $(TGT_DIR)/share/h/syscallXPNum.def:
# touch $@
# $ (TGT_DIR)/share/h/syscallXPApi.def:
# touch $@
# $(TGT_DIR)/share/h/syscallUsrNum.def:
# touch $@
# $(TGT_DIR)/share/h/syscallUsrApi.def:
# touch $@
# $(TGT_DIR)/h/syscall.h: $(TGT_DIR)/share/h/syscallNum.def \
# $(TGT_DIR)/share/h/syscallXPNum.def \
# $(TGT_DIR)/share/h/syscallUsrNum.def
# scgen -h
#
# $(TGT_DIR)/h/arch/$(ARCH_DIR)/syscallArgs$(ABI_SPEC).h: \
# $(TGT_DIR)/share/h/syscallApi.def \
# $(TGT_DIR)/share/h/syscallXPApi.def \
# $(TGT_DIR)/share/h/syscallUsrApi.def
# scgen -A $(ABI_SPEC) $(CPU) $(ARCH_DIR) $(TOOL)
#
# $(TGT_DIR)/h/syscallTbl.h: $(TGT_DIR)/share/h/syscallNum.def \
# $(TGT_DIR)/share/h/syscallXPNum.def \
# $(TGT_DIR)/share/h/syscallUsrNum.def \
# $(TGT_DIR)/share/h/syscallApi.def \
# $(TGT_DIR)/share/h/syscallXPApi.def \
# $(TGT_DIR)/share/h/syscallUsrApi.def
# scgen -t
#
include $(TGT_DIR)/h/make/rules-lib.$(WIND_HOST_TYPE)
include $(TGT_DIR)/h/make/defs.base.mk
# optional rules
ifneq ($(wildcard $(TGT_DIR)/h/make/rules.library.option.*.mk),)
-include $(wildcard $(TGT_DIR)/h/make/rules.library.option.*.mk)
endif
# we don't need a dependency list if are not building objects
# or for "make man"
ifeq (, $(findstring clean, $(MAKECMDGOALS)))
ifeq (, $(findstring clean, $(TARGET)))
ifneq ($(MAKECMDGOALS), man)
# We suppress the warning message about non existent file and setting of errno
# by prepending - . GNU make allows this.
LIBOBJS_NODEP = $(foreach file, $(NODEPENDOBJS), $(LIBDIR)/$(file))
DEP_OBJS = $(filter-out $(LIBOBJS_NODEP), $(LIBOBJS))
EXISTING_OBJS = $(foreach obj, $(DEP_OBJS), $(wildcard $(obj)))
DEP_FILES = $(filter %.d , $(EXISTING_OBJS:.o=.d))
EXISTING_DEP_FILES = $(foreach obj, $(DEP_FILES), $(wildcard $(obj)))
MISSING_DEP = $(filter-out $(EXISTING_DEP_FILES), $(DEP_FILES))
ifneq ($(strip $(MISSING_DEP)),)
$(warning warning: missing dependency files $(MISSING_DEP))
$(warning run make depend to regenerate)
endif
ifneq ($(strip $(EXISTING_DEP_FILES)),)
include $(EXISTING_DEP_FILES)
endif
endif
endif
endif
+29
View File
@@ -0,0 +1,29 @@
# rules.memory - memory oriented build rules
#
# Copyright 2004 Wind River Systems, Inc.
#
# modification history
# --------------------
# 01a,02jul04,fle written
# DESCRIPTION
# For now this files only contains the adrsMacros rule which prints the list
# of ADRS macros needed by the kernel files.
#
# This is used by the kernel configuration tool.
#
# SEE ALSO: vxprj
#
ifndef TGT_DIR
TGT_DIR = $(WIND_BASE)/target
endif
include $(TGT_DIR)/h/make/defs.memory
ifneq ($(BSP2PRJ), TRUE)
CC_DEFINES += $(ADRS_DEFINE)
endif
adrsMacros:
@ $(ECHO) $(ADRS_MACROS)
+371
View File
@@ -0,0 +1,371 @@
# rules.project - makefile target rules for BSP
#
# Copyright (c) 1997-2006, 2008, 2012, 2013 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 01c,17apr13,pee WIND00411630
# 01b,02feb12,mze add .CPP as a valid suffix
# 01a,04mar08,pee temporary workaround, call make instead of $(MAKE)
# 02j,07apr06,??? Undoing temp workaround
# 02i,11mar06,pee temporary workaround for XSCALE diab compiler problem.
# 02h,16aug05,pee added .d and source build files to clean rule
# 02g,09sep04,fle better use PRJ_MAKEFILE
# 02f,09aug04,fle SPR#99177 : use C flags for C++ dependencies
# 02e,07jul04,c_c Removed usage of romfs_image.h.
# 02d,05apr04,fle SPR#95255 : Added build rule for .s files
# 02c,12mar04,fle Generate dependencies files in the project directory only
# 02b,11mar04,fle Made dependencies written to .d file to avoid make
# verbosity to mess it all up
# 02a,09mar04,fle Made dependencies rules silent
# 01z,27feb04,fle SPR#91836 : added per file dependencies rule
# 01y,30jan04,fle Made clean rule use wildcards
# 01x,07nov03,c_c Unified build rules with WIN32 hosts.
# 01w,24oct03,fle SPR#90904 : added POST_HEX_BUILD_RULE to all .hex rules
# 01v,09oct03,md make ROMFS location resident in project root
# 01u,02jul03,md Added ROMFS component rules
# 01t,13mar02,sn SPR 74080 - added large project support for Diab
# 01s,04feb02,rbl add dummy "force" target to help with sub-projects
# 01r,07dec01,tpw Remove HEX_HIGH_FLAGS and HEX_LOW_FLAGS, and fix proj %.hex
# 01q,08nov01,tpw Add general %.bin rule.
# 01p,06nov01,tpw Add %.old rule to facilitate conversions to old OMFs
# 01o,20oct01,dat Relocating tool specific macro
# 01n,17sep01,sn moved LARGE_PROJECT defs here
# 01m,24apr00,dat SPR 30819, fix project link of ROM images
# 01m,06jan00,dra updated for new .hex file generation.
# 01l,11mar99,sn To prevent make from sticking "informative" messages
# about what it's doing in prjObjs.lst,
# changed -s -> --no-print-directory.
# 01k,10mar99,ren Circumventing bug in gnu make, where if there is a \t in the
# pathname, it puts a tab char instead.
# 01j,04mar99,sn added machinery to handle large projects
# 01i,19feb99,ren clean did not remove correct files
# 01h,11nov98,sn partially link using LD_PARTIAL
# clean now removes .rpo files
# 01g,09jul98,ms changed libs.size to libs.siz
# 01f,01jul98,jmp replaced LIBS by the library name in libs.nm and libs.siz
# rules.
# 01e,29jun98,ms module xref support; nm->nm -ng. new rules for autoscale.
# 01e,02jun98,ms updated prjConfig.c rules and dependancies.
# 01d,02jun98,ms updated description, removed implicit rules, rom*.o rules
# 01c,02apr98,pcn Removed Objcopy changes from Tempest view
# 01b,15dec97,pcn Added Objcopy in BSP build.
# 01a,20oct97,ms created from rules.bsp
#
# DESCRIPTION
# This file contains rules used in building targets.
# It uses variable definitions from defs.bsp and the BSP
# Makefile, which can be overriden as needed.
#
# The following have no default values and must be defined in the project
# CPU cpu type
# TOOL compiler tool (e.g., gnu)
# PRJ_TYPE image to build (e.g., vxWorks, bootrom, wdb)
# BSP_DIR directory of the BSP on which this project is based
# ROM_SIZE number of bytes of ROM space as in config.h
# ROM_TEXT_ADRS ROM entry address
# ROM_LINK_ADRS ROM link address
# RAM_LOW_ADRS RAM address to which VxWorks is linked
# RAM_HIGH_ADRS RAM address to which the boot code is linked
#
# The following variables specify what to build
#
# DEFAULT_RULE what to build
# RELEASE images made as part of WRS release step
#
# OVERVIEW OF THE BUILD RULES
#
# The makefile stub is imported by BSP Makefiles to provide rules for
# building VxWorks and application code. This section provides an overview
# of how the system works.
#
# VxWorks is built in stages
# The object files are then partially linked against the archives,
# typically just target/lib/lib$(CPU)$(TOOL)vx.a, to produce a
# relocatable vxWorks object file.
# We then optially build some support modules (ctdt.o or symTbl.o)
# to link with the relocatable vxWorks object file. These support
# modules are called POSTLINK_MODULES because they are built after
# the main link stage for vxWorks. This is done because these modules
# are derived from the relocatable vxWorks object file.
# A fully linked executable is then formed according to one of four
# possible rules:
# %_downLoadable RAM resident (no relocation of the code)
# %_romResident ROM resident (data segment copied to RAM)
# %_rom ROM copy to RAM (entire image copied to RAM)
# %_romCompress ROM uncompress to RAM (entire image uncompressed to RAM)
# The first image is linked to RAM and must be loaded to RAM by some
# external program such as a VxWorks bootROM.
# The last three images start executing from ROM. See romStart.c for
# details on how these images work.
# Finally, there are also post-processing rules available:
# %.sym stripped image containing only the symbol table
# %.hex srecord
# %.old convert to old OMF (eg. ARM COFF, Pentium a.out)
# %.bin convert to binary image
#
# LINKING
#
# The four images are linked quite differently.
# The following is a summary of the default link addresses:
# %_downLoadable text and data are contiguous, starting at RAM_LOW_ADRS
# %_romResident text at ROM_LINK_ADRS, data at RAM_LOW_ADRS
# %_rom text at ROM_LINK_ADRS, data at HIGH_ADRS. This image contains
# a %_downLoadable subimage which is linked to
# RAM_LOW_ADRS. The %_rom_cpy just copies the subimage to
# RAM_LOW_ADRS and jumps to it (see romStart.c for details).
# %_romCompress just like %_rom, but the subimage is compressed.
#
# SUMMARY OF CHANGES
#
# * Many macros have changed, but the project creation wizards
# automcatically convert from the old to the new.
# * There are now only four main rules.
# * The post-processing rules (%.hex, %.sym, etc.) apply to any image.
# * ROM images are linked to ROM addresses so one no longer needs to
# write position independant ROM startup code.
# * Build with debugging on by default (CC_DEBUG = -g).
# * The macro DEFAULT_RULE can be changed to override the default build rule.
# * Link flags are passed to romStart.c, eliminating the need for CPU ifdef's.
# * By default, rebuild all BSP objects every time. Generate dependancies
# for user modules (not previously done).
# * ctdt.o and symTbl.o are only built if the appropriate macro is defined
# in config.h.
# * The vxWorks.sym file is built only if INCLUDE_NET_SYM_TBL is defined
# in config.h.
# * Intermediate Makefile images are no longer deleted.
.SUFFIXES: .d
# I960 IMI
imi : $(IBR)
$(LD) -o $@ $(LD_IMI_ADRS) $(IBR)
# Large projects require special treatment because of the small command
# line length limit on Windows 95/98.
# Instead of passing the list of project objects $(PRJ_OBJS) on
# the command line we pass the name of a file ($(PRJ_OBJS_FILE))
# that contains this list using the "@file" syntax. This syntax is
# supported by the GNU tools ar<arch>,ld<arch> and nm<arch>.
# These definitions are here rather than in defs.project because they
# rely on the value of $(LARGE_PROJECT) passed in from make.$(CPU)$(TOOL)
ifneq ($(LARGE_PROJECT),)
PRJ_OBJS_FILE=$(PRJ_DIR)/prjObjs.lst
else
PRJ_OBJS_FILE=
endif
ifneq ($(PRJ_OBJS_FILE),)
PRJ_OBJS_FOR_LD_PARTIAL=$(OPTION_PASS_TO_LD)$(OPTION_INDIRECT_FILE)$(PRJ_OBJS_FILE)
PRJ_OBJS_FOR_LD=$(OPTION_INDIRECT_FILE)$(PRJ_OBJS_FILE)
PRJ_OBJS_FOR_NM=$(OPTION_NM_INDIRECT_FILE)$(PRJ_OBJS_FILE)
PRJ_OBJS_FOR_AR=$(OPTION_INDIRECT_FILE)$(PRJ_OBJS_FILE)
else
PRJ_OBJS_FOR_LD_PARTIAL=$(PRJ_OBJS)
PRJ_OBJS_FOR_LD=$(PRJ_OBJS)
PRJ_OBJS_FOR_NM=$(PRJ_OBJS)
PRJ_OBJS_FOR_AR=$(PRJ_OBJS)
endif
ifneq ($(PRJ_OBJS_FILE),)
# This rule creates the project object list file by delegating
# the work to another target ($(PRJ_OBJS_FILE)_make) that in turn
# depends on one target per project object.
$(PRJ_OBJS_FILE) : $(PRJ_MAKEFILE)
-$(RM) $@
@echo Generating $(subst \,/, $@)...
@make -s --no-print-directory -f $(PRJ_MAKEFILE) $@_make > \
$(PRJ_OBJS_FILE)
$(PRJ_OBJS_FILE)_make : $(foreach obj,$(PRJ_OBJS),$(obj)_._write_._)
# We have one "write" target per project object. Each one
# writes the name of the object to stdout.
# The point of using "_._write_._" is simply to ensure
# that the targets have odd enough names that they don't
# clash with any existing targets.
$(foreach obj,$(PRJ_OBJS),$(obj)_._write_._) :
@echo $(subst _._write_._,,$@)
endif
################################################################################
#
# meta build targets
#
## make will default to "exe"
exe : $(DEFAULT_RULE)
release : $(RELEASE)
__always_build__:
ifeq ($(SRC_BUILD),TRUE)
clean : src_clean
else
clean :
endif
- $(RM) $(wildcard *.o) $(wildcard *.rpo) $(wildcard ctdt.c) \
$(wildcard symTbl.c) $(wildcard $(PRJ_TYPE)*) \
$(wildcard *.out) $(wildcard *.pl) $(wildcard *.d)
- $(RM) $(PRJ_DIR)/prjComps.h $(PRJ_DIR)/prjParams.h \
$(PRJ_DIR)/prjConfig.c $(PRJ_DIR)/linkSyms.c
- $(RM) $(PRJ_DIR)/libs.nm $(PRJ_DIR)/libs.size
ifneq ($(findstring INCLUDE_ROMFS, $(COMPONENTS)),)
- $(RM) $(wildcard $(basename $(ROMFS_IMAGE)).* $(ROMFS_CONTENT))
endif
# SPR#95255 : Added rules for .s files
.s.o :
@ $(RM) $@
$(CC) $(CFLAGS_AS) $(OPTION_OBJECT_ONLY) -o $@ $<
################################################################################
#
# Rules for genereating dependencies to the standard output
#
.c.d:
@ $(CC) $(CFLAGS) $(OPTION_DEPEND) $<
.s.d:
@ $(CC) $(CFLAGS_AS) $(OPTION_DEPEND_AS) $<
.CPP.d:
@ $(CXX) $(CFLAGS) $(OPTION_DEPEND) $<
.cpp.d:
@ $(CXX) $(CFLAGS) $(OPTION_DEPEND) $<
.cxx.d:
@ $(CXX) $(CFLAGS) $(OPTION_DEPEND) $<
.cc.d:
@ $(CXX) $(CFLAGS) $(OPTION_DEPEND) $<
###############################################################################
#
# Rule for generating the module xref and component library databases
#
mxrDoc: $(PRJ_DIR)/libs.nm $(PRJ_DIR)/libs.siz
$(PRJ_DIR)/libs.nm:
$(NM) $(NM_GLOB_FLAGS) $(MXR_LIBS) > $(PRJ_DIR)/libs.nm
$(PRJ_DIR)/libs.siz:
$(SIZE) $(MXR_LIBS) > $(PRJ_DIR)/libs.siz
$(PRJ_DIR)/prjConfig.c $(PRJ_DIR)/prjComps.h $(PRJ_DIR)/prjParams.h $(PRJ_DIR)/linkSyms.c: \
$(PRJ_DIR)/$(PRJ_FILE)
- @ $(RM) $@
$(CFG_GEN) $(PRJ_DIR)/$(PRJ_FILE)
###############################################################################
#
# Rule for generating ROMFS filesystem.
#
include $(TGT_DIR)/h/make/rules.fs
###############################################################################
#
# Rule in support of autoscaling
#
mxrInfo: $(PRJ_DIR)/mxrInfo.nm $(PRJ_DIR)/mxrInfo.size
$(PRJ_DIR)/mxrInfo.nm: $(MXR_USR_OBJS)
$(NM) $(NM_GLOB_FLAGS) $(MXR_USR_OBJS) > $@
$(PRJ_DIR)/mxrInfo.size: $(MXR_USR_OBJS)
$(SIZE) $(MXR_USR_OBJS) > $@
###############################################################################
#
# Rule in support of dynamic loading
#
dynLoad.o: __always_build__
$(AR) -x $(LIBS) $(LIB_OBJS)
$(LD_PARTIAL) $(USR_OBJS) $(LIB_OBJS) -o $@
################################################################################
#
# 3 rules for objcopy flags: START_FLAGS & HEX_FLAGS, NO_VMA_FLAGS, VMA_FLAGS
# 1st rule: if NO_VMA_FLAGS==VMA_FLAGS(==0), create final output file.
ifeq ($(strip $(NO_VMA_FLAGS)),$(strip $(VMA_FLAGS)))
BINHEX_OUTPUT_FILE = $@$(MAP_EXT)
else
BINHEX_OUTPUT_FILE = out.tmp1
endif
# 2nd rule: if NO_VMA_FLAGS!=0 && VMA_FLAGS==0, create final output file.
# Note: NO_VMA_FLAGS!=0 will be tested each time.
ifeq ($(strip $(VMA_FLAGS)),)
BINCONV_OUTPUT_FILE = $@$(MAP_EXT)
else
BINCONV_OUTPUT_FILE = out.tmp2
endif
# 3rd rule: if VMA_FLAGS!=0 && NO_VMA_FLAGS==0, use out.tmp1 else out.tmp2.
# Note: VMA_FLAGS!=0 will be tested each time.
ifeq ($(strip $(NO_VMA_FLAGS)),)
BINCONV_INPUT_FILE = out.tmp1
else
BINCONV_INPUT_FILE = out.tmp2
endif
################################################################################
#
# rules for building derived images
#
%.hex: %
- @ $(RM) $@
$(BINHEX) $(START_FLAGS) $(HEX_FLAGS) $(SECT_SPEC)$<$(TXT_OFFSET) \
$(IMI_SPEC)$(IMI)$(IMI_OFFSET) $(BINHEX_OUTPUT_FILE)
ifneq ($(strip $(NO_VMA_FLAGS)),)
$(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
endif
ifneq ($(strip $(VMA_FLAGS)),)
$(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
endif
- @ $(RM) $(wildcard out.tmp*)
$(POST_HEX_BUILD_RULE)
%.old: %
- @ $(RM) $@
$(BINCONV) $(OBJCOPY_OLD_OMF) $< $@
%.bin: %
- @ $(RM) $@
$(EXTRACT_BIN) $< $@
################################################################################
#
# subproject support
#
# wind_force_make has no dependency and no rule. Depending on wind_force_make is
# a way to ensure that a rule is always executed.
wind_force_make: ;
include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE)
@@ -0,0 +1,11 @@
# rules.sun4-solaris2 - host specific rules
#
# modification history
# --------------------
# 01b,06jun96,dat SPR 6141, proper use of TGT_DIR
# 01a,01jun95,yp created
#
# DESCRIPTION
# This file contains rules that are host specific to sun4-solaris2 platform.
include $(TGT_DIR)/h/make/rules.unix
+147
View File
@@ -0,0 +1,147 @@
# rules.unix - host specific rules
#
# Copyright 1984-2007, Wind River Systems, Inc.
#
# modification history
# --------------------
# 01e,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01d,28jul11,jam update mapping file for docs
# 01c,12may11,jam change mapping file version
# 01b,06jan11,jph check if mapping file exists
# 01a,08nov10,jph add mapping file
# 01b,05nov10,??? added one more link for toc.xml
# 01a,25oct10,jph remove version
# 01a,21oct10,??? change version
# 03l,21oct10,??? change version
# 03k,150ct10,sm remove version name from the reference and add it to parent directory
# 03j,01oct09,mmg adding version number for htmllink rule as well
# 03i,22sep09,mdk adding version number to BSP docs
# 03h,26sep08,mze remove IPCOM_OBJ_DIR
# 03g,18jun08,pee VSB and cleanup
# 03f,24mar08,pee removed redundant | depend on intermediate file.
# 03e,27feb08,pee don't include depend file if it does not exist.
# 03d,19oct07,pee docs dependencies, WIND00105890
# 03c,28sep07,pee WIND00105890
# 03b,27sep07,pee backing off ...
# 03a,11sep07,pee change location of temporary tool option file to current
# output directory.
# 02z,13jul07,nic SPR#56349 - Update dependency generation to
# include C++ files.
# 02y,19jun07,tpw Use WRVX_COMPBASE vs. WIND_COMPONENTS correctly.
# 02x,01jun07,tkf ipcom_ipdomain now generated in _IPCOM_OBJ_DIR.
# 02w,03mar07,tkf Add dependency on IPCOM include path file for
# depend.BSP_NAME targets.
# 02v,17may05,lll Replaced malfunctioning "\n"'s with echo ""
# 02u,25apr05,kkz Updating for new doc path
# 02t,10jan05,lll Standalone apigen, SPR#105634 and SPR#104090
# 02s,06oct04,tpw Switch BSP doc build forward to apigen.
# 02r,10aug04,dgp temporarily revert BSP doc build back to refgen
# 02q,07jul04,c_c Removed usage of romfs_image.h.
# 02p,27may04,dgp update BSP output and TOC directories
# 02o,25may04,tpw Switch on -missingok to reduce doc build error output.
# 02n,11feb04,c_c Added a NODEPENDOBJS list to filter files that should not
# be parsed when generating dependencies (SPR 93380).
# 02m,12jan04,bjl changed refgen to apigen.
# 02l,10dec03,c_c fixed builds for BSP templates.
# 02k,28nov03,c_c Reinstated variable replacement.
# 02j,26nov03,c_c Fixed Linux simulator build.
# 02i,07nov03,c_c Unified build rules with WIN32 hosts.
# 02h,02jul03,md Added command (mkromfs) for building ROMFS image
# 02g,12mar02,wsl change BSP_Reference to VxWorks_BSP_Reference
# 02f,27nov01,wsl allow target.ref files but keep target.nr backward
# compatibility
# 02e,29oct01,jab removed ld script rules
# 02d,25oct01,dat more gnu-diab changes
# 02c,18oct01,jab made dependency generation toolchain independent
# 02b,01oct01,dat consistent use of BSP_NAME macro
# 02a,27aug01,wsl add man pages
# 01z,24jul01,r_s diab specific rules added
# 01y,28jun00,jab force creation of LECFs.
# 01x,17feb00,jab added LECF generation rules. See notes at rules.
# 01w,02feb99,sjw use -M -MG in dependency generation so generated files
# can be included in BSP files.
# 01v,26oct98,ms made dependency generation overridable from make.CPUTOOL
# 01u,15oct98,fle doc : renamed book for BSP and put boards reference into
# board library
# 01t,05oct98,ms remove romInit.s dependeny generation for simulators
# 01s,23sep98,fle doc : adapted -preproc refgen new option
# 01r,23sep98,fle doc : changed bsp book name
# 01r,22sep98,fle doc : now use refgen instead of mangen
# 01q,02jan97,dat added DOC_FLAGS
# 01p,21nov96,p_m removed unwanted @ in bsp.1 rule
# 01o,21nov96,p_m changed bsp.1 mode prior to copy target.nr
# 01n,19nov96,dat mangen error output not dropped. target.txt made in
# bsp directory. SPRs 7507 and 7508.
# 01m,15oct96,yp made rule for include of dependency list silent SPR 4483
# 01l,03oct96,dbt added backslashes in the sed expressions (HPUX10 port).
# 01k,30jul96,pad undo change 01j, introduced here by mistake.
# 01j,26jul96,pad backslashed the $ in the sed expressions (AIX port).
# 01i,10may96,dat added -DINCLUDE_SCSI for man pages (SPR3941) added copyright
# 01h,18mar96,dat fixed cpp command for building man pages
# 01g,06mar96,dat added sed command to insert $TGT_DIR into depend output
# 01f,08feb96,dat used CONFIG_ALL in making dependency list
# 01e,04nov95,p_m took care of missing files in docs rule
# 01d,06jul95,jcf made sed script global.
# 01c,21jun95,yp added sed script to prevent hardwiring depend. list.
# 01b,10jun95,yp changed TARGET_DIR to BSP_NAME
# 01a,01jun95,yp created
#
# DESCRIPTION
# This file contains rules that are host specific to the unix platform.
## documentation build targets
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
DOC_FILES := $(filter $(DOC_FILES),$(patsubst %.c,%,$(wildcard *.c)))
.PHONY: $(DOC_FILES) htmllink
man : target.html docs
docs: $(DOC_FILES) htmllink
$(DOC_FILES): $(TOOL_OPTIONS_FILES_ALL)
@echo ""; echo "Processing $@.c ... "
@-$(CPP) $(CASFLAGS) $(OPTION_PP_COMMENT) $(DOC_FLAGS) $@.c 1> $@.i
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-book VxWorks_APIs -chapter BSP_APIs \
-category $(BSP_NAME) -missingok \
-out $(DOC_DIR)/$(BSP_NAME) $@.i
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-book VxWorks_APIs -chapter BSP_APIs \
-category $(BSP_NAME) -missingok -config Auto2txt \
-out $(MAN_PAGE_DIR)/$(BSP_NAME) $@.i
@-$(RM) $@.i
htmllink:
@echo ""; echo "HTML linking ... "
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/htmlLink \
$(DOC_DIR)/$(BSP_NAME)
@echo "Linking complete."
@date
# The following variable assignment selects target.ref over target.nr, and
# exists only to facilitate the transition from nroff markup to refgen
# markup. When target.nr joins its dinosaur brethren, this should be removed.
TARGET_REF = target.ref
ifeq (,$(wildcard target.ref))
TARGET_REF = target.nr
endif
target.html:
@echo ""; echo "Processing $(TARGET_REF) ... "
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-config bsp2html -book VxWorks_APIs -chapter BSP_APIs -missingok \
-out $(DOC_DIR)/$(BSP_NAME) $(TARGET_REF)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-config bsp2txt -book VxWorks_APIs -chapter BSP_APIs -missingok \
-out $(MAN_PAGE_DIR)/$(BSP_NAME) $(TARGET_REF)
+550
View File
@@ -0,0 +1,550 @@
# rules.vsb.mk - Host independent rules for making VxWorks Source Build projects
#
# Copyright 2008-2012, Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 02k,22aug12,mze changes for default libraries
# 02j,31jan12,mze add component valid check
# 02i,05jan12,mze add supported tools
# 02h,13dec11,mze change clean
# 02g,15jun11,mze add more flags for checking
# 02f,21oct10,mze fix IPLITE implementation
# 02e,15sep10,xhs support IPLITE
# 02d,14jun10,mze adding VSB info on tools to generated file.
# 02c,10mar10,mze adding board items to vsbdefs.tcl
# 02c,03feb10,mze change to -basic is handled in rules-lib.unix
# 02b,28dec09,mze Alter CFLAGS when building with APP_TOOL
# 02a,09dec09,mze adding logic to build the -basic libraries
# 01z,17nov09,mze never use RTP CPU for building vxconfig
# 01y,06nov09,mze post merge changes
# 01x,01oct09,mze changes to the TOOL used for target/usr/apps
# 01w,16sep09,mze mod to the user directories to be built.
# 01v,12sep09,mze adding new parameter
# 01u,04sep09,mze change build of vsbConfig.h
# 01t,03sep09,mze adding checks for source and build flags
# 01s,01sep09,mze adding bypass for TOOL2 not being specified.
# 01r,12aug09,mze more restrictions on MSP user builds.
# 01p,01jun09,mze changing LP64 MACRO
# 01o,24feb09,mze adding lp64 option
# 01q,10aug09,mze block MSP if not MSP build
# 01p,22apr09,mze adding USR build rules
# 01o,24mar09,pee fixing ipnet6only option.
# 01n,06nov08,pee cleanup
# 01p,29oct08,mze typo in CPU section
# 01o,28oct08,mze mod to MSP component ADDEDCFLAG
# 01n,27oct08,mze adding "" around the ADDEDCFLAGS
# 01m,08oct08,pee typo in last checkin.
# 01l,02oct08,mze changes to ADDEDCFLAGS
# 01k,23sep08,mze add rule to clean VSB if configuration changed
# 01j,29aug08,mze changes to SMP
# 01i,26aug08,pee adding rule to build vsbConfig.h
# 01i,22aug08,pee using different toolchain definition for external
# components.
# 01h,12aug08,mze include -I. for all makes
# 01g,31jul08,mze adding more vsbdefs symbols
# 01f,25jul08,pee adding clean rule
# 01f,24jul08,mze changes for vsbdefs.tcl SMP
# 01e,22jul08,mze vsbdefs.tcl changes
# 01d,22jul08,pee adding tcl info generation.
# 01c,16jul08,pee adding building of installed components.
# 01b,27jun08,pee adding extra build for IPV6.
# 01a,11jun08,pee adding support for secondary compiler.
#
# 01a,04apr08,pee created
ifneq ($(__DEFS_LIBPRJ_MK__),TRUE)
include $(WIND_BASE)/target/h/make/defs.vsb.mk
endif
include $(WIND_BASE)/target/h/make/defs.base.mk
include $(WIND_BASE)/target/h/make/defs.vsbvars.mk
VSBCLEANFILES=$(wildcard $(VSB_DIR)/vs*Clean.mk)
ifneq ($(VSBCLEANFILES),)
-include $(VSBCLEANFILES)
endif
ifneq ($(strip $(_WRS_CONFIG_ADDEDCFLAGS)),)
__VSB_ADDEDCFLAGS="$(_WRS_CONFIG_ADDEDCFLAGS)"
endif
ifneq ($(strip $(_WRS_CONFIG_ADDEDCFLAGS2)),)
__VSB_ADDEDCFLAGS2="$(_WRS_CONFIG_ADDEDCFLAGS2)"
endif
# this macro is only used for the direct compilation of MSP components
ifneq ($(strip $(_WRS_CONFIG_ADDEDCFLAGS_APP)),)
__VSB_ADDEDCFLAGSAPP="$(_WRS_CONFIG_ADDEDCFLAGS_APP)"
endif
# the rules of interrest are _build
# _build does the actual build of the VSB libraries
.PHONY : all _build
all : _build vsbdefs.tcl
# this will ensure that the configuration files are generated before the build starts
_build :
# list concatenation function
_concat = $(if $(word 2,$(1)),$(firstword $1)$(call _concat,$(wordlist 2,$(words $1),$1)),$1)
define common_builddef
ifeq ($(_WRS_CONFIG_$1_TOOL),)
_WRS_CONFIG_$1_TOOL = $(_WRS_CONFIG_TOOL)
endif
__CAT__ = $(call _concat,$(sort $$(_WRS_CONFIG_$1_TOOL) $(_WRS_CONFIG_$1_CPU) $(_WRS_CONFIG_$1_CPU_VARIANT)))_$3
ifeq ($(_WRS_CONFIG_$1_CPU_VARIANT),)
_CONFIG_CPUSPEC_$1_$3_ = CPU=$(_WRS_CONFIG_$1_CPU)
else
_CONFIG_CPUSPEC_$1_$3_ = CPU=$(_WRS_CONFIG_$1_CPU) ONLY_CPU_VARIANT=$(_WRS_CONFIG_$1_CPU_VARIANT)
endif
CONFIG_CLI_OPTIONS = $(foreach option,ENDIAN FP SMP,$(if $(_WRS_CONFIG_$1_$(option)),_WRS_CONFIG_$(option)=$(_WRS_CONFIG_$1_$(option)))) $$(if $$(TARGET),TARGET=$$(TARGET),)
ENDIAN = $(_WRS_CONFIG_$1_ENDIAN)
FP = $(_WRS_CONFIG_$1_FP)
SMP = $(_WRS_CONFIG_SMP)
# temporary fix to ensure that the local directory contents get included
temp_include_current = ADDED_CFLAGS+=-I.
endef
#
# This is the section that deals with the kernel library builds for the non-MSP components
# including target/src and IPNET. This section handles the VSB building for BSP
#
define bsp_buildrule
$(call common_builddef,$1,$2,$3)
ifneq ($$(__DEFINED_RULE_$$(__CAT__)),TRUE)
__DEFINED_RULE_$$(__CAT__) = TRUE
.PHONY : _target_$$(__CAT__)
_build : _target_$$(__CAT__)
_target_$$(__CAT__):
ifdef vsbClean
rm -rf usr test arm cf mips ppc pentium simpc simlinux simso vsbClean.mk vsbClean.tcl
endif
ifdef _WRS_CONFIG_KSOURCE
ifdef _WRS_CONFIG_BUILD_KERNEL
cd $2 && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_TOOL) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS) _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) VSB_DIR=$(VSB_DIR) BSPNAME=$1 $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
# extra stage for default libraries build the inet6 libraries
ifdef _WRS_CONFIG_DEFAULT_VSB
cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) OPT=-inet6 SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) VSB_DIR=$(VSB_DIR) BSPNAME=$1 $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
endif
endif
endif
ifndef _WRS_CONFIG_BUILD_KERNEL
ifdef _WRS_CONFIG_NETSOURCE
ifndef _WRS_CONFIG_NO_IP
cd $(SRCDIR) && $(MAKE) vsbconfig VSB_DIR=$(VSB_DIR) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL)
cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) VSB_DIR=$(VSB_DIR) BSPNAME=$1 $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
cd $2/wrn && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) VSB_DIR=$(VSB_DIR) BSPNAME=$1 $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
endif
ifdef _WRS_CONFIG_DEFAULT_VSB
ifdef _WRS_CONFIG_COMPONENT_IPNET
cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) OPT=-basic SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) VSB_DIR=$(VSB_DIR) BSPNAME=$1 $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) OPT=-inet6 SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) VSB_DIR=$(VSB_DIR) BSPNAME=$1 $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
endif
endif
endif
endif
ifdef _WRS_CONFIG_KSOURCE
ifdef _WRS_CONFIG_BUILD_KERNEL
ifdef _WRS_CONFIG_ENABLE_TOOL2
ifdef _WRS_CONFIG_DEFAULT_VSB
$(foreach stool, $(filter-out $(_WRS_CONFIG_$1_TOOL),$(_WRS_CONFIG_SECTOOLS)),$(newline)$(tab)+cd $2 && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$(stool) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS2) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) VENDOR_DEFAULT=disabled DUAL_BUILD=true)
endif
ifndef _WRS_CONFIG_DEFAULT_VSB
cd $2 && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_TOOL2) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS2) VSB_DIR=$(VSB_DIR) BSPNAME=$1 $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) VENDOR_DEFAULT=disabled DUAL_BUILD=true
endif
endif
endif
endif
else
$$(warning warning skipping duplicate rules for $$(__CAT__))
endif
endef
#
# This is the section that deals with the kernel library builds for the non-MSP components
# including target/src and IPNET. This section handles the VSB building for CPU
#
define cpu_buildrule
$(call common_builddef,$1,$2,$3)
ifneq ($$(__DEFINED_RULE_$$(__CAT__)),TRUE)
__DEFINED_RULE_$$(__CAT__) = TRUE
.PHONY : _target_$$(__CAT__)
_build : _target_$$(__CAT__)
_target_$$(__CAT__):
ifdef vsbClean
rm -rf usr test arm cf mips ppc pentium simpc simlinux simso vsbClean.mk vsbClean.tcl
endif
ifdef _WRS_CONFIG_KSOURCE
ifdef _WRS_CONFIG_BUILD_KERNEL
+cd $2 && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_TOOL) SPACE=kernel _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
# extra stage for default libraries build the inet6 libraries
ifdef _WRS_CONFIG_DEFAULT_VSB
+cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) OPT=-inet6 SPACE=kernel _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
endif
endif
endif
ifndef _WRS_CONFIG_BUILD_KERNEL
ifdef _WRS_CONFIG_NETSOURCE
ifndef _WRS_CONFIG_NO_IP
+cd $(SRCDIR) && $(MAKE) vsbconfig VSB_DIR=$(VSB_DIR) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL)
+cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) SPACE=kernel _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
+cd $2/wrn && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) SPACE=kernel _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
endif
ifdef _WRS_CONFIG_DEFAULT_VSB
ifdef _WRS_CONFIG_COMPONENT_IPNET
+cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) OPT=-basic SPACE=kernel _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
+cd $2/ipnet && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) OPT=-inet6 SPACE=kernel _WRS_CONFIG_APP_TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) DUAL_BUILD=false
endif
endif
endif
endif
ifdef _WRS_CONFIG_KSOURCE
ifdef _WRS_CONFIG_BUILD_KERNEL
ifdef _WRS_CONFIG_ENABLE_TOOL2
# for the default VSB build all available tools
ifdef _WRS_CONFIG_DEFAULT_VSB
$(foreach stool, $(filter-out $(_WRS_CONFIG_$1_TOOL),$(_WRS_CONFIG_SECTOOLS)),$(newline)$(tab)+cd $2 && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$(stool) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS2) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) VENDOR_DEFAULT=disabled DUAL_BUILD=true)
endif
# for the non default VSB only build the secondary tool if enabled
ifndef _WRS_CONFIG_DEFAULT_VSB
+cd $2 && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_TOOL2) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS2) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) VENDOR_DEFAULT=disabled DUAL_BUILD=true
endif
endif
endif
endif
else
$$(warning warning skipping duplicate rules for $$(__CAT__))
endif
endef
#
# This is the section that deals with the kernel library builds of the contents of the
# wind components directory, the directory is based on a filtered list generated by vxprj when
# the VSB is created. If a directory has a VSB configuration in it then it will be added to the list that
# gets processed here.
#
define external_comp_buildrule
$(call common_builddef,$1,$2,$3)
ifneq ($$(__DEFINED_RULE_$$(__CAT__)),TRUE)
__DEFINED_RULE_$$(__CAT__) = TRUE
.PHONY : _target_$$(__CAT__)
_build : _target_$$(__CAT__)
_target_$$(__CAT__):
ifdef _WRS_CONFIG_NETSOURCE
+cd $2 && $(MAKE) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) SPACE=kernel _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) $4
endif
else
$$(warning warning skipping duplicate rules for $$(__CAT__))
endif
endef
#
# This is the section that deals with the user side library builds
#
define usr_src_buildrule
$(call common_builddef,$1,$2,$3)
ifneq ($$(__DEFINED_USR_SRC_RULE_$$(__CAT__)),TRUE)
__DEFINED_USR_SRC_RULE_$$(__CAT__) = TRUE
.PHONY : _target_usr_src_$$(__CAT__)
_build : _target_usr_src_$$(__CAT__)
_target_usr_src_$$(__CAT__):
ifdef _WRS_CONFIG_FEATURE_USR
ifdef _WRS_CONFIG_COMPONENT_USR_SRC
+cd $(SRCDIR) && $(MAKE) vsbconfig VSB_DIR=$(VSB_DIR) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_TOOL)
+cd $2 && $(MAKE) CPU=$$(_HW_$1_USR_MODEL) TOOL=$$(_WRS_CONFIG_$1_TOOL) SPACE=user _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) $4
endif
endif
else
$$(warning warning skipping duplicate rules for $$(__CAT__))
endif
endef
#
# This is the section that deals with the user side library builds of the MSP component directories
# Note that this section is based on the call to $(WIND_BASE) and will only function if the build is a MSP build
#
define external_comp_usr_buildrule
$(call common_builddef,$1,$2,$3)
ifneq ($$(__DEFINED_EUSR_RULE_$$(__CAT__)),TRUE)
__DEFINED_EUSR_RULE_$$(__CAT__) = TRUE
.PHONY : _target_eusr_$$(__CAT__)
_build : _target_eusr_$$(__CAT__)
_target_eusr_$$(__CAT__):
ifdef _WRS_CONFIG_FEATURE_USR
ifdef _WRS_CONFIG_MSP_KERNEL
$(MAKE) -C $2 CPU=$$(_HW_$1_USR_MODEL) TOOL=$$(_WRS_CONFIG_$1_APP_TOOL) comp-usr _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) $4
endif
endif
else
$$(warning warning skipping duplicate rules for $$(__CAT__))
endif
endef
#
# This is the section that deals with the user side builds of applications,
# this must be done after the user side libraries have been build or link failures will ocurr.
#
define usr_apps_buildrule
$(call common_builddef,$1,$2,$3)
ifneq ($$(__DEFINED_USR_APPS_RULE_$$(__CAT__)),TRUE)
__DEFINED_USR_APPS_RULE_$$(__CAT__) = TRUE
.PHONY : _target_usr_apps_$$(__CAT__)
_build : _target_usr_apps_$$(__CAT__)
_target_usr_apps_$$(__CAT__):
ifdef _WRS_CONFIG_FEATURE_USR
ifdef _WRS_CONFIG_COMPONENT_USR_APPS
+cd $(SRCDIR) && $(MAKE) vsbconfig VSB_DIR=$(VSB_DIR) $$(_CONFIG_CPUSPEC_$1_$3_) TOOL=$$(_WRS_CONFIG_$1_TOOL)
+cd $2 && $(MAKE) CPU=$$(_HW_$1_USR_MODEL) TOOL=$$(_WRS_CONFIG_$1_TOOL) SPACE=user _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) $4
ifdef _WRS_CONFIG_$1_TOOL2
ifdef _WRS_CONFIG_ENABLE_TOOL2
ifdef _WRS_CONFIG_DEFAULT_VSB
$(foreach stool, $(_WRS_CONFIG_SECTOOLS),$(newline)$(tab)+cd $2 && $(MAKE) CPU=$$(_HW_$1_USR_MODEL) TOOL=$(stool) SPACE=user _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS2) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) $4)
endif
ifndef _WRS_CONFIG_DEFAULT_VSB
+cd $2 && $(MAKE) CPU=$$(_HW_$1_USR_MODEL) TOOL=$$(_WRS_CONFIG_$1_TOOL2) SPACE=user _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGS2) VSB_DIR=$(VSB_DIR) $$(CONFIG_CLI_OPTIONS) $$(temp_include_current) $4
endif
endif
endif
endif
endif
else
$$(warning warning skipping duplicate rules for $$(__CAT__))
endif
endef
#
# This is the main build section, due to the differences in building based on
# BSPs and CPUs this section is devided into 2 sections only one will be executed
#
# process BSPs
$(eval \
$(foreach hwconfig,$(_HW_CONFIGURATION_BSPS),\
$(foreach srcdir,$(_CONFIG_SRC_DIRS), $(call bsp_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir))))\
$(foreach srcdir,$(_VSB_WINDCOMPONENTS), $(call external_comp_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir)),BSPNAME=$(hwconfig)))\
$(foreach srcdir,$(_CONFIG_USR_SRC_DIRS), $(call usr_src_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir)),))\
$(call external_comp_usr_buildrule,$(hwconfig),$(WIND_BASE),foo$(subst :,_,$(WIND_BASE)),)\
$(foreach srcdir,$(_CONFIG_USR_APPS_DIRS), $(call usr_apps_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir)),))\
)\
)
# process CPUs
$(eval \
$(foreach hwconfig,$(_HW_CONFIGURATION_CPUS),\
$(foreach srcdir,$(_CONFIG_SRC_DIRS), $(call cpu_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir))))\
$(foreach srcdir,$(_VSB_WINDCOMPONENTS), $(call external_comp_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir)),))\
$(foreach srcdir,$(_CONFIG_USR_SRC_DIRS), $(call usr_src_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir)),))\
$(call external_comp_usr_buildrule,$(hwconfig),$(WIND_BASE),foo$(subst :,_,$(WIND_BASE)),)\
$(foreach srcdir,$(_CONFIG_USR_APPS_DIRS), $(call usr_apps_buildrule,$(hwconfig),$(srcdir),foo$(subst :,_,$(srcdir)),))\
)\
)
all :
@echo done all
# this will ensure that all the directories listed in vsb_comp_list.mk are still valid
__EXISTING_WINDCOMPONENTS = $(wildcard $(_VSB_WINDCOMPONENTS))
ifneq ($(strip $(filter-out $(__EXISTING_WINDCOMPONENTS),$(_VSB_WINDCOMPONENTS))),)
__MISSING_WINDCOMPONENTS = $(strip $(filter-out $(__EXISTING_WINDCOMPONENTS),$(_VSB_WINDCOMPONENTS)))
endif
ifdef __MISSING_WINDCOMPONENTS
$(warning "Your installation has changed.")
$(warning "This VSB references missing components$(__MISSING_WINDCOMPONENTS) . ")
$(warning "This VSB must be reconfigured before it can be built")
$(error exiting build)
endif
_build : ;
#
# These are the sections that build up tcl encoded information about the VSB build
#
_TCL_CONF_VARS = FP ENDIAN TOOL TOOL2
define tclout
@echo "set "_VSB_CONFIG_$2 $(if $(_WRS_CONFIG_$1_$2),$(_WRS_CONFIG_$1_$2),"{}") >> $3
endef
_TCL_CONF_VARS1 = SUPPORTED_TOOLS
define tclout1
@echo "set "_VSB_CONFIG_$2 "{"$(if $(_WRS_CONFIG_diab_SUPPORTED),"diab","") $(if $(_WRS_CONFIG_gnu_SUPPORTED),"gnu","") $(if $(_WRS_CONFIG_icc_SUPPORTED),"icc","")"}" >> $3
endef
_TCL_CONF_VARS2 = SMP LP64 WRHV_GUEST BUILD_BASIC_IPNET DEFAULT_VSB DEFAULT_PRECOMP BOARD BOARD_CPU DEBUG_FLAG DEBUG_FLAG_ALLOW_OPTIMIZATION
define tclout2
@echo "set "_VSB_CONFIG_$1 $(if $(_WRS_CONFIG_$1),$1,"{}") >> $2
endef
_TCL_CONF_VARS3 = CPU
define tclout3
@echo "set "_VSB_CONFIG_$1 $(if $(_HW_CONFIGURATION_CPUS),$(_HW_CONFIGURATION_CPUS),"{}") >> $2
endef
_TCL_CONF_VARS4 = BSP
define tclout4
@echo "set "_VSB_CONFIG_$1 $(if $(_HW_CONFIGURATION_BSPS),$(_HW_CONFIGURATION_BSPS),"{}") >> $2
endef
_TCL_CONF_VARS5 = INET6 INET6_ONLY INET4_ONLY
ifdef _WRS_CONFIG_COMPONENT_IPNET
define tclout5
@echo "set "_VSB_CONFIG_$1 $(if $(_WRS_CONFIG_FEATURE_IPNET_$1),$1,"{}") >> $2
endef
endif
ifdef _WRS_CONFIG_COMPONENT_IPLITE
define tclout5
@echo "set "_VSB_CONFIG_$1 $(if $(_WRS_CONFIG_FEATURE_IPLITE_$1),$1,"{}") >> $2
endef
endif
ifndef _WRS_CONFIG_COMPONENT_IPNET
ifndef _WRS_CONFIG_COMPONENT_IPLITE
define tclout5
@echo "set "_VSB_CONFIG_$1 $(if $(_WRS_CONFIG_FEATURE_IPNET_$1),$1,"{}") >> $2
endef
endif
endif
vsbdefs.tcl : h/config/auto.conf vsb_defs.mk
@echo "# this file is automatically generated" > $@
$(foreach conf,$(_HW_CONFIGURATION_CPUS) $(_HW_CONFIGURATION_BSPS),$(foreach var,$(_TCL_CONF_VARS),$(call tclout,$(conf),$(var),$@)))
$(foreach conf,$(_HW_CONFIGURATION_CPUS) $(_HW_CONFIGURATION_BSPS),$(foreach var,$(_TCL_CONF_VARS1),$(call tclout1,$(conf),$(var),$@)))
$(foreach var,$(_TCL_CONF_VARS2),$(call tclout2,$(var),$@))
$(foreach var,$(_TCL_CONF_VARS3),$(call tclout3,$(var),$@))
$(foreach var,$(_TCL_CONF_VARS4),$(call tclout4,$(var),$@))
$(foreach var,$(_TCL_CONF_VARS5),$(call tclout5,$(var),$@))
vsbconfig : h/config/vsbConfig.h vsbdefs.tcl
h/config/vsbConfig.h :
+cd $(SRCDIR) && $(MAKE) vsbconfig VSB_DIR=$(VSB_DIR)
# make clean command. This is simply a build with TARGET=rclean - now optimized to just remove the VSB contents
clean :
rm -rf usr test arm cf mips ppc pentium simpc simlinux simso vsbClean.mk vsbClean.tcl
# $(MAKE) TARGET=rclean
default:
@echo No Target to Build
+45
View File
@@ -0,0 +1,45 @@
# rules.vxApp - makefile target rules for vxWorks application projects
#
# modification history
# --------------------
# 01k,18sep03,fle SPR#89965 : added POST_BUILD_RULE in .pl rule
# 01j,07nov01,rbl add .pl partial link target for sub-projects
# 01i,31mar99,tdl added $(LD_PARTIAL_LAST_FLAGS)
# 01h,10mar99,ren Changing linkedObjs.o to <project name>.out
# 01g,23feb99,sn removed references to $(POST_MUNCH)
# 01f,17nov98,sn reworked munch for windows95
# 01e,11nov98,sn partially link using LD_PARTIAL
# 01d,11nov98,sn munch -> orderCtors
# 01c,08oct98,ms linkedObjs.o now depends on PRJ_FILE
# 01b,27aug98,ms added POST_BUILD_RULE, loadable_object renamed to
# linkedObjs.o. Removed MERGED_OBJS macro.
# 01a,11aug98,ms added modhist. changed merged_object to loadable_object,
# and added munching
objects: $(LDDEPS) $(PRJ_OBJS)
$(POST_BUILD_RULE)
$(ARCHIVE): $(LDDEPS) $(PRJ_OBJS) $(PRJ_OBJS_FILE)
$(AR) crus $@ $(PRJ_OBJS_FOR_AR)
$(POST_BUILD_RULE)
archive: $(ARCHIVE)
PROJECT_OUT = $(basename $(notdir $(PRJ_FILE))).out
$(PROJECT_OUT): $(LDDEPS) $(PRJ_OBJS) \
$(PRJ_DIR)/$(PRJ_FILE) $(PRJ_OBJS_FILE) $(PRJ_LIBS)
@ $(RM) $@ ctdt.c
$(LD_PARTIAL) $(PRJ_OBJS_FOR_LD_PARTIAL) $(PRJ_LIBS) -o partialImage.o
$(NM) partialImage.o $(PRJ_OBJS_FOR_NM) | $(MUNCH) > ctdt.c
$(COMPILE_TRADITIONAL) ctdt.c -o ctdt.o
$(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) partialImage.o ctdt.o -o $@
@ $(RM) ctdt.c ctdt.o partialImage.o
$(POST_BUILD_RULE)
PROJECT_PL = $(basename $(notdir $(PRJ_FILE))).pl
$(PROJECT_PL): $(LDDEPS) $(PRJ_OBJS) $(PRJ_DIR)/$(PRJ_FILE) $(PRJ_OBJS_FILE) \
$(PRJ_LIBS)
$(LD_PARTIAL) $(PRJ_OBJS_FOR_LD_PARTIAL) $(PRJ_LIBS) -o $@
$(POST_BUILD_RULE)
+501
View File
@@ -0,0 +1,501 @@
# rules.vxWorks - makefile target rules for vxWorks projects
#
# Copyright (c) 1998-2002, 2004-2013, Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
#
# modification history
# --------------------
# 03r,29apr13,elp only generate OSCB when munching kernel (CQ:WIND00295940).
# 03q,02feb12,mze add .CPP as a valid suffix
# 03p,26jan12,mze romResident incorrectly uses SYS_ENTRY should be ROM_ENTRY
# WIND00165455
# 03o,19jan11,pee WIND00250470
# 03n,17nov10,pee WIND00184424
# 03m,26oct10,pee WIND00237910
# 03l,21apr10,slk add passing additional parameters to mipsBootPrep for
# large memory model support
# 03k,08feb10,pee include defs.memory instead of rules.memory
# 03j,12aug09,mze remove $(OPTION_PASS_TO_LD) from LD_EXTRA_MODULES_LIST to
# solve problems with BSPs including extra modules
# 03i,17jul09,pee adding usrEntry.o missing from last mod
# 03h,25jun09,pee change final link step to use libs instead of partial image
# 03h,03jun09,pee adding marker processing.
# 03g,02mar09,pee WIND00154816
# 03f,18sep08,f_b Fix for WIND00135103 to include information about the build
# paths in VxWorks executable
# 03e,12jun08,pee fix for defect WIND000122948
# 03d,22oct07,pee WIND00105890
# 03c,28sep07,pee WIND00105890
# 03b,27sep07,pee backing off ...
# 03a,11sep07,pee adding support for intermediate ipcom file.
# 02z,24aug07,pes Add ROM_EXTRA macro for adding objects needed for all
# ROMable builds.
# 02y,13jul07,nic Fixed SPR#84342 - remove duplicate linkage to ROMFS_IMAGE
# in vxWorks_rom and vxWorks_romCompress
# 02x,22jun07,dcc added CC_SDA_FLAGS to symTbl build rules.
# 02x,11jun07,pee added support for mixed build mode (source only components)
# 02w,07jun07,pee reorganzied CC_SDA_FLAGS
# 02v,07may07,pee added generic options to compile version.o and usrEntry.o
# 02u,05may07,dcc added CC_SDA_FLAGS.
# 02t,3jan07,zhr WIND00087260 resolved the issue of a install-path with "-L"
# 02s,28aug06,pee added include to allow WB to pass large macros.WIND00058261
# expanded EXTRA_MODULES to a file to allow large # of files
# 02r,06Feb06,pee added sypport for linker symbol definitions.
# 02q,16jan06,pee moved COMPONENT_LIBS usage to defs.link
# 02p,060ct05,zhr Fixed SPR#113315
# 02o,30sep05,zhr Fixed SPR#112192
# 02n,28sep05,pee Modified source build rules 112947 & 112722
# 02m,16aug05,pee Added make depend rule
# 02l,08Aug05,pee Added explicit dependency on generated file.
# 02l,18jul05,pee Added intrinsics library to source build prototype rule
# 02k,08jul05,pee Added prototype support for building from source
# Added option to generate map file
# 02j,20Jun05,pee Dependency generation and inclusion.
# 02i,22apr05,edc Added dependency on added COMP_LIBS.
# 02h,07apr05,edc Library paths for components
# 02g,07jul04,c_c Added romfs_image to the builds.
# 02g,06jul04,fle Added kernel VMA adjust
# 02f,04mar04,fle Do not assume ROM_FLAGS_EXTRA are only defined for rom
# rules
# 02e,28mar02,cym don't perform POST_BUILD_RULE twice in rom targets
# 02d,31jan02,fmk remove redirection operator to generate symTbl.c
# 02c,11dec01,rbl get e.g. vxWorks_romCompress.hex image working
# 02b,07dec01,tpw Remove HEX_HIGH_FLAGS and HEX_LOW_FLAGS, and fix proj %.hex
# 02a,12nov01,dat added prj_default, fixes for gnu and diab projects
# 01z,08nov01,tpw Add LD_SCRIPT_RAM, LD_SCRIPT_ROM macros as appropriate.
# 01y,06nov01,dat Fix to romCompress rule, added escaped newline
# 01x,30oct01,tam removed CC_LIB from cyclic linking
# 01w,09oct01,j_s present LD_LINK_LIBS through LIBS, add cyclic link options
# add support for build dependency on archives: vpath and
# expansion of '-l<ar>' to 'lib<ar>.a'
# 01v,25oct01,dat Relocating tool specific macros
# 01u,22oct01,cym replacing BOOT_OBJS with romInit.o and romStart.o for
# romResident builds.
# 01t,06aug01,mem Added LD_LINK_LIBS and LD_LINK_PATH
# 01s,06apr00,dra Added HEX_LOW_FLAGS and HEX_HIGH_FLAGS to support FRV
# (Venus) toolchain.
# 01r,31mar00,rsh final merge es.tor2_0.mcore to tor2_0_0.es.coretools
# 01q,02mar00,rsh add .hex$(MAP_EXT) suffix to BINHEX_OUTPUT_FILE rules.
# 01p,01mar00,rsh adding rule to clean .hex related temp files for each rom
# based image and remove POST_BUILD_RULE definition.
# 01o,29feb00,rsh adding definition of POST_BUILD_RULE to rm temporary
# out.tmp1 and out.tmp2 files.
# 01n,06jan00,dra updated for new .hex file generation.
# 01m,04mar99,sn added machinery to handle large projects
# 01l,23feb99,sn removed references to $(POST_MUNCH)
# 01k,17nov98,sn reworked munch for windows95
# 01j,11nov98,sn partially link using LD_PARTIAL
# 01i,11nov98,sn munch -> orderCtors
# 01h,30oct98,yh added deadweight removal hook.
# 01g,26oct98,ms added EXTRA_MODULES. romInit.o etc now part of BOOT_OBJS.
# 01g,21apr99,bc Alter BINXSYM command line for objcopy interface.
# 01f,26aug98,ms added POST_BUILD_RULE. Link against COMPONENT_LIBS.
# 01e,07jul98,ms added MAKE_SYM_CVT macro, added LDOUT_CONV to vxWorks.
# 01d,29jun98,ms renamed vxWorks_downLoadable to just vxWorks.
# 01c,25jun98,ms build rom* files is subdirectories. LDDEPS now comes first.
# 01b,20may98,ms fixed call to EXTRACT_BIN for windows host
# 01a,18feb98,ms created
# rules/defs include tree for a linux host, PPC604 vxWorks project for diab
#
# +-> defs.project
# | +-> defs.link
# | | +-> defs.option
# | +-> defs.x86-linux2
# | | +-> defs.unix
# | +-> defs.vxWorks
# | +-> make.PPC604diab
# | +-> defs.ppc
# | +-> defs.diab
# | +-> defs.common
# +-> rules.project
# +-> rules.vxWorks
# +-> rules.memory
# +-> defs.memory
include $(TGT_DIR)/h/make/defs.memory
################################################################################
#
# Search for dependency archives in LD_LINK_PATH
#
vpath %.a $(patsubst -L%,%,$(LD_LINK_PATH))
################################################################################
#
# generate link map if MAP=TRUE
#
ifeq ($(MAP), TRUE)
MAPCMD = $(OPTION_CC_GENMAP)
endif
################################################################################
#
# rules for building a relocatable (i.e., partially linked) image
#
# The choice of relocatable image is controlled by the macro partialImage.o,
# which defaults to the main rule partialImage.o.
.SECONDARY : version.o
.PHONY : version.o
version.o: $(VERSION_C) $(CFG_GEN_FILES)
$(CC) $(CFLAGS) $(CFLAGS_OPTIONS_ALL) $(OPTION_OBJECT_ONLY) $(CC_SDA_FLAGS) $(VERSION_C)
usrEntry.o: $(USR_ENTRY_C)
$(CC) $(CFLAGS) $(CFLAGS_OPTIONS_ALL) $(OPTION_OBJECT_ONLY) $(USR_ENTRY_C)
# WB private include file to pass macros too large for command line
ifneq ($(WRWB_VIP_MAKE_INCLUDE),)
include $(WRWB_VIP_MAKE_INCLUDE)
endif
define _catsub
@echo $1 >> $2
endef
ifneq ($(EXTRA_MODULES),)
EXTRA_MODULES_LIST_FILENAME = prjExtraModules.lst
EXTRA_MODULES_LIST = $(PRJ_FULL_PATH)/$(EXTRA_MODULES_LIST_FILENAME)
LD_EXTRA_MODULES_LIST = $(OPTION_INDIRECT_FILE)$(PRJ_FULL_PATH)/$(EXTRA_MODULES_LIST_FILENAME)
RM_EXTRA_MODULES_LIST = $(RM) $(EXTRA_MODULES_LIST)
CREATE_EXTRA_MODULES_LIST = $(foreach filename, $(EXTRA_MODULES),$(call _catsub, $(filename), $(EXTRA_MODULES_LIST)))
endif
# add component specific symbol definitions
LDFLAGS += $(LINKER_SYMDEFS) $(_COMPONENT_LDFLAGS)
COMP_OBJ_LIST = $(OPTION_PASS_TO_LD)$(OPTION_INDIRECT_FILE)$(PRJ_FULL_PATH)/compObjs.lst
COMP_OBJ_LIST_FOR_LD = $(OPTION_INDIRECT_FILE)$(PRJ_FULL_PATH)/compObjs.lst
partialImage.o: $(LDDEPS) $(PRJ_OBJS) $(EXTRA_MODULES) \
$(patsubst -l%,lib%.a,$(COMP_LIBS)) \
$(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB) $(PRJ_OBJS_FILE) version.o usrEntry.o \
$(PRJ_FULL_PATH)/compObjs.lst | src_build
$(RM_EXTRA_MODULES_LIST)
$(CREATE_EXTRA_MODULES_LIST)
- @ $(RM) $@
ifneq ($(findstring vxWorks_rom, $(DEFAULT_RULE)),)
$(LD_PARTIAL) usrEntry.o $(PRJ_OBJS_FOR_LD_PARTIAL) $(COMP_OBJ_LIST) \
$(LD_EXTRA_MODULES_LIST) version.o \
$(LD_PARTIAL_START_GROUP) \
$(LD_LINK_PATH) $(COMP_LIBS) $(LIBS) \
$(LD_PARTIAL_END_GROUP) $(CC_LIB) -o $@ $(MAPCMD)
else
$(LD_PARTIAL) $(PRJ_OBJS_FOR_LD_PARTIAL) $(COMP_OBJ_LIST) $(LD_EXTRA_MODULES_LIST) \
version.o $(LD_PARTIAL_START_GROUP) \
$(LD_LINK_PATH) $(COMP_LIBS) $(LIBS) $(LD_PARTIAL_END_GROUP) $(CC_LIB) -o $@ $(MAPCMD)
endif
ifeq ($(REMOVE_DEADWEIGHT),TRUE)
$(TRIM_TOOL) $@ $@_trim
$(MV) $@_trim $@
endif
# FIXME should be moved to a common place. Depends on VXBUILD being set in the VIP
DKM_DIR_LIST = $(VSB_DIR)/$(VX_CPU_FAMILY)$(ARCH_CLI_OPTION_SUFFIX)/$(CPU)$(CPU_CLI_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_CLI_OPTION_SUFFIX)/dkm
DKM_DIR_LIST += $(WIND_BASE)/target/lib$(MAJOR_CLI_OPTION_SUFFIX)/$(VX_CPU_FAMILY)$(ARCH_CLI_OPTION_SUFFIX)/$(CPU)$(CPU_CLI_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_CLI_OPTION_SUFFIX)/dkm
DKM_DIR_LIST += $(VSB_DIR)/$(VX_CPU_FAMILY)$(ARCH_CLI_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_CLI_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_CLI_OPTION_SUFFIX)/dkm
DKM_DIR_LIST += $(WIND_BASE)/target/lib$(MAJOR_CLI_OPTION_SUFFIX)/$(VX_CPU_FAMILY)$(ARCH_CLI_OPTION_SUFFIX)/$(CPU_CLASS)$(CPU_CLI_OPTION_SUFFIX)/$(TOOL_COMMON_DIR)$(MINOR_CLI_OPTION_SUFFIX)/dkm
ANALYSIS_DKM_DIR_LIST = $(wildcard $(addsuffix /analysis,$(DKM_DIR_LIST)))
ifneq ($(ANALYSIS_DKM_DIR_LIST),)
ANALYSIS_DKM_DIR = $(firstword $(ANALYSIS_DKM_DIR_LIST))
endif
genBuildVars3=$(if $($(1)),$(shell echo "set $(1) $($(1))" >>build_vars_list))
genBuildVars2=$(foreach var,$(1),$(call genBuildVars3,$(var)))
genBuildVars=$(call genBuildVars2,WIND_BASE VSB_DIR BSP_DIR ANALYSIS_DKM_DIR PRJ_FULL_PATH)
cleanBuildVars=$(shell rm -f build_vars_list)
################################################################################
#
# rules for building modules to be linked with the relocatable VxWorks
#
# The choice of optional modules to link with the partialImage.o above
# is controlled by the macro POSTLINK_MODULES.
# Any .o's added here must not call any vxWorks libraries, as they are
# added *after* linking against the VxWorks libraries has been done.
# By default, POSTLINK_MODULES is computed by looking at config.h,
# If INCLUDE_CPLUS is defined, then ctdt.o is built.
# If INCLUDE_STANDALONE_SYM_TBL is defined, then symTbl.o is built.
# ctdt.o - support module for INCLUDE_CPLUS
ctdt.o: ctdt.c
- @ $(RM) $@
$(COMPILE_TRADITIONAL) $(CC_SDA_FLAGS) ctdt.c -o $@
ctdt.c: partialImage.o $(PRJ_OBJS_FILE_FOR_NM)
- @ $(RM) $@
$(call cleanBuildVars)
$(call genBuildVars)
$(NM) partialImage.o $(PRJ_OBJS_FOR_NM) | $(MUNCH) -vars build_vars_list -tags $(VSB_TAG_FILE_KERNEL) -oscb_gen > $@
# symTbl.o - support module for INCLUDE_STANDALONE_SYM_TBL
symTbl.o: symTbl.c
- @ $(RM) $@
$(COMPILE_SYMTBL) $(CC_SDA_FLAGS) symTbl.c -o $@
symTbl.c: partialImage.o
- @ $(RM) $@
$(CP) partialImage.o tmp.o
$(LDOUT_SYMS) tmp.o
$(MKSYMTBL) tmp.o $@
- @ $(RM) tmp.o
###############################################################################
#
# rules for building rom startup code - slightly different for each image
#
ROM_FLAGS_EXTRA = $(CC_ROM_FLAGS)
ifeq ($(basename $(DEFAULT_RULE)),vxWorks_romCompress)
ROM_FLAGS_EXTRA = $(CC_ROM_CMP_FLAGS)
endif
ifeq ($(basename $(DEFAULT_RULE)),vxWorks_romResident)
ROM_FLAGS_EXTRA = $(CC_ROM_RES_FLAGS)
endif
ifeq ($(basename $(DEFAULT_RULE)),vxWorks_rom)
ROM_FLAGS_EXTRA = $(CC_ROM_CPY_FLAGS)
endif
###############################################################################
#
# dependency generation
#
CFLAGS += $(OPTION_DEPEND_GEN_D)
CFLAGS_AS += $(OPTION_DEPEND_GEN_D)
################################################################################
#
# rules for building VxWorks images
#
# vxWorks RAM based VxWorks image, linked to RAM_LOW_ADRS
vxWorks: partialImage.o $(ROMFS_IMAGE) $(POSTLINK_MODULES) version.o
- @ $(RM) $@
$(CC) $(CFLAGS) $(OPTION_OBJECT_ONLY) $(DATA_SEG_PAD_C)
$(LD) $(LDFLAGS) $(LD_ENTRY_OPT) $(SYS_ENTRY) $(LD_RAM_FLAGS) \
dataSegPad.o $(ROMFS_IMAGE) $(PRJ_OBJS_FOR_LD) $(COMP_OBJ_LIST_FOR_LD) $(LD_EXTRA_MODULES_LIST) \
version.o usrEntry.o $(LD_START_GROUP) \
$(LD_LINK_PATH) $(COMP_LIBS) $(LIBS) $(LD_END_GROUP) $(CC_LIB) $(POSTLINK_MODULES)\
$(LD_DATA_SEG_ALIGN) $(LD_SCRIPT_RAM) -o $@
$(LDOUT_CONV) $@
$(VXSIZEPROG) -v $(RAM_HIGH_ADRS) $(RAM_LOW_ADRS) $@
ifneq ($(ADJUST_VMA), $(DEFAULT_ADJUST_VMA))
ifeq ($(LMM_ENABLED), 1)
$(KERNEL_VMA_ADJUST) $@ $(LOCAL_MEM_LOCAL_ADRS) $(LOCAL_MEM_PHYS_ADRS)
else
$(KERNEL_VMA_ADJUST) $@
endif
endif
$(MAKE_SYM)
$(MAKE_SYM_CVT)
ifeq (vxWorks, $(DEFAULT_RULE))
$(POST_BUILD_RULE)
endif
# vxWorks_romResident ROM resident image
vxWorks_romResident: partialImage.o $(ROMFS_IMAGE) $(POSTLINK_MODULES) \
romInit.o romStart.o $(IMI) $(ROM_EXTRA)
- @ $(RM) $@
$(CC) $(CFLAGS) $(OPTION_OBJECT_ONLY) $(DATA_SEG_PAD_C)
$(LD) $(LDFLAGS) $(RES_LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) \
$(LD_ROM_RES_FLAGS) dataSegPad.o romInit.o romStart.o \
$(ROM_EXTRA) partialImage.o $(ROMFS_IMAGE) $(POSTLINK_MODULES) \
$(LD_SCRIPT_ROM) -o $@
$(LDOUT_CONV) $@
$(ROMSIZEPROG) -b $(ROM_SIZE) $@
$(MAKE_SYM)
$(MAKE_SYM_CVT)
$(POST_BUILD_RULE)
# vxWorks_rom RAM based image that starts in ROM.
# The relocation stub is linked to ROM_TEXT_ADRS and RAM_HIGH_ADRS.
# The main image is linked to RAM_LOW_ADRS.
# The relocation is done as a straight copy.
vxWorks_rom: vxWorks $(BOOT_OBJS) \
$(patsubst -l%,lib%.a,$(COMP_LIBS)) \
$(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB) $(IMI) version.o
- @ $(RM) $@ $<.o tmp.Z $<.Z.s $<.Z.o
$(CP) $< $<.o
$(LDOUT_HOST) $<.o
ifneq ($(LMM_ENABLED), 1)
$(EXTRACT_BIN) $<.o tmp.Z
$(BINTOASM) tmp.Z > $<.Z.s
$(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_AS) $<.Z.s -o $<.Z.o
$(LD) $(LDFLAGS) $(RES_LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) \
$(LD_ROM_CPY_FLAGS) $(BOOT_OBJS) version.o \
$(CC_LIB) $(LD_START_GROUP) $(LD_LINK_PATH) \
$(COMP_LIBS) $(LIBS) $(LD_END_GROUP) $<.Z.o $(CC_LIB) \
$(LD_SCRIPT_ROM) -o $@
- @ $(RM) $<.o tmp.Z $<.Z.s $<.Z.o
else
# vxWorks.o minus sections moving to tmp2
$(EXTRACT_BIN) $(SECTION_REMOVE_NAMES) $<.o tmp1.Z
$(BINTOASM) tmp1.Z > $<.Z.s
$(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_AS) $<.Z.s -o $<.Z.o
# selected sections from vxWorks.o not in tmp.bin
$(EXTRACT_BIN) $(SECTION_SELECT_NAMES) $<.o tmp2.Z
@echo "XXX vxWorks_rom check 3"
$(BINTOASM) tmp2.Z > $<.tmp2.Z.s
$(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_AS) $<.tmp2.Z.s -o $<.tmp2.Z.o
$(OBJCPY) $(BINARY_RENAME_SYMBOLS) $<.tmp2.Z.o
$(LD) $(LDFLAGS) $(RES_LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) \
$(LD_ROM_CPY_FLAGS) $(BOOT_OBJS) version.o \
$(CC_LIB) $(LD_START_GROUP) $(LD_LINK_PATH) \
$(COMP_LIBS) $(LIBS) $(LD_END_GROUP) $<.Z.o $<.tmp2.Z.o \
$(CC_LIB) \
$(LD_SCRIPT_ROM) -o $@
- @ $(RM) $<.o tmp1.Z $<.Z.s $<.Z.o tmp2.Z $<.tmp2.Z.s $<.tmp2.Z.o
endif
$(ROMSIZEPROG) -b $(ROM_SIZE) $@
$(LDOUT_CONV) $@
$(POST_BUILD_RULE)
# vxWorks_romCompress RAM based image that starts in ROM.
# The relocation is done as a decompression.
vxWorks_romCompress: vxWorks $(BOOT_OBJS) \
$(patsubst -l%,lib%.a,$(COMP_LIBS)) \
$(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB) $(IMI) version.o
- @ $(RM) $@ $<.o tmp.Z $<.Z.s $<.Z.o
$(CP) $< $<.o
$(LDOUT_HOST) $<.o
ifneq ($(LMM_ENABLED), 1)
$(EXTRACT_BIN) $<.o tmp.bin
$(COMPRESS) < tmp.bin > tmp.Z
$(BINTOASM) tmp.Z > $<.Z.s
$(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_AS) $<.Z.s -o $<.Z.o
$(LD) $(LDFLAGS) $(RES_LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) \
$(LD_ROM_CMP_FLAGS) $(BOOT_OBJS) version.o \
$(LD_START_GROUP) $(LD_LINK_PATH) \
$(COMP_LIBS) $(LIBS) $(LD_END_GROUP) $(CC_LIB) $<.Z.o \
$(LD_SCRIPT_ROM) -o $@
$(LDOUT_CONV) $@
- @ $(RM) $<.o tmp.bin tmp.Z $<.Z.s $<.Z.o
else
# vxWorks.o minus sections moving to tmp2
$(EXTRACT_BIN) $(SECTION_REMOVE_NAMES) $<.o tmp.bin
$(COMPRESS) < tmp.bin > tmp.Z
$(BINTOASM) tmp.Z > $<.Z.s
$(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_AS) $<.Z.s -o $<.Z.o
# selected sections from vxWorks.o not in tmp.bin
$(EXTRACT_BIN) $(SECTION_SELECT_NAMES) $<.o tmp2.bin
$(COMPRESS) < tmp2.bin > tmp2.Z
$(BINTOASM) tmp2.Z > $<.tmp2.Z.s
$(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_AS) $<.tmp2.Z.s -o $<.tmp2.Z.o
$(OBJCPY) $(BINARY_RENAME_SYMBOLS) $<.tmp2.Z.o
$(LD) $(LDFLAGS) $(RES_LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) \
$(LD_ROM_CPY_FLAGS) $(BOOT_OBJS) version.o \
$(LD_START_GROUP) $(LD_LINK_PATH) $(CC_LIB) \
$(COMP_LIBS) $(LIBS) $(LD_END_GROUP) $<.Z.o $<.tmp2.Z.o \
$(LD_SCRIPT_ROM) -o $@
$(LDOUT_CONV) $@
- @ $(RM) $<.o tmp.bin tmp.Z $<.Z.s $<.Z.o tmp2.bin tmp2.Z $<.tmp2.Z.s $<.tmp2.Z.o
endif
$(ROMSIZEPROG) -b $(ROM_SIZE) $@
$(POST_BUILD_RULE)
###############################################################################
#
# .sym - generate .sym file for INCLUDE_NET_SYM_TBL
#
%.sym: %
$(BINXSYM) $< $@
$(LDOUT_SYMS) $@
# do not attempt to regenerate .d dependency file.
%.d:
- @ :
# base rule chaining
clean : src_clean
# make dependencies
D_ALL_OBJS = version.o usrEntry.o $(PRJ_OBJS) $(EXTRA_OBJS)
version.force_d : $(VERSION_C)
$(CC) $(CFLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.c=.o)) $(OPTION_OBJECT_ONLY) $< >$(@:.force_d=.d)
usrEntry.force_d: $(USR_ENTRY_C)
$(CC) $(CFLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.c=.o)) $(OPTION_OBJECT_ONLY) $< >$(@:.force_d=.d)
%.force_d : %.c
$(CC) $(CFLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.c=.o)) $(OPTION_OBJECT_ONLY) $< >$(@:.force_d=.d)
%.force_d : %.s
$(CC) $(CFLAGS_AS) $(OPTION_DEPEND) $(CFLAGS_AS_$(<:.s=.o)) $(OPTION_OBJECT_ONLY) $< >$(@:.force_d=.d)
%.force_d : %.CPP
$(CXX) $(C++FLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.CPP=.o)) $(OPTION_OBJECT_ONLY) $< >$(@:.force_d=.d)
%.force_d : %.cpp
$(CXX) $(C++FLAGS) $(OPTION_DEPEND) $(CFLAGS_$(<:.cpp=.o)) $(OPTION_OBJECT_ONLY) $< >$(@:.force_d=.d)
ifeq ($(SRC_BUILD),TRUE)
depend: $(CFG_GEN_FILES) src_depend $(filter %.force_d, $(D_ALL_OBJS:.o=.force_d))
else
depend: $(CFG_GEN_FILES) $(filter %.force_d, $(D_ALL_OBJS:.o=.force_d))
endif
- @ :
###############################################################################
#
# Loading dependency files.
#
EXISTING_OBJS = $(foreach obj, $(D_ALL_OBJS), $(wildcard $(obj)))
DEP_FILES = $(filter %.d , $(EXISTING_OBJS:.o=.d))
EXISTING_DEP_FILES = $(foreach obj, $(DEP_FILES), $(wildcard $(obj)))
MISSING_DEP = $(filter-out $(EXISTING_DEP_FILES), $(DEP_FILES))
ifneq ($(strip $(MISSING_DEP)),)
$(warning warning: missing dependency files $(MISSING_DEP))
$(warning run make depend to regenerate)
endif
ifneq ($(strip $(EXISTING_DEP_FILES)),)
include $(EXISTING_DEP_FILES)
endif
TOOL_OPTIONS_FILES_DIR = .
$(PRJ_OBJS) : $(PRJ_DIR)/prjParams.h
# Include IPCOM make rules to support IPCOM build
-include $(WRVX_COMPBASE)/$(COMP_IPNET2)/osconfig/vxworks/make/rules.ipcom
vxWorks_romResident vxWorks $(ROMFS_IMAGE) ctdt.o : | $(TOOL_OPTIONS_FILES_ALL)
$(PRJ_OBJS) version.o usrEntry.o : | $(TOOL_OPTIONS_FILES_ALL)
+45
View File
@@ -0,0 +1,45 @@
# rules.vxbus - makefile target rules for VxBus support
#
# Copyright 2006, Wind River Systems, Inc.
#
# modification history
# --------------------
# 01f,11jul08,dlk Move EXTRA_INCLUDE additions to defs.bsp.
# 01e,04jul07,ami Rule vxbUsrCmdLine.c moved to
# /target/config/comps/src/hwif/Makefile
# 01d,28may07,vik defect WIND00093423 and creating vxbUsrCmdLine.c
# 01c,15may07,tor restore cmdLineBuild
# 01b,14may07,acm remove cmdLineBuild support
# 01a,30oct06,tor written
#
# DESCRIPTION
# This file contains rules used for command line build support
# for VxBus modules.
#
# Currently, the only command line build support required for
# VxBus is the file cmdLine.c, in the BSP directory. This file
# is generated automatically in the cmdLine.c rule below.
#
# The rule for dynamic creation of vxbus commandline componets
# is moved to <WIND_BASE>/target/config/comps/src/hwif/Makefile
# This is to ensure that we have no dependency of vxbUsrCmdLine.c
# in BSP builds
cmdLine.c: $(TGT_DIR)/config/comps/src/hwif/README $(WIND_BASE)/target/h/make/rules.vxbus
@echo rebuilding cmdLine.c ...
@$(RM) cmdLine.c
@echo '#ifndef INC_cmdLineH' >> cmdLine.c
@echo '#define INC_cmdLineH' >> cmdLine.c
@echo '' >> cmdLine.c
@echo '#ifndef PRJ_BUILD' >> cmdLine.c
@echo '' >> cmdLine.c
@echo '#include <vxWorks.h>' >> cmdLine.c
@echo '#include "config.h"' >> cmdLine.c
@echo '' >> cmdLine.c
@echo '#include <util/cmdLineBuild.c>' >> cmdLine.c
@echo '' >> cmdLine.c
@echo '#endif /* PRJ_BUILD */' >> cmdLine.c
@echo '' >> cmdLine.c
@echo '#endif /* INC_cmdLineH */' >> cmdLine.c
@echo done rebuilding cmdLine.c
@@ -0,0 +1,10 @@
# rules.x86-freebsd - host specific rules
#
# modification history
# --------------------
# 01a,12dec99,dra created
#
# DESCRIPTION
# This file contains rules that are host specific to x86-freebsd platform.
include $(TGT_DIR)/h/make/rules.unix
+147
View File
@@ -0,0 +1,147 @@
# rules.unix - host specific rules
#
# Copyright 1984-2007, Wind River Systems, Inc.
#
# modification history
# --------------------
# 01e,18nov11,jph replace the versioned mapping file name with
# mappingfile.txt
# 01d,28jul11,jam update mapping file for docs
# 01c,12may11,jam change mapping file version
# 01b,06jan11,jph check if mapping file exists
# 01a,08nov10,jph add mapping file
# 01b,05nov10,??? added one more link for toc.xml
# 01a,25oct10,jph remove version
# 01a,21oct10,??? change version
# 03l,21oct10,??? change version
# 03k,150ct10,sm remove version name from the reference and add it to parent directory
# 03j,01oct09,mmg adding version number for htmllink rule as well
# 03i,22sep09,mdk adding version number to BSP docs
# 03h,26sep08,mze remove IPCOM_OBJ_DIR
# 03g,18jun08,pee VSB and cleanup
# 03f,24mar08,pee removed redundant | depend on intermediate file.
# 03e,27feb08,pee don't include depend file if it does not exist.
# 03d,19oct07,pee docs dependencies, WIND00105890
# 03c,28sep07,pee WIND00105890
# 03b,27sep07,pee backing off ...
# 03a,11sep07,pee change location of temporary tool option file to current
# output directory.
# 02z,13jul07,nic SPR#56349 - Update dependency generation to
# include C++ files.
# 02y,19jun07,tpw Use WRVX_COMPBASE vs. WIND_COMPONENTS correctly.
# 02x,01jun07,tkf ipcom_ipdomain now generated in _IPCOM_OBJ_DIR.
# 02w,03mar07,tkf Add dependency on IPCOM include path file for
# depend.BSP_NAME targets.
# 02v,17may05,lll Replaced malfunctioning "\n"'s with echo ""
# 02u,25apr05,kkz Updating for new doc path
# 02t,10jan05,lll Standalone apigen, SPR#105634 and SPR#104090
# 02s,06oct04,tpw Switch BSP doc build forward to apigen.
# 02r,10aug04,dgp temporarily revert BSP doc build back to refgen
# 02q,07jul04,c_c Removed usage of romfs_image.h.
# 02p,27may04,dgp update BSP output and TOC directories
# 02o,25may04,tpw Switch on -missingok to reduce doc build error output.
# 02n,11feb04,c_c Added a NODEPENDOBJS list to filter files that should not
# be parsed when generating dependencies (SPR 93380).
# 02m,12jan04,bjl changed refgen to apigen.
# 02l,10dec03,c_c fixed builds for BSP templates.
# 02k,28nov03,c_c Reinstated variable replacement.
# 02j,26nov03,c_c Fixed Linux simulator build.
# 02i,07nov03,c_c Unified build rules with WIN32 hosts.
# 02h,02jul03,md Added command (mkromfs) for building ROMFS image
# 02g,12mar02,wsl change BSP_Reference to VxWorks_BSP_Reference
# 02f,27nov01,wsl allow target.ref files but keep target.nr backward
# compatibility
# 02e,29oct01,jab removed ld script rules
# 02d,25oct01,dat more gnu-diab changes
# 02c,18oct01,jab made dependency generation toolchain independent
# 02b,01oct01,dat consistent use of BSP_NAME macro
# 02a,27aug01,wsl add man pages
# 01z,24jul01,r_s diab specific rules added
# 01y,28jun00,jab force creation of LECFs.
# 01x,17feb00,jab added LECF generation rules. See notes at rules.
# 01w,02feb99,sjw use -M -MG in dependency generation so generated files
# can be included in BSP files.
# 01v,26oct98,ms made dependency generation overridable from make.CPUTOOL
# 01u,15oct98,fle doc : renamed book for BSP and put boards reference into
# board library
# 01t,05oct98,ms remove romInit.s dependeny generation for simulators
# 01s,23sep98,fle doc : adapted -preproc refgen new option
# 01r,23sep98,fle doc : changed bsp book name
# 01r,22sep98,fle doc : now use refgen instead of mangen
# 01q,02jan97,dat added DOC_FLAGS
# 01p,21nov96,p_m removed unwanted @ in bsp.1 rule
# 01o,21nov96,p_m changed bsp.1 mode prior to copy target.nr
# 01n,19nov96,dat mangen error output not dropped. target.txt made in
# bsp directory. SPRs 7507 and 7508.
# 01m,15oct96,yp made rule for include of dependency list silent SPR 4483
# 01l,03oct96,dbt added backslashes in the sed expressions (HPUX10 port).
# 01k,30jul96,pad undo change 01j, introduced here by mistake.
# 01j,26jul96,pad backslashed the $ in the sed expressions (AIX port).
# 01i,10may96,dat added -DINCLUDE_SCSI for man pages (SPR3941) added copyright
# 01h,18mar96,dat fixed cpp command for building man pages
# 01g,06mar96,dat added sed command to insert $TGT_DIR into depend output
# 01f,08feb96,dat used CONFIG_ALL in making dependency list
# 01e,04nov95,p_m took care of missing files in docs rule
# 01d,06jul95,jcf made sed script global.
# 01c,21jun95,yp added sed script to prevent hardwiring depend. list.
# 01b,10jun95,yp changed TARGET_DIR to BSP_NAME
# 01a,01jun95,yp created
#
# DESCRIPTION
# This file contains rules that are host specific to the unix platform.
## documentation build targets
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif
DOC_FILES := $(filter $(DOC_FILES),$(patsubst %.c,%,$(wildcard *.c)))
.PHONY: $(DOC_FILES) htmllink
man : target.html docs
docs: $(DOC_FILES) htmllink
$(DOC_FILES): $(TOOL_OPTIONS_FILES_ALL)
@echo ""; echo "Processing $@.c ... "
@-$(CPP) $(CASFLAGS) $(OPTION_PP_COMMENT) $(DOC_FLAGS) $@.c 1> $@.i
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-book VxWorks_APIs -chapter BSP_APIs \
-category $(BSP_NAME) -missingok \
-out $(DOC_DIR)/$(BSP_NAME) $@.i
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-book VxWorks_APIs -chapter BSP_APIs \
-category $(BSP_NAME) -missingok -config Auto2txt \
-out $(MAN_PAGE_DIR)/$(BSP_NAME) $@.i
@-$(RM) $@.i
htmllink:
@echo ""; echo "HTML linking ... "
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/htmlLink \
$(DOC_DIR)/$(BSP_NAME)
@echo "Linking complete."
@date
# The following variable assignment selects target.ref over target.nr, and
# exists only to facilitate the transition from nroff markup to refgen
# markup. When target.nr joins its dinosaur brethren, this should be removed.
TARGET_REF = target.ref
ifeq (,$(wildcard target.ref))
TARGET_REF = target.nr
endif
target.html:
@echo ""; echo "Processing $(TARGET_REF) ... "
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-config bsp2html -book VxWorks_APIs -chapter BSP_APIs -missingok \
-out $(DOC_DIR)/$(BSP_NAME) $(TARGET_REF)
-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen -mg -nostrict \
-config bsp2txt -book VxWorks_APIs -chapter BSP_APIs -missingok \
-out $(MAN_PAGE_DIR)/$(BSP_NAME) $(TARGET_REF)
+12
View File
@@ -0,0 +1,12 @@
# rules.x86-win32 - Host specific default definitions
#
# Copyright 1984-2003, Wind River Systems, Inc.
#
# modification history
# --------------------
# 02a,24sep03,c_c now use unix defaults
#
# DESCRIPTION
# This file contains rules that are host specific to x86-in32 platform.
include $(TGT_DIR)/h/make/rules.unix