# Makefile - makefile for /src/hwif
#
# Copyright (c) 2005, 2007, 2010, 2012, 2013, 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
# --------------------
# 01n,17jun16,l_z  include defs.drivers to correct document directory. (VXW6-5624)
# 01m,18sep13,e_d  Add sd directory
# 01l,11feb13,h_k  added spd to SUBDIRS.
# 01k,28dec12,j_x  Add ieee1394 directory
# 01j,24dec12,j_z  Add rapidio directory
# 01i,22dec12,y_y  Add spi directory
# 01k,28dec12,j_x  Add ieee1394 directory
# 01j,24dec12,j_z  Add rapidio directory
# 01i,22dec12,y_y  Add spi directory
# 01h,22mar12,x_z  Add flash directory
# 01g,27oct10,dbr  Add soc directory
# 01f,18oct10,dbr  Add directory gpio
# 01e,29sep10,rec  add directory pwr
# 01d,22sep10,dbr  Add i2c directory
# 01d,18may10,pch  small footprint
# 01c,07may10,h_k  added SUBDIRS to force methods to be built first.
# 01b,10aug07,h_k  changed the LIB_BASE_NAME to drv.
# 01a,07nov05,mdo  created from MakeSkel
#
# DESCRIPTION
# This file contains the makefile rules for building the vxBus library
#
#

TGT_DIR=$(WIND_BASE)/target

LIB_BASE_NAME=drv

OBJS=

DOC_OPTS = -mg -nostrict -missingok

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

# subdirs whose contents would require malloc/free
HWIF_MALLOC_SUBDIRS=end end2 flash hEnd mii storage usb ieee1394

# Ensure the methods sub-directory comes to the top of the list, so that
# the rest of the sub-directories are built after vxbMethodDecl.h is
# updated if a new VxBus method file is added in the methods directory.

SUBDIRS = methods busCtlr console cpu dmaCtlr flash fw gpio i2c intCtlr mf \
	  nvram pwr resource rapidio sio soc spd spi timer util vxbus sd

ifdef _WRS_CONFIG_MEM_ALLOT
# skip subdirs whose contents would require malloc/free
EXCLUDE_SUBDIRS=$(HWIF_MALLOC_SUBDIRS)
else
# add subdirs requiring malloc/free to build list
SUBDIRS += $(HWIF_MALLOC_SUBDIRS)
endif

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