164 lines
4.8 KiB
Plaintext
164 lines
4.8 KiB
Plaintext
# rules.ipcom - make rules for IPCOM
|
|
#
|
|
# Copyright (c) 2001-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
|
|
# --------------------
|
|
# 01p,27nov12,xhs Fix default vsb/vip error,WIND00387505
|
|
# 01o,07may09,dlk Handle USE_IPDEFINES in VIP or BSP build (WIND00165503).
|
|
# 01n,02sep08,mze stop creating the IPCOM_LIBCONFIG file
|
|
# 01m,01may08,dlk Support USE_IPDEFINES to obtain defines from ipcom.
|
|
# 01l,04mar08,pee temporary workaround to accomodate emake
|
|
# 01k,31oct07,pee WIND00109695
|
|
# 01j,19oct07,pee WIND00105890
|
|
# 01i,28sep07,pee WIND00105890
|
|
# 01h,17sep07,tkf Fix CQ:WIND00104875.
|
|
# 01g,19jun07,tpw Use WRVX_COMPBASE vs. WIND_COMPONENTS correctly.
|
|
# 01f,13jun07,tkf Convert backslash characters into forwardslash in
|
|
# WIND_COMPONENTS.
|
|
# 01e,24may07,tkf Move _IPCOM_OBJ_DIR to defs.ipcom. Generate ipcom_ipdomain
|
|
# in _IPCOM_OBJ_DIR instead of in the ipcom make dir. Also
|
|
# added user object dependency on ipcom_ipdomain.
|
|
# 01d,10may07,tkf If there are CPU variants, generate ipcom_libconfig only
|
|
# for the CPU class.
|
|
# 01c,25apr07,tkf Add dependency rule for statTbl.c. Also added rules for
|
|
# generating library build configuration cache file.
|
|
# 01b,03mar07,tkf Added rule to create IPNET include path file.
|
|
# 01a,09nov06,tkf created.
|
|
#
|
|
#
|
|
# DESCRIPTION
|
|
# This file is included in rules.bsp and rules.library for both the kernel and
|
|
# user builds to define make rules that pertain to IPCOM requirements.
|
|
#
|
|
|
|
WRVX_COMPBASE := $(subst \,/,$(WRVX_COMPBASE))
|
|
|
|
###
|
|
# Include IPCOM defines
|
|
#
|
|
ifneq ($(__DEFS_IPCOM_INCLUDED__),TRUE)
|
|
include $(WRVX_COMPBASE)/$(COMP_IPNET2)/osconfig/vxworks/make/defs.ipcom
|
|
endif
|
|
|
|
###
|
|
# The following definitions are to be used in the generation of the library build
|
|
# configuration cache file.
|
|
#
|
|
ifeq ($(findstring -DINET6_ONLY,$(ADDED_CFLAGS) $(EXTRA_DEFINE)),-DINET6_ONLY)
|
|
_INET6_BUILD_ONLY = 1
|
|
endif
|
|
|
|
ifeq ($(findstring -DINET6,$(ADDED_CFLAGS) $(EXTRA_DEFINE)),-DINET6)
|
|
_INET6_BUILD = 1
|
|
endif
|
|
|
|
ifeq ($(findstring -inet6only,$(OPT)),-inet6only)
|
|
IPCOM_LIB_CFG += -DINET6
|
|
else
|
|
IPCOM_LIB_CFG += -DINET
|
|
ifeq ($(findstring -inet6,$(OPT)),-inet6)
|
|
IPCOM_LIB_CFG += -DINET6
|
|
endif
|
|
endif
|
|
|
|
|
|
#
|
|
#
|
|
#####################################
|
|
|
|
###
|
|
# The following is used by Wind Manage SNMP build only, not affecting others.
|
|
#
|
|
des.tag: $(_IPCOM_IPDOMAIN_FILE_)
|
|
$(LIBDIR)/statTbl.c: $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
###
|
|
# Implicit rule for user build make depend files
|
|
|
|
depend.usr.$(BUILD_EXT) : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
###
|
|
# Implicit rules for object files
|
|
|
|
.s.sho : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.c.sho : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
$(OBJ_DIR)/%.sho : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
$(OBJ_DIR)/%.sho : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
$(OBJ_DIR)/%.sho : %.cpp $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.cpp.sho : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.cxx.sho : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.s.o : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.c.o : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
$(OBJ_DIR)/%.o : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
$(OBJ_DIR)/%.o : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
$(OBJ_DIR)/%.o : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.cpp.o : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.cxx.o : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
###
|
|
# The following is meant to add dependency os makeStatTbl on $(_IPCOM_IPDOMAIN_FILE)
|
|
#
|
|
$(LIBDIR)/statTbl.c: $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
.INTERMEDIATE : $(_IPCOM_IPDOMAIN_FILE_)
|
|
|
|
_IPCOM_IPDOMAIN_FILE_DIR = $(patsubst %/,%,$(dir $(_IPCOM_IPDOMAIN_FILE_)))
|
|
|
|
# $(_IPCOM_IPDOMAIN_FILE_): | $(_IPCOM_IPDOMAIN_FILE_DIR)
|
|
|
|
# When USE_IPDEFINES is non-empty, we need an absolute path for
|
|
# _IPCOM_IPDOMAIN_FILE_ in the IP_UTIL_REDIR redirection, since
|
|
# we change to a different directory to execute util_ipdef.
|
|
# However, when building a VIP, a relative path is sometimes passed.
|
|
# gnu make 3.80 lacks abspath and realpath. Here's a poor-man's
|
|
# substitute:
|
|
_PWD := $(subst \,/,$(shell pwd))
|
|
_ABS_IPCOM_IPDOMAIN_FILE_ := $(patsubst ./%,$(_PWD)/%,$(_IPCOM_IPDOMAIN_FILE_))
|
|
_ABS_IPCOM_IPDOMAIN_FILE_ := $(patsubst ../%,$(_PWD)/../%,$(_ABS_IPCOM_IPDOMAIN_FILE_))
|
|
|
|
# Do not generate IPDEFINES for user side
|
|
ifeq ($(SPACE),user)
|
|
USE_IPDEFINES := false
|
|
endif
|
|
ifeq ($(SPACE),USER)
|
|
USE_IPDEFINES := false
|
|
endif
|
|
|
|
# Create IPDEFINES file
|
|
ifeq ($(wildcard $(_IPCOM_IPDOMAIN_FILE_DIR)),$(_IPCOM_IPDOMAIN_FILE_DIR))
|
|
$(_IPCOM_IPDOMAIN_FILE_):
|
|
else
|
|
$(_IPCOM_IPDOMAIN_FILE_): $(_IPCOM_IPDOMAIN_FILE_DIR)
|
|
endif
|
|
@echo "$(INCLUDE_IPCOM_CC)" > $(_IPCOM_IPDOMAIN_FILE_)
|
|
ifneq ($(USE_IPDEFINES),false)
|
|
@$(MAKE) -C $(WRVX_COMPBASE)/$(COMP_IPNET2) CPU=$(CPU) TOOL=$(TOOL) OPT=$(OPT) VSB_DIR=$(VSB_DIR) IP_UTIL_REDIR=">> $(_ABS_IPCOM_IPDOMAIN_FILE_)" util_ipdef
|
|
endif
|
|
|
|
$(_IPCOM_IPDOMAIN_FILE_DIR) :
|
|
-$(MKDIR) $@
|
|
|
|
# To avoid duplicate defines
|
|
SAVE_EXTRA_DEFINE := $(EXTRA_DEFINE)
|
|
CUR_CFG_DEFS := $(filter-out $(IPCOM_LIB_CFG),$(SAVE_EXTRA_DEFINE))
|
|
EXTRA_DEFINE = $(CUR_CFG_DEFS) $(IPCOM_LIB_CFG)
|