uifw/AvKon/group/mif2cdlindex.flm
changeset 0 2f259fa3e83a
child 23 3d340a0166ff
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 # mif2cdlindex.flm
       
     2 #
       
     3 # Copyright (c) 2007-2008 Nokia Ltd. All rights reserved.
       
     4 #
       
     5 # Header file exporting Function Like Makefile (FLM)
       
     6 # The file destinations  relative to EPOCROOT
       
     7 
       
     8 ## Parameters that are expected:
       
     9 # TARGETFILE Avkon2mifheader_inst.cpp
       
    10 # GENPATH 
       
    11 # MIFFILE avkon2.mif
       
    12 # DLLNAME Avkon2MifHeader
       
    13 # DLLUID 0x102827CF
       
    14 
       
    15 ## Default values for .mif files to get picked up
       
    16 # armv5
       
    17 # MIFDIR $(EPOCROOT)/epoc32/data/Z/resource/apps for armv5 or # MIFDIR $(EPOCROOT)epoc32/data/Z/resource/apps or 
       
    18 # winscw
       
    19 # MIFDIR:=$(EPOCROOT)/epoc32/release/winscw/$(CFG)/z/resource/apps
       
    20 
       
    21 CREATABLEPATHS:=
       
    22 CLEANTARGETS:=
       
    23 
       
    24 ifeq ($(MIFDIR),)
       
    25   ifeq ($(PLATFORM),ARMV5) 
       
    26     MIFDIR:=$(EPOCROOT)/epoc32/data/Z/resource/apps
       
    27   else
       
    28   ifeq ($(PLATFORM),WINSCW)
       
    29     MIFDIR:=$(EPOCROOT)/epoc32/release/winscw/$(CFG)/z/resource/apps
       
    30   endif
       
    31   endif  
       
    32 endif
       
    33 
       
    34 # Check if all the inputs are present
       
    35 $(if $(TARGETFILE),,$(error Must define TARGETFILE))
       
    36 $(if $(GENPATH),,$(error Must define GENPATH))
       
    37 $(if $(MIFFILE),,$(error Must define MIFFILE))
       
    38 $(if $(DLLNAME),,$(error Must define DLLNAME))
       
    39 $(if $(DLLUID),,$(error Must define DLLUID))
       
    40 
       
    41 ifneq ($(GENPATH),)
       
    42 DATAPATH:=$(subst //,/,$(EXTENSION_ROOT)/$(GENPATH))
       
    43 endif
       
    44 
       
    45 CREATABLEPATHS:=$(DATAPATH)
       
    46 TARGETSRCFILE:=$(subst //,/,$(DATAPATH)/$(TARGETFILE))
       
    47 MIFPATH:=$(subst //,/,$(MIFDIR)/$(MIFFILE))
       
    48 
       
    49 MIF2CDLDEBUG:=0
       
    50 ifeq ($(strip $(MIF2CDLDEBUG)),1)
       
    51 $(info <DATAPATH datapath='$(DATAPATH)'/>)
       
    52 $(info <EXTENSION_ROOT extension_root='$(EXTENSION_ROOT)'/>)
       
    53 $(info <MIF2CDL mif2cdl='$(MIF2CDL)'/>)
       
    54 $(info <MIFPATH mifpath='$(MIFPATH)'/>)
       
    55 $(info <TARGETSRCFILE targetsrcfile='$(TARGETSRCFILE)'/>)
       
    56 endif
       
    57 
       
    58 RELEASEABLES:=$(TARGETSRCFILE)
       
    59 CLEANTARGETS:=$(TARGETSRCFILE)
       
    60 
       
    61 MIFGUARD:=$(call sanitise,TARGET_$(TARGETSRCFILE))
       
    62 
       
    63 define generatesrcfile
       
    64 $(MIFGUARD):=1
       
    65 
       
    66 BITMAP:: $(RELEASEABLES)
       
    67 
       
    68 $(TARGETSRCFILE): $(MIFPATH) $(MIF2CDL)
       
    69 	$(call startrule,generatesrc,FORCESUCCESS) \
       
    70 	$(MIF2CDL) -p$(DATAPATH) -s $(MIFPATH) $(DLLNAME) $(DLLUID) \
       
    71 	$(call endrule,generatesrc)
       
    72 
       
    73 endef
       
    74 
       
    75 
       
    76 ifeq ($($(MIFGUARD)),)
       
    77 $(eval -$(call generatesrcfile))
       
    78 endif
       
    79 
       
    80 # Create dirs
       
    81 $(call makepath,$(CREATABLEPATHS))
       
    82 
       
    83 ## Clean up
       
    84 $(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS)))
       
    85 
       
    86 # for the abld -what target
       
    87 $(eval $(call whatmacro,$(RELEASEABLES),WHATBITMAP))