# -*- mode: mak -*-
###############################################################################
# File:         TOOLSET/vcwce.def
# Contents:     Microsoft eMbedded C/C++ Toolset defines
###############################################################################

# Standard definitions
#
#..
toolset		= vcwce

o		= obj
s		= asm
a		= lib
exe		= .exe

# Verify and import environment variable requirements
#
# Note:   Correct handling of embedded spaces within path
#         specifications involves explicit conversion on import
#         and export.
#..
.PHONY:		vcembedded
vcembedded:
  ifndef GBE_NOTOOLSTEST
	    $(AA_PRE)$(echo) '[Toolset VCWCE - eMbedded C/C++ - WINCE $(WCE_VERSION)]'; \
	    if [ -z "$$WCEROOT" ]; then echo   "[VCWCE.DEF] (E) WCEROOT env var not set"; exit 2; fi; \
	    if [ -z "$$SDKROOT" ]; then echo   "[VCWCE.DEF] (E) SDKROOT env var not set"; exit 2; fi; \
	    if [ ! -d "$$WCEROOT" ]; then echo "[VCWCE.DEF] (E) WCEROOT directory not found: $$WCEROOT" ; exit 2; fi; \
	    if [ ! -d "$$SDKROOT" ]; then echo "[VCWCE.DEF] (E) SDKROOT directory not found: $$SDKROOT" ; exit 2; fi; \
        for item in "$(WCEROOT)/EVC/wce$(WCE_VERSION)/Bin" "$(WCEROOT)/Common/EVC/Bin"; do \
	        if [ ! -d "$$item" ]; then echo "[VCWCE.DEF] (E) Toolset component not found: $$item" ; exit 2; fi; \
	    done
  endif

#
#   Sanitise root paths
#
WCEROOT		:= $(subst \,/,$(strip $(WCEROOT)))
SDKROOT		:= $(subst \,/,$(strip $(SDKROOT)))

ifeq "$(findstring $(wceroot),$(PATH))" ""
PATH		:= $(WCEROOT)/EVC/wce$(WCE_VERSION)/Bin;$(PATH)
PATH		:= $(WCEROOT)/Common/EVC/Bin;$(PATH)
endif
Path		:= $(PATH)

        # The program database file
PDB		= $(OBJDIR)/$(GBE_PBASE)$(GBE_TYPE).pdb

	# rpcgen configuration
	#..
RPCGEN_CPP	:= $(WCE_CC)
RPCGEN_CFLAGS	:= -EP
export RPCGEN_CPP RPCGEN_CFLAGS

#
