The Windows CE Build Process
by Aspi Havewala

Listing One
REM // Base components
set CE_MODULES=coredll filesys nk toolhelp shell
set COREDLL_COMPONENTS=coremain coreloc lmem thunks fmtmsg
set FILESYS_COMPONENTS=fsysram fsreg fsheap fsmain fspass fsdbase 
REM // Base GWE components
set CE_MODULES=%CE_MODULES% gwes
set GWE1_COMPONENTS=wmbase gweshare gwesmain immthunk msgque 
                                                   loadstr GSetWinLong
set COREDLL_COMPONENTS=%COREDLL_COMPONENTS% rectapi wmgr_c 
set GWE1_COMPONENTS=%GWE1_COMPONENTS% foregnd uibase kbdui 
                                                  idle getpower nled msgbeep
REM // Base GDI components
set GWE2_COMPONENTS=mgbase mgbitmap mgblt mgblt2 mgdc mgdibsec mgdraw 
                                                     mgrgn mgwinmgr mgpalnat


Listing Two
; @CESYSGEN IF CE_MODULES_GWES
   gwes.exe        $(_FLATRELEASEDIR)\gwes.exe                 NK  SH
; @CESYSGEN ENDIF

Listing Three
TARGETNAME=DDI_SAMPLE   # Name of the target.
TARGETTYPE=DYNLINK  # Build this as a DLL (Can be "PROGRAM" for EXEs).
DLLENTRY=DllMain    # Entry point into DLL.
# Set up a variable for the Windows Driver Model root directory.
!IF "$(WINCE_WDM)" == "1"
WDMLIBROOT=$(_COMMONOAKROOT)
!ELSE
WDMLIBROOT=$(_TARGETPLATROOT)
!ENDIF
# Add some of your own custom flags. Make sure you define
# everything in CDEFINES back in your CDEFINES. CDEFINES will be
# set to something before you get here and you don't want to trash that.
CDEFINES=$(CDEFINES) -DDDI -D$(_TGTPLAT)
# Precompile headers to save time when compiling.
PRECOMPILED_INCLUDE=precomp.h    # Precompile this file
PRECOMPILED_PCH=precomp.pch      #    into this file
PRECOMPILED_CXX=1                # Turn precompiled headers on (saves time!)

# Include directories. Only relative directories can be specified. Absolute 
# paths won't work. Your platform directory is prepended to each directory 
# in this INCLUDES path and specified as a -I option to your compiler.
INCLUDES=              \
        ..\..\..\inc;  \
    ..\inc;
# All the source files that make up your module.
SOURCES=       \
    Setup.cpp  \
    Cursor.cpp \
        Shapes.cpp
    Io.cpp
# This variable contains libraries you want your module to link with.
TARGETLIBS=                                             \
    $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib    \
    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\gpe.lib        \
    $(WDMLIBROOT)\lib\$(_CPUINDPATH)\wdm.lib





1


