# Licensed Materials - Property of HCL and/or IBM
# HCL RealTime Software Tooling - TARGET RTS
# Copyright HCL Technologies Ltd. 2016, 2018. All Rights Reserved.
# Copyright IBM Corporation 1999, 2016. All Rights Reserved.
#
# U.S. Government Users Restricted Rights -  Use, duplication or 
# disclosure restricted by GSA ADP Schedule.


# By default, programs are expected to be found in a directories listed
# in PATH, but because we always use a variable, one could say
#     make PERL=/some/other/place/perl ...
# if, for example, perl is not.

include ../libset/default.mk

CONFIG   = MustBeSpecified
MAKEOPTS =
RTS_HOME = ..

# This is the default target. To use it, the macro CONFIG must be specified.
#
#   Example: make CONFIG=SUN5T.sparc-gnu-2.8.1
#
# Clearmake can wink in the results from the "depend.mk" rule,
# but then will always execute the "default" rule which calls a sub-make.
# Non-Clearmake might not properly fire the "depend.mk" rule,
# but will always call Build.pl which will make sure depend.mk is
# up-to-date before calling the sub-make.

default : ../build-$(CONFIG)/depend.mk
	@ $(PERL) Build.pl $(BUILDOPTS) $(CONFIG) $(MAKE) $(MAKEOPTS)

../build-$(CONFIG)/depend.mk :
	@ $(PERL) Build.pl $(BUILDOPTS) $(CONFIG)

# This is more convenient if your version of make
# understands the .DEFAULT directive.
#
#   Example: make SUN5T.sparc-gnu-2.8.1

.DEFAULT :
	@ $(MAKE) "BUILDOPTS=$(BUILDOPTS)" "MAKEOPTS=$(MAKEOPTS)" CONFIG=$@

# Rules intended for use by Rational Software personnel only:

include Rational.mk

# A shorter list of suffixes reduces the time spent searching for applicable
# implicit rules. This makefile doesn't rely on implicit rules so the list
# could be empty, but some implementations of make seem to think this is worth
# noting so we just put .cc in the list to eliminate those warnings.

.SUFFIXES :
.SUFFIXES : .cc
