imgtools/imaker/src/imaker_tools.mk
changeset 607 378360dbbdba
parent 596 9f25be3da657
equal deleted inserted replaced
591:22486c9c7b15 607:378360dbbdba
    17 
    17 
    18 
    18 
    19 ###############################################################################
    19 ###############################################################################
    20 # External tools
    20 # External tools
    21 
    21 
    22 BLDROM_TOOL     = buildrom
    22 BLDROM_TOOL     = $(PERL) -S buildrom.pl
       
    23 FEATMAN_TOOL    = $(PERL) -S features.pl
    23 ROMBLD_TOOL     = rombuild
    24 ROMBLD_TOOL     = rombuild
    24 ROFSBLD_TOOL    = rofsbuild
    25 ROFSBLD_TOOL    = rofsbuild
    25 MAKSYM_TOOL     = maksym
    26 MAKSYM_TOOL     = $(PERL) -S maksym.pl
    26 MAKSYMROFS_TOOL = maksymrofs
    27 MAKSYMROFS_TOOL = $(PERL) -S maksymrofs.pl
       
    28 ELF2E32_TOOL    = elf2e32
    27 IMGCHK_TOOL     = imgcheck
    29 IMGCHK_TOOL     = imgcheck
    28 INTPRSIS_TOOL   = interpretsis
    30 INTPRSIS_TOOL   = interpretsis
    29 READIMG_TOOL    = readimage
    31 READIMG_TOOL    = readimage
    30 
    32 
    31 UNZIP_TOOL      = unzip
       
    32 ZIP_TOOL        = zip
    33 ZIP_TOOL        = zip
    33 7ZIP_TOOL       = 7za
    34 7ZIP_TOOL       = 7za
    34 FILEDISK_TOOL   = filedisk
    35 UNZIP_TOOL      = $(7ZIP_TOOL)
    35 WINIMAGE_TOOL   = "c:/program files/winimage/winimage.exe"
    36 
    36 
    37 BUILD_TOOLSET =\
    37 #==============================================================================
    38   tool-cpp          | $(CPP)           |\
       
    39   tool-elf2e32      | $(ELF2E32_TOOL)  |\
       
    40   tool-interpretsis | $(INTPRSIS_TOOL) |\
       
    41   tool-opcache      | $(OPC_TOOL)      |\
       
    42   tool-unzip        | $(UNZIP_TOOL)
       
    43 
       
    44 #==============================================================================
       
    45 
       
    46 BLDROM_JOBS =
    38 
    47 
    39 BLDROM_OPT =\
    48 BLDROM_OPT =\
    40   -loglevel1 $(call iif,$(KEEPTEMP),-p) -v -nosymbols\
    49   -loglevel1 $(call iif,$(KEEPTEMP),-p) -v $(call iif,$(USE_SYMGEN),,-nosymbols) $(addprefix -j,$(BLDROM_JOBS))\
       
    50   $(call iif,$(USE_BLRWORKDIR),-workdir="$($(IMAGE_TYPE)_DIR)")\
    41   $(call iif,$(USE_FEATVAR),-DFEATUREVARIANT=$(FEATURE_VARIANT))\
    51   $(call iif,$(USE_FEATVAR),-DFEATUREVARIANT=$(FEATURE_VARIANT))\
       
    52   $(call iif,$(SYMBIAN_FEATURE_MANAGER),\
       
    53     $(if $($(IMAGE_TYPE)_FEAXML),-fm=$(subst $( ),$(,),$(strip $($(IMAGE_TYPE)_FEAXML)))) -D__FEATURE_IBY__)\
    42   $(if $(IMAGE_TYPE),-D_IMAGE_TYPE_$(IMAGE_TYPE)) $(if $(TYPE),-D_IMAGE_TYPE_$(call ucase,$(TYPE)))
    54   $(if $(IMAGE_TYPE),-D_IMAGE_TYPE_$(IMAGE_TYPE)) $(if $(TYPE),-D_IMAGE_TYPE_$(call ucase,$(TYPE)))
    43 
    55 
    44 BLDROM_PARSE =\
    56 BLDROM_PARSE =\
    45   parse | \nMissing file(s):\n | Missing file: |\
    57   parse   | Missing files:   | /Missing file:/i ||\
    46   parse | \nWarning(s):\n      | /WARNING:\|WARN:/i |\
    58   parse   | Errors:          | /ERROR:\|ERR :/i ||\
    47   parse | \nError(s):\n        | /ERROR:\|ERR :/i   |\
    59   parse-4 | Erroneous links: | /WARNING: Kernel\/variant\/extension/i ||\
    48   parse | \nCan$'t locate:\n | Can$'t locate | parse | \ncouldn$'t be located:\n | couldn$'t be located
    60   parse   | Warnings:        | /WARNING:\|WARN:/i |\
    49 
    61     /WARNING: the value of attribute .+ has been overridden\|WARNING: Kernel\/variant\/extension\|Warning: Can't open .+\.map/i
    50 #* Writing tmp7.oby - result of problem-suppression phase
    62 
    51 #Can't open \epoc32\release\ARMV5\urel\apgrfx.dll.map
    63 #  parse   | Can't locate:    | /Can't locate\|couldn't be located/i |
    52 #Unrecognised option -NO-HEADER0
    64 #Unrecognised option -NO-HEADER0
    53 
    65 
    54 # For passing extra paramters (from command line)
    66 # For passing extra parameters (from command line)
    55 BLDROPT =
    67 BLDROPT =
    56 BLDROBY =
    68 BLDROBY =
    57 
    69 
    58 
    70 #==============================================================================
    59 ###############################################################################
    71 
    60 # S60 Configuration Tool CLI
    72 DEFHRH_IDIR = . $($(IMAGE_TYPE)_IDIR) $(FEATVAR_IDIR)
    61 
    73 DEFHRH_CMD  = $(CPP) -nostdinc -undef -dM -D_IMAGE_INCLUDE_HEADER_ONLY\
    62 CONFT_TOOL    = cli.cmd
    74   $(call dir2inc,$(DEFHRH_IDIR)) -include $(call upddrive,$(FEATVAR_HRH)) $(call updoutdrive,$($(IMAGE_TYPE)_MSTOBY)) \|\
    63 CONFT_TOOLDIR = $(or $(wildcard /s60/tools/toolsextensions/ConfigurationTool),/ext/tools/toolsextensions/ConfigurationTool)
    75   $(PERL) -we $(call iif,$(USE_UNIX),',")print(sort({lc($$a) cmp lc($$b)} <STDIN>))$(call iif,$(USE_UNIX),',")\
    64 
    76     >>$($(IMAGE_TYPE)_DEFHRH)
    65 CONFT_DIR     = $(WORKDIR)/ct
    77 
    66 CONFT_TMPDIR  = $(CONFT_DIR)/_temp
    78 define DEFHRH_HDRINFO
    67 CONFT_CFGNAME = variant
    79   // Generated file for documenting feature variant definitions
    68 CONFT_CONFML  = $(call iif,$(USE_VARIANTBLD),$(VARIANT_CONFML),$(WORKDIR)/$(CONFT_CFGNAME).confml)
    80   //
    69 CONFT_IMPL    = $(CONFIGROOT)/confml_data/s60;$(CONFIGROOT)/confml_data/customsw
    81   // Filename: $($(IMAGE_TYPE)_DEFHRH)
    70 CONFT_IBYML   = $(CONFT_TOOLDIR)/ibyml
    82   // Command : $(DEFHRH_CMD)
    71 CONFT_OUTDIR  = $(call iif,$(USE_VARIANTBLD),$(VARIANT_OUTDIR),$(CONFT_DIR)/cenrep)
    83 endef
    72 CONFT_CRLOG   = $(call iif,$(USE_VARIANTBLD),$(VARIANT_PREFIX)_,$(CONFT_DIR))cenrep.log
    84 
    73 CONFT_ECLCONF = -configuration $(CONFT_TMPDIR) -data $(CONFT_TMPDIR)
    85 CLEAN_DEFHRH = del | "$($(IMAGE_TYPE)_DEFHRH)"
    74 CONFT_CONF    = $(CONFT_ECLCONF)\
    86 BUILD_DEFHRH =\
    75   -master $(CONFT_CONFML) -impl $(CONFT_IMPL) $(if $(CONFT_IBYML),-ibyml $(CONFT_IBYML)) -output $(CONFT_DIR)\
    87   $(if $($(IMAGE_TYPE)_DEFHRH),\
    76   -report $(CONFT_CRLOG) -ignore_errors
    88     write | "$($(IMAGE_TYPE)_DEFHRH)" | $(call def2str,$(DEFHRH_HDRINFO))\n\n |\
    77 CONFT_CONFCP  = $(call iif,$(USE_VARIANTBLD),$(VARIANT_CONFCP),$(CONFT_CFGNAME))
    89     cmd   | $(DEFHRH_CMD))
    78 
    90 
    79 CONFT_CMD     = $(CONFT_TOOL) $(CONFT_CONF)
    91 #==============================================================================
    80 CONFT_PARSE   = parse | \nWarnings, errors and problems:\n | /warning:\|error:\|problem/i
    92 
    81 
    93 FEATMAN_OPT = $($(IMAGE_TYPE)_FEAXML) --ibyfile=$($(IMAGE_TYPE)_DIR) --verbose
    82 CLEAN_CENREP =\
    94 FEATMAN_CMD = $(FEATMAN_TOOL) $(FEATMAN_OPT)
    83   del    | $(CONFT_CRLOG) |\
    95 
    84   deldir | "$(CONFT_DIR)" "$(CONFT_TMPDIR)" $(call iif,$(USE_VARIANTBLD),,"$(CONFT_OUTDIR)")
    96 CLEAN_FEATMAN = del | $(foreach file,$($(IMAGE_TYPE)_FEAIBY),"$(file)")
    85 
    97 BUILD_FEATMAN =\
    86 BUILD_CENREP =\
    98   $(call iif,$(SYMBIAN_FEATURE_MANAGER),$(if $($(IMAGE_TYPE)_FEAXML),\
    87   echo-q | Calling S60 Configuration Tool |\
    99     echo-q | Generating Feature manager file(s) |\
    88   mkcd   | $(CONFT_DIR) |\
   100     write  | $($(IMAGE_TYPE)_FEAIBY) | |\
    89   deldir | $(CONFT_TMPDIR) |\
   101     cmd    | $(FEATMAN_CMD)))
    90   cmd    | $(CONFT_CMD) | $(CONFT_PARSE) |\
   102 
    91   $(foreach dir,$(CONFT_CONFCP),\
   103 #==============================================================================
    92     finddir | $(CONFT_DIR)/$(dir) | * | |\
   104 # ROFS symbol generation
    93     copy    | __find__ | $(CONFT_OUTDIR) |)\
   105 
    94   $(call iif,$(KEEPTEMP),,deldir | $(CONFT_TMPDIR))
   106 MAKSYMROFS_CMD = $(MAKSYMROFS_TOOL) $(call pathconv,"$($(IMAGE_TYPE)_LOG)" "$($(IMAGE_TYPE)_SYM)")
    95 
   107 
    96 
   108 CLEAN_MAKSYMROFS = del | "$($(IMAGE_TYPE)_SYM)"
    97 ###############################################################################
   109 BUILD_MAKSYMROFS =\
    98 # Interpretsis
   110   echo-q | Creating $($(IMAGE_TYPE)_TITLE) symbol file |\
    99 
   111   cmd    | $(MAKSYMROFS_CMD)
   100 SISINST_DIR    = $(WORKDIR)/sisinst
   112 
   101 SISINST_SISDIR = $(call iif,$(USE_VARIANTBLD),$(VARIANT_SISDIR))
   113 REPORT_MAKSYMROFS = $($(IMAGE_TYPE)_TITLE) symbols | $($(IMAGE_TYPE)_SYM) | f
   102 SISINST_OUTDIR = $(call iif,$(USE_VARIANTBLD),$(VARIANT_OUTDIR),$(SISINST_DIR)/output)
   114 
   103 #SISINST_ZDIR   = $(SISINST_DIR)/z_drive
   115 
   104 SISINST_ZDIR   = $(EPOC32)/data/Z
   116 ###############################################################################
   105 
   117 # ConE
   106 SISINST_HALINI = $(wildcard $(PRODUCT_DIR)/interpretsis.ini)
   118 
   107 SISINST_CONF   = -w info -z $(SISINST_ZDIR) $(if $(SISINST_HALINI),-i $(SISINST_HALINI)) -c $(SISINST_OUTDIR) -s $(SISINST_SISDIR)
   119 USE_CONE = 0
   108 SISINST_CMD    = $(INTPRSIS_TOOL) $(SISINST_CONF)
   120 
   109 SISINST_PARSE  =\
   121 CONE_TOOL    = $(call iif,$(USE_UNIX),,call )cone
   110   parse | \nWarning(s):\n | /^WARN:/ |\
   122 CONE_TOOLDIR = $(or $(wildcard $(E32TOOLS)/configurationengine),$(E32TOOLS)/cone)
   111   parse | \nError(s):\n   | /^ERR :/
   123 CONE_OUTDIR  = $(OUTTMPDIR)/cone
   112 
   124 CONE_PRJ     = $(CONFIGROOT)
   113 #CLEAN_SISINSTPRE = deldir | $(SISINST_ZDIR)
   125 CONE_CONF    = $($(IMAGE_TYPE)_CONECONF)
   114 #BUILD_SISINSTPRE =\
   126 CONE_RNDCONF = $(COREPLAT_NAME)/$(PRODUCT_NAME)/rnd/root.confml
   115 #  mkdir | $(SISINST_ZDIR) |\
   127 CONE_ADDCONF = $(call select,$(TYPE),rnd,$(if $(wildcard $(CONE_PRJ)/$(CONE_RNDCONF)),$(CONE_RNDCONF)))
   116 #  $(foreach img,$(ROM_IMG) $(foreach rofs,1 2 3 4 5 6,$(call iif,$(USE_ROFS$(rofs)),$(ROFS$(rofs)_IMG))),\
   128 CONE_LOG     = $($(or $(addsuffix _,$(IMAGE_TYPE)),WORK)PREFIX)_cone_$(call substm,* / : ? \,@,$(TARGET)).log
   117 #    cmd | $(READIMG_TOOL) -z $(SISINST_ZDIR) $(img) |)
   129 CONE_VERBOSE = $(if $(filter debug 127,$(VERBOSE)),5)
   118 
   130 CONE_GOPT    = generate --project="$(CONE_PRJ)"\
   119 CLEAN_SISINST = deldir | "$(SISINST_DIR)" $(call iif,$(USE_VARIANTBLD),,"$(SISINST_OUTDIR)")
   131   $(if $(CONE_CONF),--configuration="$(CONE_CONF)") $(addprefix --add=,$(CONE_ADDCONF))\
       
   132   $(if $(CONE_LOG),--log-file="$(CONE_LOG)") $(addprefix --verbose=,$(CONE_VERBOSE))
       
   133 CONE_PARSE   = parse-2 | ConE errors: | /ERROR\s*:/i |
       
   134 
       
   135 #==============================================================================
       
   136 
       
   137 CONE_MK    = $(if $(CONE_PRJ),$(CONE_PRJ).mk)
       
   138 CONE_MKOPT = $(CONE_GOPT) --impl=imaker.* --all-layers --set=imaker.makefilename="$(CONE_MK)" --output=.
       
   139 CONE_MKCMD = $(CONE_TOOL) $(CONE_MKOPT)
       
   140 
       
   141 CLEAN_CONEPRE = del | "$(CONE_MK)" "$(CONE_LOG)"
       
   142 BUILD_CONEPRE =\
       
   143   echo-q | Creating ConE makefile `$(CONE_MK)' |\
       
   144   cmd    | $(CONE_MKCMD) | $(CONE_PARSE) |\
       
   145   test   | "$(CONE_MK)"
       
   146 
       
   147 #==============================================================================
       
   148 
       
   149 CONE_IMPLS       =
       
   150 CONE_IMPLOPT     = $(addprefix --impl=,$(subst $(,), ,$(CONE_IMPLS)))
       
   151 CONE_LAYERS      =
       
   152 CONE_LAYEROPT    = $(addprefix --layer=,$(subst $(,), ,$(CONE_LAYERS)))
       
   153 CONE_REPFILE     = $(basename $(CONE_LOG)).html
       
   154 CONE_REPDATADIR  = $(OUTDIR)/cone-repdata
       
   155 CONE_REPDATAFILE = $(CONE_REPDATADIR)/$(IMAGE_TYPE).dat
       
   156 CONE_RTMPLFILE   =
       
   157 
       
   158 CONE_GENOPT = $(CONE_GOPT)\
       
   159   $(CONE_IMPLOPT) $(CONE_LAYEROPT) --add-setting-file=imaker_variantdir.cfg\
       
   160   $(if $(CONE_REPFILE),$(call select,$(USE_CONE),mk,--report-data-output="$(CONE_REPDATAFILE)",--report="$(CONE_REPFILE)"))\
       
   161   $($(IMAGE_TYPE)_CONEOPT) --output="$(CONE_OUTDIR)"
       
   162 CONE_GENCMD = $(CONE_TOOL) $(CONE_GENOPT)
       
   163 
       
   164 CLEAN_CONEGEN = del | "$(CONE_LOG)" "$(CONE_REPFILE)" | deldir | "$(CONE_OUTDIR)"
       
   165 BUILD_CONEGEN =\
       
   166   echo-q | Generating $($(IMAGE_TYPE)_TITLE) content with ConE |\
       
   167   mkdir  | "$(CONE_OUTDIR)" |\
       
   168   cmd    | $(CONE_GENCMD)   | $(CONE_PARSE)
       
   169 
       
   170 REPORT_CONEGEN =\
       
   171   ConE log | $(CONE_LOG) | f\
       
   172   $(if $(CONE_REPFILE),| ConE report | $(CONE_REPFILE) | f)
       
   173 
       
   174 #==============================================================================
       
   175 
       
   176 CLEAN_CONEREPPRE = deldir | "$(CONE_REPDATADIR)"
       
   177 BUILD_CONEREPPRE =
       
   178 
       
   179 CONE_REPGENOPT =\
       
   180   report --input-data-dir="$(CONE_REPDATADIR)"\
       
   181   $(if $(CONE_RTMPLFILE),--template="$(CONE_RTMPLFILE)")\
       
   182   --report="$(CONE_REPFILE)" --log-file="$(CONE_LOG)" $(addprefix --verbose=,$(CONE_VERBOSE))
       
   183 CONE_REPGENCMD = $(CONE_TOOL) $(CONE_REPGENOPT)
       
   184 
       
   185 CLEAN_CONEREPGEN = del | "$(CONE_REPFILE)"
       
   186 BUILD_CONEREPGEN = $(if $(CONE_REPFILE),\
       
   187   echo-q | Generating report with ConE to `$(CONE_REPFILE)' |\
       
   188   cmd    | $(CONE_REPGENCMD))
       
   189 
       
   190 REPORT_CONEREPGEN = $(if $(CONE_REPFILE),ConE report | $(CONE_REPFILE) | f)
       
   191 
       
   192 #==============================================================================
       
   193 
       
   194 CONE_XCF = $(ICDP_XCF)
       
   195 
       
   196 CONE_XCFOPT = $(CONE_GOPT) --impl=xcf.gcfml --all-layers --output="$(dir $(CONE_XCF))"
       
   197 CONE_XCFCMD = $(CONE_TOOL) $(CONE_XCFOPT)
       
   198 
       
   199 CLEAN_CONEXCF = del | "$(CONE_XCF)" "$(CONE_LOG)"
       
   200 BUILD_CONEXCF =\
       
   201   echo-q | Creating XCF file `$(CONE_XCF)' |\
       
   202   cmd    | $(CONE_XCFCMD) | $(CONE_PARSE)  |\
       
   203   test   | "$(CONE_XCF)"
       
   204 
       
   205 #==============================================================================
       
   206 
       
   207 .PHONY: cone-pre cone-gen cone-rep-pre cone-rep-gen
       
   208 
       
   209 cone-pre: ;@$(call IMAKER,CONEPRE)
       
   210 cone-gen: ;@$(call IMAKER,CONEGEN)
       
   211 cone-rep-pre: ;@$(call IMAKER,CONEREPPRE)
       
   212 cone-rep-gen: ;@$(call IMAKER,CONEREPGEN)
       
   213 
       
   214 
       
   215 ###############################################################################
       
   216 # SIS pre-installation
       
   217 
       
   218 SISINST_INI    = $(wildcard $(VARIANT_DIR)/sis_config.ini)
       
   219 SISINST_DIR    = $(VARIANT_SISDIR)
       
   220 SISINST_OUTDIR = $(VARIANT_OUTDIR)
       
   221 SISINST_CFGINI = $(IMAGE_PREFIX)_sis.ini
       
   222 SISINST_LOG    = $(IMAGE_PREFIX)_sis.log
       
   223 SISINST_CONF   = -d $(if $(filter Z z,$(or $($(IMAGE_TYPE)_DRIVE),Z)),C,$($(IMAGE_TYPE)_DRIVE)) -e -k 5.4 -s "$(SISINST_DIR)"
       
   224 SISINST_HALHDA =
       
   225 
       
   226 # sf/os/kernelhwsrv/halservices/hal/inc/hal_data.h:
       
   227 define SISINST_HALINFO
       
   228   EManufacturer_Ericsson          0x00000000
       
   229   EManufacturer_Motorola          0x00000001
       
   230   EManufacturer_Nokia             0x00000002
       
   231   EManufacturer_Panasonic         0x00000003
       
   232   EManufacturer_Psion             0x00000004
       
   233   EManufacturer_Intel             0x00000005
       
   234   EManufacturer_Cogent            0x00000006
       
   235   EManufacturer_Cirrus            0x00000007
       
   236   EManufacturer_Linkup            0x00000008
       
   237   EManufacturer_TexasInstruments  0x00000009
       
   238 
       
   239   EDeviceFamily_Crystal         0
       
   240   EDeviceFamily_Pearl           1
       
   241   EDeviceFamily_Quartz          2
       
   242 
       
   243   ECPU_ARM                      0
       
   244   ECPU_MCORE                    1
       
   245   ECPU_X86                      2
       
   246 
       
   247   ECPUABI_ARM4                  0
       
   248   ECPUABI_ARMI                  1
       
   249   ECPUABI_THUMB                 2
       
   250   ECPUABI_MCORE                 3
       
   251   ECPUABI_MSVC                  4
       
   252   ECPUABI_ARM5T                 5
       
   253   ECPUABI_X86                   6
       
   254 
       
   255   ESystemStartupReason_Cold     0
       
   256   ESystemStartupReason_Warm     1
       
   257   ESystemStartupReason_Fault    2
       
   258 
       
   259   EKeyboard_Keypad              0x1
       
   260   EKeyboard_Full                0x2
       
   261 
       
   262   EMouseState_Invisible         0
       
   263   EMouseState_Visible           1
       
   264 
       
   265   EMachineUid_Series5mx         0x1000118a
       
   266   EMachineUid_Brutus            0x10005f60
       
   267   EMachineUid_Cogent            0x10005f61
       
   268   EMachineUid_Win32Emulator     0x10005f62
       
   269   EMachineUid_WinC              0x10005f63
       
   270   EMachineUid_CL7211_Eval       0x1000604f
       
   271   EMachineUid_LinkUp            0x00000000
       
   272   EMachineUid_Assabet           0x100093f3
       
   273   EMachineUid_Zylonite          0x101f7f27
       
   274   EMachineUid_IQ80310           0x1000a681
       
   275   EMachineUid_Lubbock           0x101f7f26
       
   276   EMachineUid_Integrator        0x1000AAEA
       
   277   EMachineUid_Helen             0x101F3EE3
       
   278   EMachineUid_X86PC             0x100000ad
       
   279   EMachineUid_OmapH2            0x1020601C
       
   280   EMachineUid_OmapH4            0x102734E3
       
   281   EMachineUid_NE1_TB            0x102864F7
       
   282   EMachineUid_EmuBoard          0x1200afed
       
   283   EMachineUid_OmapH6            0x10286564
       
   284   EMachineUid_OmapZoom          0x10286565
       
   285   EMachineUid_STE8500           0x101FF810
       
   286 
       
   287   EPowerBatteryStatus_Zero      0
       
   288   EPowerBatteryStatus_Replace   1
       
   289   EPowerBatteryStatus_Low       2
       
   290   EPowerBatteryStatus_Good      3
       
   291 
       
   292   EPowerBackupStatus_Zero       0
       
   293   EPowerBackupStatus_Replace    1
       
   294   EPowerBackupStatus_Low        2
       
   295   EPowerBackupStatus_Good       3
       
   296 endef
       
   297 
       
   298 define SISINST_CFGINFO
       
   299   $(foreach lang,$(LANGPACK_LANGIDS),
       
   300     DEVICE_SUPPORTED_LANGUAGE = $(lang))
       
   301 endef
       
   302 
       
   303 CLEAN_SISINST = del | "$(SISINST_CFGINI)" "$(SISINST_LOG)"
   120 BUILD_SISINST =\
   304 BUILD_SISINST =\
   121   echo-q | Installing SIS |\
   305   echo-q  | Installing SIS file(s) |\
   122   mkdir  | $(SISINST_OUTDIR) |\
   306   sisinst | $(SISINST_INI) | $(SISINST_CFGINI) | $(SISINST_CONF)  |\
   123   cmd    | $(SISINST_CMD) | $(SISINST_PARSE)
   307     $(SISINST_HALHDA) | $(strip $(call def2str,$(SISINST_HALINFO) | $(SISINST_CFGINFO))) |\
       
   308     $(SISINST_OUTDIR) | $(SISINST_LOG)
   124 
   309 
   125 
   310 
   126 ###############################################################################
   311 ###############################################################################
   127 # Operator Cache Tool
   312 # Operator Cache Tool
   128 
   313 
   129 OPC_TOOL     = $(ITOOL_DIR)/opcache_tool.py
   314 OPC_TOOL     = $(PYTHON) $(ITOOL_DIR)/opcache_tool.py
   130 OPC_CONF     = -u $(OPC_URL) -e $(OPC_EXPDATE) -m $(OPC_MMAPFILE) -i $(OPC_RAWDIR) -o $(OPC_OUTDIR)/$(OPC_CACHEDIR)
   315 OPC_INI      = $(wildcard $(VARIANT_DIR)/opcache_config.ini)
   131 OPC_CMD      = $(PYTHON) $(OPC_TOOL) $(OPC_CONF)
   316 OPC_DIR      = $(VARIANT_OPCDIR)
   132 OPC_DIR      = $(WORKDIR)/opcache
   317 OPC_OUTDIR   = $(VARIANT_OUTDIR)/$(OPC_CACHEDIR)
   133 OPC_RAWDIR   = $(call iif,$(USE_VARIANTBLD),$(VARIANT_OPCDIR))
   318 OPC_TMPDIR   = $(OUTTMPDIR)/opcache
   134 OPC_OUTDIR   = $(call iif,$(USE_VARIANTBLD),$(VARIANT_OUTDIR),$(OPC_DIR)/output)
   319 OPC_CACHEDIR = system/cache/op
   135 OPC_CACHEDIR = cache
       
   136 OPC_MMAPFILE = $(OPC_DIR)/mimemap.dat
       
   137 
       
   138 OPC_URL      = http://www.someoperator.com/Cache_OpCache
   320 OPC_URL      = http://www.someoperator.com/Cache_OpCache
   139 OPC_EXPDATE  = 3
   321 OPC_EXPDATE  = 2012-01-01
       
   322 OPC_MIMEFILE = $(IMAGE_PREFIX)_opcachemime.dat
       
   323 OPC_CONF     = -u "$(OPC_URL)" -e "$(OPC_EXPDATE)" -m "$(OPC_MIMEFILE)" -i "$(OPC_DIR)" -o "$(OPC_OUTDIR)"
   140 
   324 
   141 define OPC_MIMEMAP
   325 define OPC_MIMEMAP
   142   .bmp:   image/bmp
   326   .bmp:   image/bmp
   143   .css:   text/css
   327   .css:   text/css
   144   .gif:   image/gif
   328   .gif:   image/gif
   157   .wml:   text/vnd.wap.wml
   341   .wml:   text/vnd.wap.wml
   158   .wmlc:  application/vnd.wap.wmlc
   342   .wmlc:  application/vnd.wap.wmlc
   159   .xhtml: application/xhtml+xml
   343   .xhtml: application/xhtml+xml
   160 endef
   344 endef
   161 
   345 
   162 CLEAN_OPCACHE = del | $(OPC_MMAPFILE) | deldir | "$(OPC_DIR)" $(call iif,$(USE_VARIANTBLD),,"$(OPC_OUTDIR)")
   346 CLEAN_OPCACHE = del | "$(OPC_MIMEFILE)"
   163 BUILD_OPCACHE =\
   347 BUILD_OPCACHE =\
   164   echo-q | Creating Operator Cache content |\
   348   echo-q  | Creating Operator Cache content |\
   165   write  | $(OPC_MMAPFILE) |\
   349   mkdir   | "$(OPC_OUTDIR)"   |\
   166     $(call def2str,\# Generated `$(OPC_MMAPFILE)$' for Operator Cache content creation$(\n)$(\n)$(OPC_MIMEMAP)) |\
   350   write   | "$(OPC_MIMEFILE)" | $(call def2str,$(OPC_MIMEMAP))\n |\
   167   test   | $(OPC_RAWDIR)/* |\
   351   opcache | $(OPC_INI) | $(OPC_CONF) | $(OPC_TMPDIR)
   168   mkdir  | $(OPC_OUTDIR)/$(OPC_CACHEDIR) |\
       
   169   cmd    | $(OPC_CMD)
       
   170 
       
   171 
       
   172 ###############################################################################
       
   173 # Widget Pre-installation
       
   174 
       
   175 WIDGET_WGZIP   = $(WORKDIR)/*.wgz
       
   176 WIDGET_WGZDIR  = $(EPOC32)/release/winscw/udeb/z/data/WidgetBURTemp
       
   177 WIDGET_WGZIBY  = $(E32ROMINC)/widgetbackupfiles.iby
       
   178 WIDGET_WGZPXML = Info.plist
       
   179 
       
   180 CLEAN_WGZPREINST = del | $(WIDGET_WGZIBY) | deldir | $(WIDGET_WGZDIR)
       
   181 BUILD_WGZPREINST =\
       
   182   echo-q   | Widget Pre-installation |\
       
   183   echo-q   | Unzip $(WIDGET_WGZIP) file(s) to $(WIDGET_WGZDIR), generating $(WIDGET_WGZIBY) |\
       
   184   wgunzip  | $(WIDGET_WGZIP) | $(WIDGET_WGZDIR) | $(WIDGET_WGZPXML) |\
       
   185   geniby-r | $(WIDGET_WGZIBY) | $(WIDGET_WGZDIR) | * | data="%1" "data/WidgetBURTemp/%2" | end
       
   186 
   352 
   187 
   353 
   188 ###############################################################################
   354 ###############################################################################
   189 # Image Checker
   355 # Image Checker
   190 
   356 
   224 
   390 
   225 
   391 
   226 ###############################################################################
   392 ###############################################################################
   227 # Image to files; extract files from .img using Readimage tool
   393 # Image to files; extract files from .img using Readimage tool
   228 
   394 
   229 I2FILE_DIR = $(WORKDIR)/img2file
   395 CLEAN_I2FILE = deldir | "$($(IMAGE_TYPE)_I2FDIR)"
   230 
       
   231 CLEAN_COREI2F = deldir | $(CORE_I2FDIR)
       
   232 BUILD_COREI2F = $(call _buildi2file,CORE,$(CORE_I2FDIR),$(ROM_IMG) $(call iif,$(USE_ROFS1),$(ROFS1_IMG)))
       
   233 
       
   234 CLEAN_VARIANTI2F = $(foreach rofs,2 3 4 5 6,$(call iif,$(USE_ROFS$(rofs)),deldir | $(ROFS$(rofs)_I2FDIR) |))
       
   235 BUILD_VARIANTI2F =\
       
   236   $(foreach rofs,2 3 4 5 6,$(call iif,$(USE_ROFS$(rofs)),\
       
   237     $(call _buildi2file,ROFS$(rofs),$(ROFS$(rofs)_I2FDIR),$(ROFS$(rofs)_IMG))))
       
   238 
       
   239 CLEAN_I2FILE = deldir | $(I2FILE_DIR) | $(CLEAN_COREI2F) | $(CLEAN_VARIANTI2F)
       
   240 BUILD_I2FILE =\
   396 BUILD_I2FILE =\
   241   $(BUILD_COREI2F) | $(BUILD_VARIANTI2F) |\
   397   echo-q | Extracting files from $($(IMAGE_TYPE)_TITLE) SOS image to $($(IMAGE_TYPE)_I2FDIR) |\
   242   copy | $(CORE_I2FDIR)/* | $(I2FILE_DIR) |\
   398   mkcd   | "$($(IMAGE_TYPE)_I2FDIR)" |\
   243   $(foreach rofs,2 3 4 5 6,$(call iif,$(USE_ROFS$(rofs)),copy | $(ROFS$(rofs)_I2FDIR)/* | $(I2FILE_DIR) |))
   399   $(foreach img,$($(IMAGE_TYPE)_IMG),\
   244 
   400     cmd  | $(READIMG_TOOL) -s $(img)   |\
   245 _buildi2file =\
   401     cmd  | $(READIMG_TOOL) -z . $(img) |)
   246   echo-q | Extracting files from $($1_TITLE) SOS image to $2 |\
   402 
   247   mkcd   | $2 |\
   403 
   248   $(foreach img,$3,\
   404 ###############################################################################
   249     cmd | $(READIMG_TOOL) -s $(img)   |\
   405 # Rofsbuild FAT
   250     cmd | $(READIMG_TOOL) -z . $(img) |)
   406 
       
   407 ROFSBLD_FATOPT = -datadrive="$($(IMAGE_TYPE)_OUTOBY)" $(addprefix -j,$(BLDROM_JOBS)) $(call iif,$(KEEPGOING),-k) -loglevel2 -slog
       
   408 
       
   409 CLEAN_ROFSBLDFAT = del | "$($(IMAGE_TYPE)_LOG)"
       
   410 BUILD_ROFSBLDFAT =\
       
   411   cmd  | $(ROFSBLD_TOOL) $(ROFSBLD_FATOPT) |\
       
   412   move | "$($(IMAGE_TYPE)_OUTOBY).log" | $($(IMAGE_TYPE)_LOG)
       
   413 
       
   414 
       
   415 ###############################################################################
       
   416 # Filedisk
       
   417 
       
   418 FILEDISK_TOOL  = filedisk
       
   419 FILEDISK_OPT   = /mount 0 $(call peval,GetAbsFname($(call pquote,$($(IMAGE_TYPE)_IMG)),1)) $(call peval,$$iVar[0] = GetFreeDrive())
       
   420 FILEDISK_SLEEP = 1
       
   421 
       
   422 CLEAN_FILEDISK = del | "$($(IMAGE_TYPE)EMPTY_IMG)"
       
   423 BUILD_FILEDISK =\
       
   424   $(if $($(IMAGE_TYPE)EMPTY_CMD),\
       
   425     cmd   | $($(IMAGE_TYPE)EMPTY_CMD) |\
       
   426     move  | "$($(IMAGE_TYPE)EMPTY_IMG)" | $($(IMAGE_TYPE)_IMG) |)\
       
   427   cmd     | $(FILEDISK_TOOL) $(FILEDISK_OPT) |\
       
   428   copydir | "$($(IMAGE_TYPE)_DATADIR)" | $(call peval,$$iVar[0])/ |\
       
   429   cmd     | $(FILEDISK_TOOL) /status $(call peval,$$iVar[0]) |\
       
   430   sleep   | $(FILEDISK_SLEEP) |\
       
   431   cmd     | $(FILEDISK_TOOL) /umount $(call peval,$$iVar[0])
       
   432 
       
   433 
       
   434 ###############################################################################
       
   435 # WinImage
       
   436 
       
   437 WINIMAGE_TOOL = "c:/program files/winimage/winimage.exe"
       
   438 WINIMAGE_OPT  = $(call pathconv,$($(IMAGE_TYPE)_IMG)) /i $(call pathconv,$($(IMAGE_TYPE)_DATADIR)) /h /q
       
   439 
       
   440 CLEAN_WINIMAGE = del | "$($(IMAGE_TYPE)EMPTY_IMG)"
       
   441 BUILD_WINIMAGE =\
       
   442   $(if $($(IMAGE_TYPE)EMPTY_CMD),\
       
   443     cmd  | $($(IMAGE_TYPE)EMPTY_CMD) |\
       
   444     move | "$($(IMAGE_TYPE)EMPTY_IMG)" | $($(IMAGE_TYPE)_IMG) |)\
       
   445   cmd | $(WINIMAGE_TOOL) $(WINIMAGE_OPT)
       
   446 
       
   447 
       
   448 ###############################################################################
       
   449 # Widget Pre-installation
       
   450 
       
   451 WIDGET_TOOLDIR = $(E32TOOLS)/widget_tools
       
   452 WIDGET_TOOL    = $(WIDGET_TOOLDIR)/widgetpreinstaller/installwidgets.pl
       
   453 WIDGET_DIR     = $(VARIANT_WGZDIR)
       
   454 WIDGET_TMPDIR  = $(OUTTMPDIR)/widget
       
   455 WIDGET_OUTDIR  = $(VARIANT_OUTDIR)
       
   456 WIDGET_IDIR    = $(WIDGET_DIR) $(VARIANT_DIR) $(FEATVAR_IDIR)
       
   457 WIDGET_INI     = $(call findfile,widget_config.ini,$(WIDGET_IDIR),1)
       
   458 WIDGET_CFGINI  = $(IMAGE_PREFIX)_widget.ini
       
   459 WIDGET_LANGOPT = $(LANGPACK_DEFLANGID)
       
   460 WIDGET_OPT     = -verbose $(if $(filter debug 127,$(VERBOSE)),-debug) -epocroot "$(WIDGET_TMPDIR)" $(call iif,$(WIDGET_LANGOPT),-localization $(WIDGET_LANGOPT))
       
   461 WIDGET_CMD     = $(PERL) $(WIDGET_TOOL) $(WIDGET_OPT) "$(WIDGET_CFGINI)"
       
   462 
       
   463 define WIDGET_HDRINFO
       
   464   # Generated configuration file for Widget pre-installation
       
   465   #
       
   466   # Filename: $(WIDGET_CFGINI)
       
   467   # Command : $(WIDGET_CMD)
       
   468 
       
   469   $(if $(WIDGET_INI),,[drive-$(call lcase,$($(IMAGE_TYPE)_DRIVE))])
       
   470 endef
       
   471 
       
   472 WIDGET_HSINI     = $(IMAGE_PREFIX)_hsplugin.ini
       
   473 WIDGET_HSCINI    = $(IMAGE_PREFIX)_hsplugincwrt.ini
       
   474 WIDGET_HSOPT     = "$(WIDGET_TMPDIR)" "$(WIDGET_HSINI)"
       
   475 WIDGET_HSCOPT    = "$(WIDGET_TMPDIR)" "$(WIDGET_HSCINI)"
       
   476 WIDGET_HSCMD     = $(call iif,$(USE_UNIX),,call )$(WIDGET_TOOLDIR)/hspluginpreinstaller/HSPluginPreInstaller $(WIDGET_HSOPT)
       
   477 WIDGET_HSCCMD    = $(call iif,$(USE_UNIX),,call )$(WIDGET_TOOLDIR)/hspluginpreinstaller/HSPluginPreInstaller $(WIDGET_HSCOPT)
       
   478 
       
   479 WIDGET_HSVIEWDIR = $(if $(VARIANT_CPDIR),$(wildcard $(subst \,/,$(VARIANT_CPDIR))/private/200159c0/install))
       
   480 WIDGET_HSWIDEDIR = $(E32DATAZ)/private/200159c0/install/wideimage_2001f489
       
   481 WIDGET_HSOUTDIR  = $(subst \,/,$(WIDGET_OUTDIR))/private/200159c0/install
       
   482 
       
   483 define WIDGET_HSINFO
       
   484   # Generated configuration file for Home Screen plugin pre-installation for$(if $1, $1) widgets
       
   485   #
       
   486   # Filename: $(WIDGET_HS$(if $1,C)INI)
       
   487   # Command : $(WIDGET_HS$(if $1,C)CMD)
       
   488 
       
   489   WIDGET_REGISTRY_PATH=$(subst \,/,$(WIDGET_OUTDIR))/private/10282f06/$1WidgetEntryStore.xml
       
   490 
       
   491   VIEW_CONFIGURATION_PATH=$(WIDGET_HSVIEWDIR)
       
   492 
       
   493   WIDEIMAGE_PATH=$(WIDGET_HSWIDEDIR)
       
   494 
       
   495   OUTPUT_DIR=$(WIDGET_HSOUTDIR)
       
   496 endef
       
   497 
       
   498 CLEAN_WIDGET =\
       
   499   del    | "$(WIDGET_CFGINI)" "$(WIDGET_HSINI)" "$(WIDGET_HSCINI)" |\
       
   500   deldir | "$(WIDGET_TMPDIR)"
       
   501 
       
   502 BUILD_WIDGET =\
       
   503   echo-q  | Installing widget(s) |\
       
   504   genwgzcfg | $(WIDGET_CFGINI) | $(WIDGET_INI) | $(WIDGET_DIR) | $(call def2str,$(WIDGET_HDRINFO)) |\
       
   505   $(and $(WIDGET_HSINFO),$(WIDGET_HSVIEWDIR),\
       
   506     write | "$(WIDGET_HSINI)"  | $(call def2str,$(call WIDGET_HSINFO))\n |\
       
   507     write | "$(WIDGET_HSCINI)" | $(call def2str,$(call WIDGET_HSINFO,CWRT))\n |)\
       
   508   mkdir   | "$(WIDGET_TMPDIR)" |\
       
   509   cmd     | (cd $(call pathconv,$(WIDGET_TMPDIR))) & $(WIDGET_CMD) |\
       
   510   copydir | "$(WIDGET_TMPDIR)/epoc32/$(if $(filter CORE ROFS%,$(IMAGE_TYPE)),release/winscw/udeb/z,winscw/?)" |\
       
   511     $(WIDGET_OUTDIR) |\
       
   512   $(and $(WIDGET_HSINFO),$(WIDGET_HSVIEWDIR),\
       
   513     mkdir | "$(WIDGET_HSOUTDIR)" |\
       
   514     cmd   | $(WIDGET_HSCMD)  |\
       
   515     cmd   | $(WIDGET_HSCCMD) |)\
       
   516   $(call iif,$(KEEPTEMP),,deldir | "$(WIDGET_TMPDIR)")
       
   517 
       
   518 
       
   519 ###############################################################################
       
   520 # Data package 2.0 creation / iCreatorDP
       
   521 
       
   522 #USE_DPGEN = 0
       
   523 
       
   524 ICDP_TOOL    = iCreatorDP.py
       
   525 ICDP_TOOLDIR = $(EPOC_ROOT)/iCreatorDP
       
   526 ICDP_OPT     = --xcfs="$(ICDP_XCF)" --wa="$(ICDP_WRKDIR)" --ba="$(ICDP_BLDDIR)" --i="$(ICDP_IMGDIR)" --build
       
   527 ICDP_OUTDIR  = $(EPOC_ROOT)/output
       
   528 ICDP_XCF     = $(ICDP_OUTDIR)/griffin.xcf
       
   529 ICDP_WRKDIR  = $(ICDP_OUTDIR)/DP_WA
       
   530 ICDP_BLDDIR  = $(ICDP_OUTDIR)/DP_OUT
       
   531 ICDP_IMGDIR  = $(ICDP_OUTDIR)/images
       
   532 ICDP_VPLDIR  = $(ICDP_OUTDIR)/VPL
       
   533 ICDP_CMD     = $(PYTHON) $(ICDP_TOOL) $(ICDP_OPT)
       
   534 
       
   535 ICDP_CUSTIMG = $(ICDP_IMGDIR)/customer.fpsx
       
   536 ICDP_UDAIMG  = $(ICDP_IMGDIR)/customer_uda.fpsx
       
   537 
       
   538 #ICDP_IMGLIST = "$(ICDP_IMGDIR)/customer.fpsx" "$(ICDP_IMGDIR)/customer_uda.fpsx"
       
   539 
       
   540 CLEAN_DPPRE = $(CLEAN_CONEXCF) | del | "$(ICDP_CUSTIMG)"
       
   541 BUILD_DPPRE =\
       
   542   $(BUILD_CONEXCF) |\
       
   543   echo-q | Copying images |\
       
   544   mkdir  | "$(ICDP_IMGDIR)" |\
       
   545   copy   | "$(ROFS3_FLASH)" | $(ICDP_CUSTIMG) |\
       
   546 #  copy   | $(UDA_FLASH) | $(ICDP_UDAIMG)
       
   547 
       
   548 CLEAN_DPBLD = deldir | "$(ICDP_BLDDIR)"
       
   549 BUILD_DPBLD =\
       
   550   echo-q | Generating data package |\
       
   551   cd     | "$(ICDP_TOOLDIR)" |\
       
   552   cmd    | $(ICDP_CMD)
       
   553 
       
   554 CLEAN_DPPOST = deldir | "$(ICDP_VPLDIR)"
       
   555 BUILD_DPPOST =\
       
   556   find-r | "$(ICDP_BLDDIR)" | *.zip | |\
       
   557   unzip  | __find__ | $(ICDP_VPLDIR)
       
   558 
       
   559 #==============================================================================
       
   560 
       
   561 .PHONY: datapack datapack-pre
       
   562 
       
   563 datapack    : ;@$(call IMAKER,$$(call iif,$$(SKIPPRE),,DPPRE) $$(call iif,$$(SKIPBLD),,DPBLD) $$(call iif,$$(SKIPPOST),,DPPOST))
       
   564 datapack-pre: ;@$(call IMAKER,DPPRE)
       
   565 
       
   566 
       
   567 ###############################################################################
       
   568 # Data package copying functionality for Griffin
       
   569 
       
   570 #DP_SRCDIR   = $(EPOC_ROOT)/output/images
       
   571 DP_CORESRC  =
       
   572 DP_LANGSRC  =
       
   573 DP_CUSTSRC  =
       
   574 DP_UDASRC   =
       
   575 DP_DCPSRC   =
       
   576 DP_VPLSRC   =
       
   577 DP_SIGNSRC  =
       
   578 
       
   579 DP_OUTDIR   = $(EPOC_ROOT)/output/VPL
       
   580 DP_CORETGT  = $(DP_OUTDIR)/core.fpsx
       
   581 DP_LANGTGT  = $(DP_OUTDIR)/lang.fpsx
       
   582 DP_CUSTTGT  = $(DP_OUTDIR)/customer.fpsx
       
   583 DP_UDATGT   = $(DP_OUTDIR)/uda.fpsx
       
   584 DP_DCPTGT   = $(DP_OUTDIR)/carbidev.dcp
       
   585 DP_VPLTGT   = $(DP_OUTDIR)/carbidev.vpl
       
   586 DP_SIGNTGT  = $(DP_OUTDIR)/carbidev_signature.bin
       
   587 
       
   588 DP_MK    = $(OUTPREFIX)_dpcopy.mk
       
   589 DP_MKLOG = $(basename $(DP_MK))_cone.log
       
   590 DP_MKOPT =\
       
   591   generate --project="$(CONE_PRJ)" $(if $(CONE_CONF),--configuration="$(CONE_CONF)")\
       
   592   --impl=dp.makeml --all-layers --set=imaker.makefilename="$(DP_MK)"\
       
   593   --log-file="$(DP_MKLOG)" $(addprefix --verbose=,$(CONE_VERBOSE))
       
   594 DP_MKCMD = $(CONE_TOOL) $(DP_MKOPT)
       
   595 
       
   596 CLEAN_DPCOPYPRE = del | "$(DP_MK)" "$(DP_MKLOG)"
       
   597 BUILD_DPCOPYPRE =\
       
   598   echo-q | Generating makefile `$(DP_MK)' for Data Package copy |\
       
   599   cmd    | $(DP_MKCMD) |\
       
   600   test   | "$(DP_MK)"
       
   601 
       
   602 CLEAN_DPCOPY = deldir | "$(DP_OUTDIR)"
       
   603 
       
   604 BUILD_DPCOPY =\
       
   605   echo-q | Copying Data Package contents |\
       
   606   mkdir  | "$(DP_OUTDIR)" |\
       
   607   $(foreach type,CORE LANG CUST UDA DCP VPL SIGN,\
       
   608     copy | "$(DP_$(type)SRC)" | $(DP_$(type)TGT) |)
       
   609 
       
   610 #==============================================================================
       
   611 
       
   612 .PHONY: dpcopy dpcopy-pre
       
   613 
       
   614 dpcopy    : ;@$(call IMAKER,DPCOPY)
       
   615 dpcopy-pre: ;@$(call IMAKER,DPCOPYPRE)
       
   616 
       
   617 
       
   618 ###############################################################################
       
   619 # PlatSim
       
   620 
       
   621 USE_PLATSIM               = 0
       
   622 
       
   623 PLATSIM_TOOL              = pscli.exe
       
   624 PLATSIM_TOOLDIR           = /rd_sw/platsim
       
   625 PLATSIM_TOOL_INSTANCESDIR = $(PLATSIM_TOOLDIR)/instances
       
   626 PLATSIM_IMAGESDIR         = $(PLATSIM_TOOLDIR)/HW77/images
       
   627 PLATSIM_INSTANCE          = 1
       
   628 RUN_PLATSIM               = 0
       
   629 PLATSIM_IMAGES            = $(CORE_FLASH)
       
   630 PLATSIM_IMAGESRC          = $(patsubst %\,%,$(call pathconv,$(dir $(PLATSIM_IMAGES))))
       
   631 
       
   632 PLATSIM_INSTANCES = $(notdir $(foreach entry,$(wildcard $(PLATSIM_TOOL_INSTANCESDIR)/*),$(call isdir,$(entry))))
       
   633 define isdir
       
   634 $(if $(wildcard $1/*),$1)
       
   635 endef
       
   636 
       
   637 BUILD_PLATLAUNCH =\
       
   638   echo-q | Launching PlatSim instance $(PLATSIM_INSTANCE) |\
       
   639   cd     | $(PLATSIM_TOOLDIR) |\
       
   640   cmd    | $(PLATSIM_TOOL) --launch $(PLATSIM_INSTANCE)
       
   641 
       
   642 BUILD_PLATSHUTDOWN =\
       
   643   echo-q | Stopping PlatSim instance $(PLATSIM_INSTANCE) |\
       
   644   cd     | $(PLATSIM_TOOLDIR) |\
       
   645   cmd    | $(PLATSIM_TOOL) --console --shutdown $(PLATSIM_INSTANCE)
       
   646 
       
   647 BUILD_PLATCREATE =\
       
   648   echo-q | Creating new PlatSim instance $(PLATSIM_INSTANCE) |\
       
   649   cmd    | $(PLATSIM_TOOL) --console --create $(PLATSIM_INSTANCE) |\
       
   650   cmd    | $(PLATSIM_TOOL) --set $(PLATSIM_INSTANCE):imaker_$(PLATSIM_INSTANCE)
       
   651 
       
   652 BUILD_PLATUPDATE =\
       
   653   echo-q | Updating PlatSim instance $(PLATSIM_INSTANCE) |\
       
   654   cmd    | $(PLATSIM_TOOL) --console --set $(PLATSIM_INSTANCE):$(PLATSIM_IMAGESRC):$(notdir $(PLATSIM_IMAGES))
       
   655 
       
   656 BUILD_PLATBLD =\
       
   657   cd | $(PLATSIM_TOOLDIR) |\
       
   658   $(if $(filter $(PLATSIM_INSTANCE),$(PLATSIM_INSTANCES)),\
       
   659     echo-q | Platsim instance $(PLATSIM_INSTANCE) exists | $(BUILD_PLATSHUTDOWN),\
       
   660     $(BUILD_PLATCREATE)) |\
       
   661   $(BUILD_PLATUPDATE) |\
       
   662   $(call iif,$(RUN_PLATSIM),$(BUILD_PLATLAUNCH))
       
   663 
       
   664 $(call add_help,USE_PLATSIM,v,(string),Define that the configuration is a PlatSim configuration.)
   251 
   665 
   252 
   666 
   253 ###############################################################################
   667 ###############################################################################
   254 # Tool info
   668 # Tool info
   255 
   669 
   267   $(ROMBLD_TOOL)   | $(ROMBLD_TOOL)         | ROMBUILD.+? V(.+?)\s*$$  |
   681   $(ROMBLD_TOOL)   | $(ROMBLD_TOOL)         | ROMBUILD.+? V(.+?)\s*$$  |
   268   $(ROFSBLD_TOOL)  | $(ROFSBLD_TOOL)        | ROFSBUILD.+? V(.+?)\s*$$ |
   682   $(ROFSBLD_TOOL)  | $(ROFSBLD_TOOL)        | ROFSBUILD.+? V(.+?)\s*$$ |
   269   $(IMGCHK_TOOL)   | $(IMGCHK_TOOL) -h      | IMGCHECK.+? V(.+?)\s*$$  |
   683   $(IMGCHK_TOOL)   | $(IMGCHK_TOOL) -h      | IMGCHECK.+? V(.+?)\s*$$  |
   270   $(INTPRSIS_TOOL) | $(INTPRSIS_TOOL) -h    | INTERPRETSIS\s+Version\s+(.+?)\s*$$ |
   684   $(INTPRSIS_TOOL) | $(INTPRSIS_TOOL) -h    | INTERPRETSIS\s+Version\s+(.+?)\s*$$ |
   271   $(READIMG_TOOL)  | $(READIMG_TOOL)        | Readimage.+? V(.+?)\s*$$ |
   685   $(READIMG_TOOL)  | $(READIMG_TOOL)        | Readimage.+? V(.+?)\s*$$ |
   272   $(CONFT_TOOL)    | $(CONFT_TOOL) -version | ^.+?\n(.+?)\n(.+?)\n
       
   273 endef
   686 endef
   274 
   687 
   275 BUILD_TOOLINFO = echo-q | | toolchk | $(strip $(TOOL_INFO)) | end
   688 BUILD_TOOLINFO = echo-q | | toolchk | $(strip $(TOOL_INFO)) | end
   276 
   689 
   277 #==============================================================================
   690 #==============================================================================
   280 
   693 
   281 
   694 
   282 ###############################################################################
   695 ###############################################################################
   283 # Targets
   696 # Targets
   284 
   697 
   285 .PHONY: checkdep opcache sisinst toolinfo wgzpreinst
   698 .PHONY: checkdep opcache sisinst toolinfo
   286 
   699 
   287 chkdep opcache sisinst toolinfo wgzpreinst:\
   700 chkdep opcache sisinst toolinfo:\
   288   ;@$(call IMAKER,$(call ucase,$@))
   701   ;@$(call IMAKER,$(call ucase,$@))
   289 
   702 
   290 
   703 
   291 # END OF IMAKER_TOOLS.MK
   704 # END OF IMAKER_TOOLS.MK