# Makefile - makefile for target/src/aim
#
# modification history
# --------------------
# 01w,08mar12,h_k  reverted the single CPU_VARIANT build. (WIND00320752)
# 01v,22nov11,x_s  add support for building a single CPU_VARIANT for PPC32 SMP
# 01u,05jul10,liu  add aimFppShow.c to support fppTaskRegsShow. (WIND00192339)
# 01t,04oct10,kk   add back the build for aimCacheLib.c and aimCacheSyctl.c
#                  for 64bit
# 01s,30sep10,kk   disable files for building for LP64
# 01r,09sep10,jpb  Added aimFuncBind.o
# 01q,26feb10,pch  small footprint
# 01p,01feb10,elp  disable build for simulator.
# 01o,08jun09,jb   Disable aimMmuLib build for pentium family
# 01n,20apr05,dr   SPR 108100 - Added aimFppLib.c
# 01m,14jun04,job  Removed an unnecessary include of defs.library
# 01l,10jun04,sru  build aimCacheLib.o for all architectures
# 01k,08jun04,sru  Added aimMmuBaseLib.o
# 01j,02jun04,mil  Made libaim PPC32 generic.
# 01i,30apr04,pch  clean up; build for selected PPC variants
# 01h,27apr04,rec  add sysctl support
# 01g,01apr04,scm  add Arm/XScale cache AIM support...
# 01f,26mar04,slk  Update so MIPS32 and MIPS64 CPUs include aimCacheLib.o
# 01e,17feb04,pch  remove PPC32 hack, no longer needed
# 01d,23dec03,kab  Remove aimCacheLib until stable
# 01c,24nov03,sru  fix PPC32 builds
# 01b,21oct03,sru  add aimMmuShow.c
# 01a,14apr03,jb   created
#
# DESCRIPTION
# This file contains the makefile rules for building the aim library
#

TGT_DIR=$(WIND_BASE)/target

DOC_FILES_COMMON=	\
	aimCacheLib.c	\
	aimFppLib.c

LIB_BASE_NAME = aim

OBJS_COMMON = aimCacheLib.o aimFppLib.o aimFuncBind.o aimFppShow.o

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

ifndef _WRS_CONFIG_MEM_ALLOT
# Sysctl and MMU require memory management
 OBJS_COMMON +=	aimMmuBaseLib.o	aimMmuShow.o aimMmuSysctl.o aimCacheSysctl.o
endif

ifeq ($(VX_CPU_FAMILY),$(filter $(VX_CPU_FAMILY),pentium simpc simlinux simso))
DOC_FILES=$(DOC_FILES_COMMON)
else
DOC_FILES=$(DOC_FILES_COMMON) aimMmuLib.c         
endif

ifneq ($(VX_CPU_FAMILY),$(filter $(VX_CPU_FAMILY),pentium simpc simlinux simso))
 ifndef _WRS_CONFIG_MEM_ALLOT
  OBJS_COMMON += aimMmuLib.o
 endif
endif

# 64bit only utilizes the following files, all other files, such as
# aimMmuShow.o and aimMmuLib.c are not used and therefore not built.

ifdef _WRS_CONFIG_LP64
OBJS_COMMON = aimMmuBaseLib.o aimFppLib.o aimFuncBind.o aimMmuSysctl.o \
              aimCacheLib.o aimCacheSysctl.o
endif

OBJS= $(OBJS_COMMON)

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