# Makefile - makefile for target/src/debug/cafe
#
# Copyright (c) 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
# --------------------
# 01b,23mar11,vhe  Fixed Cafe component
# 01a,11mar11,flu  written.
#
# DESCRIPTION
# This is the top level Makefile for building the cafe component during
# GPP builds.
#
# Note that this file is a temporary work-waround and will be obsoleted when
# GPP build infratstructure is fixed to build components outside $TGT_DIR,
# for example components in $WIND_HOME/components.
#

TGT_DIR = $(WIND_BASE)/target

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

ifneq ($(wildcard $(WRVX_COMPBASE)/$(COMP_CAFE)/Makefile),)

default:
	$(MAKE) -C $(WRVX_COMPBASE)/$(COMP_CAFE) TOOL=$(_WRS_CONFIG_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) CPU=$(CPU) VSB_DIR=$(VSB_DIR) OPT=$(OPT)

clean:
	$(MAKE) -C $(WRVX_COMPBASE)/$(COMP_CAFE) TOOL=$(_WRS_CONFIG_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) CPU=$(CPU) VSB_DIR=$(VSB_DIR) OPT=$(OPT) clean

rclean:
	$(MAKE) -C $(WRVX_COMPBASE)/$(COMP_CAFE) TOOL=$(_WRS_CONFIG_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) CPU=$(CPU) VSB_DIR=$(VSB_DIR) OPT=$(OPT) rclean

man:
	$(MAKE) -C $(WRVX_COMPBASE)/$(COMP_CAFE) TOOL=$(_WRS_CONFIG_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) CPU=$(CPU) VSB_DIR=$(VSB_DIR) OPT=$(OPT) man

synopsis:
	$(MAKE) -C $(WRVX_COMPBASE)/$(COMP_CAFE) TOOL=$(_WRS_CONFIG_APP_TOOL) _VSB_CONFIG_ADDEDCFLAGS=$(__VSB_ADDEDCFLAGSAPP) CPU=$(CPU) VSB_DIR=$(VSB_DIR) OPT=$(OPT) synopsis


release: default
else
# the cafe component is not present - nothing to do
default:

clean:

rclean:

release:

endif

# rules that do nothing for cafe
precomp:

% :
	@echo nothing to be done for target $@
