# Makefile - makefile for target/src/ostool
#
# Copyright (c) 1996, 1998-1999, 2001, 2003-2005, 2009-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
# --------------------
# 02c,18jan12,rlp  CQ:WIND00328716: Moved defs.library make fragment at
#                  the beginning of the file.
# 02b,17dec10,pch  CQ:WIND00244631: build ostool/shell/shellFuncBind
#		   for small footprint
# 02a,13sep10,jpb  Added rtpDbgFuncBind.c
# 02d,05aug10,v_r  Added loginFuncBind.c to the build.
# 02c,15jul10,kab  Add bootElfFuncBind.c build
# 02b,01jul09,jmp  Added spyFuncBind.c & tipFuncBind.c build.
# 02a,22jun09,jmp  Added symFuncBind.c build.
# 01z,25jun09,ggz  Reinstated IPNET rules unitl loginLib.c is moved
#		   to IPNET tree. 
# 01y,01jun09,v_r  Reverted IPNET team mods until unified user DB HLD is
#		   properly reviewed.
# 01x,15apr09,ggz  Add paths to ipnet rules and defs
# 01w,24nov08,v_r  Now building tip library documentation (def
#		   CQ:WIND00144075).
# 01v,30jul08,v_r  Added tip library as part of the shell for field testing.
# 01u,25feb08,v_r  Added RTP debug command facility objects (req
#		   CQ:WIND00004496).
# 01t,20apr05,v_r  Fixed SPR #108202 (symShow() API documentation is missing).
# 01s,09sep04,bpn  Added taskWaitShow.o build.
# 01r,19mar04,jn   Move symLib.c and symShow.c here from target/src/os.
# 		   Move loader files to their own subdirectory.
# 01q,26feb04,pch  remove PPC32 hack, no longer needed
# 01p,18feb04,zl   added dbgTrcLib.c to build.
# 01o,04dec03,jn   Remove unsupported object format source files from build
# 01n,24oct03,jn   Add rtpLoadLib to build
# 01m,31jan03,pch  Add PPC32 support; move dbgLib & dbgTaskLib to src/hwdb
# 01l,04mar03,jmp  removed loadPecoffLib (SIMNT is now using Elf).
# 01k,05mar03,bpn  Removed dbgLib.o from the build.
# 01j,18feb03,bpn  Removed shell related components.
# 01i,08nov01,jn   remove coff files from build
# 01h,12oct01,tam  added repackaging support
# 01g,27jun01,agf  add LONGCALL flag
# 01f,14feb01,spm  merged from version 01e of tor2_0_x branch (base 01d):
#		   added remShellLib.o for telnet upgrade (SPR #28675)
# 01e,17mar99,p_m  Added how to rebuild shell.c and shell_slex_c as comments
# 01d,28apr98,cym  added module loadPecofflib.o
# 01c,08jan98,dbt  Removed dbgLibNew.o. Added dbgTaskLib.o
# 01b,01nov96,p_m  get rid of shell.c and shell_slex_c targets since they
#		   are now checked in.
# 01a,18jun96,yp   created from 01y of MakeSkel
#
# DESCRIPTION
# This file contains the makefile rules for building the ostool library
#

TGT_DIR=$(WIND_BASE)/target

LIB_BASE_NAME   = os

# Including defs.library to see if _WRS_CONFIG_xxx is defined.
# It must be after LIB_BASE_NAME
include $(TGT_DIR)/h/make/defs.library

DOC_FILES=	loginLib.c symLib.c spyLib.c timexLib.c symShow.c tipLib.c

CFLAGS_repeatHost.o	= $(LONGCALL)
CFLAGS_periodHost.o	= $(LONGCALL)
CFLAGS_spyLib.o		= $(LONGCALL)

# Except for shell/shellFuncBind, the ostools require malloc() etc.
# and should not be built if only memAllot() is available.

ifdef _WRS_CONFIG_MEM_ALLOT
OBJS=
EXCLUDE_SUBDIRS = loader tagcheck wrload
else
OBJS=	bootAoutLib.o		\
	bootElfFuncBind.o	\
	bootElfLib.o		\
	bootLoadLib.o		\
	dbgTrcLib.o		\
	loginFuncBind.o		\
	loginLib.o		\
	periodHost.o		\
	repeatHost.o		\
	rtpDbgCmdLib.o		\
        rtpDbgFuncBind.o	\
	symFuncBind.o		\
	symLib.o		\
	symShow.o		\
	spyFuncBind.o		\
	spyLib.o		\
	taskWaitShow.o		\
	timexLib.o		\
	tipFuncBind.o		\
	tipLib.o
endif

include $(WRVX_COMPBASE)/$(COMP_IPNET2)/osconfig/vxworks/make/defs.ipcom
include $(TGT_DIR)/h/make/rules.library
include $(WRVX_COMPBASE)/$(COMP_IPNET2)/osconfig/vxworks/make/rules.ipcom
# end of target/src/ostool/Makefile
