HelloWorldBasic uses an extension makefile (.mk)
to
compile the application icon. The extension make files are stored in the project's group folder.
For more information on extension makefiles, see Extension makefiles.
The Icons_scalable_dc.mk
file is as follows:
ifeq (WINS,$(findstring WINS, $(PLATFORM))) ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z else ZDIR=$(EPOCROOT)epoc32\data\z endif TARGETDIR=$(ZDIR)\resource\apps ICONTARGETFILENAME=$(TARGETDIR)\helloworldbasic_aif.mif ICONDIR=..\gfx do_nothing : @rem do_nothing MAKMAKE : do_nothing BLD : do_nothing CLEAN : do_nothing LIB : do_nothing CLEANLIB : do_nothing RESOURCE : mifconv $(ICONTARGETFILENAME) \ /c32 $(ICONDIR)\qgn_menu_helloworldbasic.svg FREEZE : do_nothing SAVESPACE : do_nothing RELEASABLES : @echo $(ICONTARGETFILENAME) FINAL : do_nothing
The meaning of the lines is as follows:
ifeq (WINS,$(findstring WINS, $(PLATFORM))) ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z else ZDIR=$(EPOCROOT)epoc32\data\z endif
An if statement that uses the $(PLATFORM)
macro to determine
the platform that is being built for, and if the platform is WINS,
then it finds the path of the root folder from the environmental variables
and sets the variable ZDIR to that root plus the folders epoc32/release/wins/
and
then the result of the $(CFG)
macro, which is either UDEB
or UREL/Z If the platform is not WINS, then it sets it to the other folder.
TARGETDIR=$(ZDIR)\resource\apps ICONTARGETFILENAME=$(TARGETDIR)\helloworldbasic_aif.mif
Builds the full path for the icon file. The .mif
file
is the result of the SVG-T build. This is a file into which all the icons
are placed to save space. The application calls this file to retrieve the
images required. Note also that the name of the .mif
file
must be unique.
ICONDIR=..\gfx
Project folder that contains the icon, relative to the folder that contains
the bld.inf
file.
do_nothing : @rem do_nothing MAKMAKE : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command makefile
.
In this case, no makefile is required, so nothing is done.
BLD : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command target
.
In this case, no main executable or resources are required, so nothing is
done.
CLEAN : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command clean
.
This command removes everything built with abld target
, but
this action is not required so nothing is done. If you want the icon to be
deleted when you do a clean, you can replace the do_nothing
command
with del /Q
.
LIB : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command library
.
This command creates import libraries from frozen .def
files.
No action is required here.
CLEANLIB : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command tidy
.
This command removes executables that will not be released. This action is
not required, so nothing is done here.
/ RESOURCE : mifconv $(ICONTARGETFILENAME) \ /c32 $(ICONDIR)\qgn_menu_helloworldbasic.svg
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command resource
.
This command creates resources files. mifconv
is the command
called to invoke the SVG-T build chain tool. This passes in the target location
variable for where the result should go, and the location of the SVG-T file
that needs to be converted. Thus example only uses one icon, if more were
used, then each icon would need to be listed here. The C32 indicates the colour
depth of the icon. This value should not be changed for SVG-T icons.
FREEZE : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command freeze
.
This command freezes exported functions in a .def
file. No
action is required here.
SAVESPACE : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command target -savespace
.
This command and option deletes intermediate files on success. This is not
required here, so nothing is done.
RELEASABLES : @echo $(ICONTARGETFILENAME)
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command target
.
This command checks to see that the releasables are present and lists the
releasables. With the echo, this generates a line to indicate what has been
build.
FINAL : do_nothing
Required target for processing the extension makefile by abld
,
this corresponds to the abld
command final
.
This command allows extension makefiles to execute final commands. This is
not required here, so nothing is done.