# Makefile - makefile for src/hwif/intCtlr
#
# Copyright (c) 2007-2011 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
# --------------------
# 02f,08sep11,rlg  removing unused files from build - WIND00299703
# 02e,21sep10,sem  Add new IA cpus. Remove pentium2/3
# 02d,16jul10,rlg  adding Cavium - no longer pulled into bsp directly
# 02c,15jun10,m_h  Thumb-2 Support
# 02b,12apr10,h_k  added vxbMpApic.o vxbIoApicIntr.o vxbLoApicIntr.o to
#                  OBJS_CORE2.
# 02a,16jun09,rlg  undo bad checkin
# 01z,15jun09,rlg  update the DOCS file list
# 01y,26jan09,to   use make-fragment for guest driver
# 01x,28oct08,to   use _WRS_CONFIG_WRHV_GUEST for guest OS build
# 01w,08oct08,dtr  Add PPC razor driver.
# 01v,01aug08,mmi  add virtual I/O APIC driver
# 01u,25feb09,j_b  merge ARM SMP support:
#                  11nov08,j_b  add ARM GIC driver
#                  09jul07,jb3  Manual Merge of ARM vxBus Interrupt Controller
# 01t,02mar09,m_h  Support for ARMARCH7
# 01s,02mar09,m_h  Add Omap to DOC_FILES
# 01r,02jul08,m_h  Adding Texas Instruments OMAP
# 01q,22oct08,h_k  added vxbIntCtlrShow.
# 01p,02jun08,h_k  split vxbEpicIntCtlr, vxbMipsIntCtlr, vxbMipsSbIntCtlr and
#                  vxbMipsXlrIntCtlr.
#                  added function align for GNU.
# 01o,16jun08,l_z  add driver Makefile stub
# 01n,07may08,slk  add vxbMipsMtIpi.c
# 01m,07apr08,h_k  added function align for vxbMipsXlrIntCtlr.
# 01l,04mar08,h_k  added -Xsize-opt=0 to vxbEpicIntCtlr for
#                  vxbSysEpicIntHandler to generate more optimized code.
# 01k,03mar08,h_k  changed CC_OPTIM to CC_OPTIM_NORMAL. added function align
#                  for MIPS and Epic controller.
# 01j,10jul07,tor  add vxbVxSimIpi.c
# 01i,19jun07,tor  add PENTIUM family
# 01h,19jun07,h_k  added vxbIoApicIntr.o, vxbIoApicIntr.o and vxbMpApic.o.
# 01g,29jun07,dtr  Adding dynamic interrupt library.
# 01f,26jun07,d_c  Add vxbMipsXlrIntCtlr
# 01e,19jun07,ami  added vxbI8259IntCtlr.o
# 01d,18jun07,h_k  added vxbMipsSbIntCtlr.o.
# 01c 14jun07,pmr  Add EPIC.
# 01b,14jun07,dtr  Add more drivers to build.
# 01a,25may07,h_k  written.
#
# DESCRIPTION
# This file contains the makefile rules for building the vxBus library
#
#*/

TGT_DIR=$(WIND_BASE)/target

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

DOC_FILES=	 vxbArmGenIntCtlr.c vxbEbGenIntrCtl.c vxbEpicIntCtlr.c \
		 vxbI8259IntCtlr.c vxbIntCtlrLib.c vxbIntCtlrShow.c \
		 vxbIntDynaCtlrLib.c vxbIoApicIntr.c vxbLoApicIntr.c \
		 vxbMipsCavIntCtlr.c vxbMipsCavCiu3IntCtlr.c vxbMipsIntCtlr.c \
		 vxbMipsMtIpi.c vxbMpApic.c vxbOmap35xxIntCtlr.c \
		 vxbQeIntCtlr.c vxbQuiccIntCtlr.c vxbVxSimIpi.c \
		 vxbMipsXlrIntCtlr.c


EXTRA_INCLUDE=-I$(TGT_DIR)/h/

OBJS_COMMON	= vxbIntCtlrLib.o vxbIntDynaCtlrLib.o vxbI8259IntCtlr.o \
		  vxbIntCtlrShow.o

OBJS_ARMARCH6   = vxbEbGenIntrCtl.o vxbArmGenIntCtlr.o vxbOmap35xxIntCtlr.o
OBJS_ARMARCH7	= vxbOmap35xxIntCtlr.o
OBJS_ARMARCH7_T2 = $(OBJS_ARMARCH7)
OBJS_MIPSI2	= vxbMipsIntCtlr.o vxbMipsIntCtlrIsr.o
OBJS_MIPSI3	= vxbMipsIntCtlr.o vxbMipsIntCtlrIsr.o
OBJS_MIPSI32	= vxbMipsIntCtlr.o vxbMipsIntCtlrIsr.o
OBJS_MIPSI32R2	= vxbMipsIntCtlr.o vxbMipsIntCtlrIsr.o vxbMipsMtIpi.o
OBJS_MIPSI64	= vxbMipsIntCtlr.o vxbMipsIntCtlrIsr.o \
		  vxbMipsXlrIntCtlr.o vxbMipsXlrIntCtlrIsr.o
OBJS_MIPSI64R2	= vxbMipsIntCtlr.o vxbMipsIntCtlrIsr.o \
		  vxbMipsCavIntCtlr.o vxbMipsCavCiu3IntCtlr.o
OBJS_PPC32	= vxbQeIntCtlr.o vxbQuiccIntCtlr.o \
		  vxbEpicIntCtlr.o vxbEpicIntCtlrIsr.o
OBJS_PENTIUM4	= vxbMpApic.o vxbIoApicIntr.o vxbLoApicIntr.o
OBJS_CORE2	= vxbMpApic.o vxbIoApicIntr.o vxbLoApicIntr.o
OBJS_ATOM	= vxbMpApic.o vxbIoApicIntr.o vxbLoApicIntr.o
OBJS_CORE	= vxbMpApic.o vxbIoApicIntr.o vxbLoApicIntr.o
OBJS_NEHALEM	= vxbMpApic.o vxbIoApicIntr.o vxbLoApicIntr.o
OBJS_SIMNT      = vxbVxSimIpi.o
OBJS_SIMLINUX   = vxbVxSimIpi.o
OBJS_SIMSPARCSOLARIS = vxbVxSimIpi.o

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

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

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

CC_OPTIM=$(CC_OPTIM_NORMAL)
include  $(TGT_DIR)/h/make/defs.drivers

ifeq ($(TOOL_FAMILY),diab)
CFLAGS_vxbEpicIntCtlrIsr.o = -Xalign-functions=32 -Xsize-opt=0
CFLAGS_vxbMipsIntCtlrIsr.o = -Xalign-functions=32
CFLAGS_vxbMipsXlrIntCtlrIsr.o = -Xalign-functions=32
endif

ifeq ($(TOOL_FAMILY),gnu)
CFLAGS_vxbEpicIntCtlrIsr.o = -falign-functions=32
CFLAGS_vxbMipsIntCtlrIsr.o = -falign-functions=32
CFLAGS_vxbMipsXlrIntCtlrIsr.o = -falign-functions=32
endif
