# Makefile - makefile for target/src/util
#

#
# Copyright (c) 1996-1997, 2001, 2003-2011, 2018
# 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
# --------------------
# 18jan18,dlk  Adding strendcpy.o (VXW6-86603)
# 04may11,jpb  Added memmem.o
# 04nov10,swg  Add procNumSetFuncBind.o
# 27oct10,kk   remove use of _WRS_CONFIG_SM_OBJ usage
# 17sep10,pcs  Rename avlUlongLib to avlUint64Lib.
# 27jul10,pcs  Add avlUlongLib.o
# 18feb10,pch  small footprint
# 22oct09,jpb  fixed merge
# 09feb09,zl   removed qPriHeapLib.o, qLib.o and qXxxCreateLib.o
# 05aug09,jpb  Defect# 161788.  Removed setLib.
# 25jun09,x_s  build of poolLib.c & poolShow.c based on
#              !_WRS_CONFIG_MEM_ALLOT
# 20feb09,s_s  Added avlLib.c and avlUintLib.c to doc build (defect
#              WIND00150718)
# 31jul08,kk   build of smUtilLib.c base on _WRS_CONFIG_SM_OBJ
# 07jul08,jpb  Changed SMP conditional.
# 04jul07,bwa  removed SMP compilation of smUtilLib
# 02jul07,rlp  Removed bufLib object.
# 07jun06,jln  added qPxSSPriBMalib.o
# 13sep05,jln  diable size-opt compilation for DIAB builds for
#              critical objects
# 08sep05,yvp  Added back strSearchLib.o to the build (SPR 112010).
# 26aug05,zl   added poolLib and poolShow to doc build.
# 15aug05,rhe  Removed kprintLib
# 08jul05,jln  added qPxPriBMapLib.o
# 05apr05,svk  Added strSearchLib.o
# 10mar05,yvp  Added xxxCreateLib.o
# 20dec04,yvp  Added kprintLib.o to OBJS
# 17sep04,pcm  removed qJobLib.o
# 15sep04,zl   removed doc build of avlUintLib
# 09sep04,job  Added bootParseLib.c, bootParseLib.o
# 26mar04,job  Added getopt
# 10mar04,rhe  Rebase correction
# 03mar04,zl   removed poolLib and avlLib from doc build.
# 18feb04,dat  Adding setLib to build (no docs)
# 17feb04,pch  remove PPC32 hack, no longer needed
# 26nov03,zl   added avlUintLib.o
# 18nov03,yvp  Added hookLib.o and hookShow.o.
# 24oct03,zl   added avlLib to doc build.
# 08aug03,zl   removed avlLib alias problem workaround. Added poolLib/Show.
# 24aug03,pcs  Add file bmpLib.o
# 26jun03,zl   added avlLib.o object.
# 31jan03,pch  Add PPC32 support
# 18feb03,bpn  Added symUtilLib from tor3_1 branch (in target/src/usr)
# 31oct01,mas  moved qFifoGLib, smDllLib to target/src/vxmp/util
# 12oct01,tam  added repackaging support
# 20oct97,nps  Added rBuffShow.o object.
# 28jul97,nps  Added in rBuffLib.o object.
# 17aug96,yp   derived from 01i of MakeSkel
#
# DESCRIPTION
# This file contains the makefile rules for building the os library
#
#

TGT_DIR=$(WIND_BASE)/target
LIB_BASE_NAME =	os

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

DOC_FILES     =	avlLib.c avlUintLib.c avlUint64Lib.c bLib.c bootLib.c \
                bootParseLib.c getopt.c hookLib.c hookShow.c \
		inflateLib.c lstLib.c memmem.c poolLib.c poolShow.c \
		rBuffLib.c rngLib.c strendcpy.c strSearchLib.c

OBJS 	      =	avlLib.o avlUintLib.o avlUint64Lib.o bLib.o bmpLib.o bootLib.o \
		cksumLib.o dllLib.o lstLib.o qFifoLib.o \
		qPriBMapLib.o qPriDeltaLib.o \
		qPriListLib.o memmem.o rngLib.o sllLib.o \
		uncompress.o inflateLib.o hookLib.o hookShow.o \
		getopt.o bootParseLib.o strSearchLib.o \
		qPxPriBMapLib.o qPxSSPriBMapLib.o \
                procNumSetFuncBind.o strendcpy.o

ifndef _WRS_CONFIG_SMP
OBJS += smUtilLib.o
endif

ifndef _WRS_CONFIG_MEM_ALLOT
# These involve memory management
OBJS += dllCreateLib.o poolLib.o poolShow.o rBuffLib.o rBuffShow.o \
	sllCreateLib.o symUtilLib.o
endif

include $(TGT_DIR)/h/make/rules.library

ifndef _WRS_CONFIG_PROFILE_SMALL_FOOTPRINT
# The following kernel critical objects are built with size optimization off
# for DIAB builds for better performance, but with the tradeoff of potentially
# having an increase in code size for the objects.

  ifeq ($(TOOL_FAMILY),diab)
  CFLAGS_avlUintLib.o    = -Xsize-opt=0
  CFLAGS_qPriBMapLib.o   = -Xsize-opt=0
  CFLAGS_qPriDeltaLib.o  = -Xsize-opt=0
  CFLAGS_qFifoLib.o      = -Xsize-opt=0
  CFLAGS_qPriListLib.o   = -Xsize-opt=0
  CFLAGS_qPxPriBMapLib.o = -Xsize-opt=0
  CFLAGS_qPxSSPriBMapLib.o = -Xsize-opt=0
  endif
endif

# extra options for specific modules

CFLAGS_strSearchLib.o  = $(CC_WARNINGS_IGNORE_DEPRECATED)
