I do not know of a platform switch either. What you can do is set up a
generic inf in your make system like the following, and then iterate
through your supported platforms with a macro.
This is what I do:
Here is my batch file:
for /F %%i in (PlatformList.txt) do
(
set CAB_PLATFORM=%%i
pushd %mypath%
nmake
popd
)
#############################
# Set up variables
#############################
REDIST_DIR=\\mycomputer\myshare\storage
!if defined(PHONE_CAB)
cab_variation=.phone
!endif
# this is one way to do this, you need to set up a for loop and do this
recursively or you can set up some pseudo targets to help with this, or you
can make batch or managed app to build each cab using CAB_PLATFORM as an
environment variable and afer each time you build a different platform,
update your environment variable.
CAB_PLATFORM=wince4armv4
############################################################################
###
#
# To Do - Add a list/description of input macros. In this case, CAB_TYPE is
# the only input macro.
#
############################################################################
###
CABBASE=$(REDIST_DIR)\mycab$(cab_variation).$(CAB_PLATFORM).$(CAB_CONFIG)
############################################################################
###
#
# Set CAB Type specific tools and names
#
############################################################################
###
cab_wiz=$(_ROOT)\Tools\bin\cabwiz.exe
############################################################################
###
#
# Rule to generate the CAB
#
############################################################################
###
cfcabs : $(CABBASE).cab
$(CABBASE).cab : \
$(CABBASE).inf \
$(BIN_DIR)\calendar.nlp \
$(BCL_DIR)$(cab_variation)\microsoft.windowsce.forms.dll \
$(BCL_DIR)\netcf1_0license.txt
@echo Building $@
if not exist $(@D) md $(@D)
$(cab_wiz) $(CABBASE).inf /cpu
$(cab_variation).$(CAB_PLATFORM).$(CAB_CONFIG)
############################################################################
###
#
# The INF build rule is delcared below. The INF is created via a NMAKE
# inline file. Inline files are detailed in the NMAKE documentation that
can
# be found in the MSDN Library.
#
############################################################################
###
$(CABBASE).inf : $(PROFILE_MAKEFILE)
if not exist $(@D) md $(@D)
@echo Generating <<$@
[Version]
Signature = "$$Windows NT$$"
Provider = "Microsoft"
CESignature = "$$Windows CE$$"
<<KEEP
!undef cab_copy
!undef cab_wiz
!undef cab_variation
This posting is provided "AS IS" with no warranties, and confers no rights.