# Makefile - makefile for target/src/hwif/resource
#
# Copyright (c) 2006-2008, 2010-2011, 2016 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,17jun16,l_z  include defs.drivers to correct document directory. (VXW6-5624)
# 01g,02dec11,wyt  Add including defs.library
# 01f,01apr10,wap  Add Diab-specific compilation flags to fix up inline
#                  assembly of certain instructions for P4080 Qman/Bman code
# 01e,14may08,wap  Add support for separate Makefiles
# 01d,04apr08,wap  Add IBM/AMCC TCP Accelleration in Hardware (TAH) driver
# 01c,05sep07,vik  Apigen changes
# 01b,26jul07,h_k  added m85xxCCSR.o and quiccEngineUtils.o.
# 01b,10sep07,l_z  Add vxbXlrFmn.c
# 01a,03aug06,wap  written
#
# DESCRIPTION
# This file contains the makefile rules for building resource drivers 
# into the VxWorks library.
#

TGT_DIR=$(WIND_BASE)/target

DOC_FILES = m85xxCCSR.c quiccEngineUtils.c

LIB_BASE_NAME=drv

# 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

EXTRA_INCLUDE=-I$(TGT_DIR)/h/

OBJS_PPC32  = cpm.o m85xxCCSR.o quiccEngineUtils.o vxbIbmTah.o

OBJS_MIPSI64    = vxbXlrFmn.o

# Pick up individual driver Makefiles

include $(wildcard $(sort *.mk))

OBJS        = $(OBJS_COMMON) $(OBJS_$(CPU))

EXTRA_DEFINE +=	-DINCLUDE_VXBUS

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

CC_OPTIM=$(CC_OPTIM_NORMAL)

# The -Xapu-storage flag is needed in order for Diab to
# understand the dcbzl instruction when building generic
# PPC32 code (i.e. when we're not building in
# target/src/arch).

ifeq ($(TOOL_FAMILY),diab)
CFLAGS_vxbQorIQQmanPortal.o     = -Xapu-storage
CFLAGS_vxbQorIQBmanPortal.o     = -Xapu-storage
endif

