gfxconversion/mifconv/makefile_templates/mifconv.flm
changeset 0 f453ebb75370
equal deleted inserted replaced
-1:000000000000 0:f453ebb75370
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 # 
       
    14 # Description:
       
    15 # 
       
    16 #
       
    17 
       
    18 # Check if $/ variable has been defined, if not, then it is always /
       
    19 ifeq ($(strip $(/)),)
       
    20     /:=/
       
    21 endif
       
    22 
       
    23 # Replace \ with / in EPOCROOT
       
    24 EPOCROOT:=$(subst \,/,$(EPOCROOT))
       
    25 # Make sure that EPOCROOT ends in /
       
    26 EPOCROOT:=$(patsubst %/,%,$(EPOCROOT))/
       
    27 # Replace / with $/ in EPOCROOT
       
    28 EPOCROOT:=$(subst /,$/,$(EPOCROOT))
       
    29 
       
    30 # Important initialise
       
    31 RELEASEABLES:=
       
    32 
       
    33 ifeq ($(SBS_BUILD_DIR),)
       
    34 VECTORINTERMEDIATEDIR:=$(EPOCROOT)epoc32$/build$/s60$/icons$/$(notdir $(basename $(TARGETFILE)))
       
    35 else
       
    36 VECTORINTERMEDIATEDIR:=$(SBS_BUILD_DIR)$/s60$/icons$/$(notdir $(basename $(TARGETFILE)))
       
    37 endif
       
    38 
       
    39 include $(EPOCROOT)epoc32$/tools$/makefile_templates$/s60$/mifconv_global_options.make
       
    40 include $(EPOCROOT)epoc32$/tools$/makefile_templates$/s60$/mifconv_step1.make
       
    41 include $(EPOCROOT)epoc32$/tools$/makefile_templates$/s60$/mifconv_step2.make
       
    42 include $(EPOCROOT)epoc32$/tools$/makefile_templates$/s60$/mifconv_option_reader.make
       
    43 include $(EPOCROOT)epoc32$/tools$/makefile_templates$/s60$/mifconv_step3.make
       
    44 
       
    45 ifeq ($(OSTYPE),unix) 
       
    46 MIFCONV:=$(MIFCONV)
       
    47 SVGTBINENCODE:=$(SVGTBINENCODE)
       
    48 else 
       
    49 MIFCONV:=$(MIFCONV)$(DOTEXE)
       
    50 SVGTBINENCODE:=$(SVGTBINENCODE)$(DOTEXE)
       
    51 endif
       
    52 
       
    53 ifeq ($(strip $(MIFCONVDEBUG)),1)
       
    54 $(info <TOOLCAT toolcat='$(TOOLCAT)'/>)
       
    55 $(info <TOOLCOPY toolcopy='$(TOOLCOPY)'/>)
       
    56 $(info <TOOLMKDIR toolmkdir='$(TOOLMKDIR)'/>)
       
    57 $(info <MIFCONV mifconv='$(MIFCONV)'/>)
       
    58 endif
       
    59 
       
    60 ifeq ($(strip $(MIFCONVDEBUG)),1)
       
    61 $(warning MIFCONVOPTS $(MIFCONVOPTS))
       
    62 endif
       
    63 
       
    64 # The groupsvgin10 macro allows us to construct a command file, 10 
       
    65 # svgs/bmps objects at a time to avoid limits on argument lengths and 
       
    66 # sizes on Windows.
       
    67 define groupsvgin10
       
    68 	$(if $1,$(shell echo -e $(foreach L,$(wordlist 1,10,$1),"$(L)\\n") >>$(PARAMFILE)),)
       
    69 	$(if $1,$(call groupsvgin10,$(wordlist 11,$(words $1),$1)),true)
       
    70 endef
       
    71 
       
    72 define generatemif
       
    73 
       
    74 TARGET_$(TARGETFILE):=1
       
    75 MIFCONVOPTS:=$(MIFCONVOPTS)
       
    76 BITMAPS:=$(addsuffix .bmp,$(BITMAPBASESOURCES))
       
    77 
       
    78 BITMAP:: $(BITMAPFILE) $(TARGETFILE)
       
    79 
       
    80 ifeq ($(INIT_CFG),$(PLATFORM)$(CFG))
       
    81 ifneq ($(HEADERFILE),)
       
    82 $(HEADERFILE): $(TARGETFILE)
       
    83 endif
       
    84 endif
       
    85 
       
    86 ifneq ($(BITMAPFILE),)
       
    87 $(BITMAPFILE): $(TARGETFILE)
       
    88 endif
       
    89 
       
    90 
       
    91 $(if $(HEADERFILE),$(shell echo -e "-h$(HEADERFILE)\n-e\n" >$(PARAMFILE)), $(shell echo -e "-e\n" >$(PARAMFILE)) )
       
    92 $(if $(SOURCEDIR),$(shell echo -e "-i$(SOURCEDIR)\n" >>$(PARAMFILE)),)
       
    93 
       
    94 $(call groupsvgin10, $(MIFCONVOPTS))
       
    95 
       
    96 $(TARGETFILE): $(SVGBFILES) $(MIFCONV) $(SVGTBINENCODE) $(BMPFILES) $(MASKFILES)
       
    97 	$(call startrule,mifcompile,FORCESUCCESS) \
       
    98 	$(MIFCONV) $(TARGETFILE) -f$(PARAMFILE) \
       
    99 	$(call endrule,mifcompile)
       
   100 
       
   101 endef
       
   102 
       
   103 ifeq ($(TARGET_$(TARGETFILE)),)
       
   104 $(eval $(call generatemif))
       
   105 endif
       
   106 
       
   107 %-erase :
       
   108 	-$(GNURM) $*
       
   109 
       
   110 # FLM specific block begins
       
   111 CLEAN CLEANMAKEFILE :: $(addsuffix -erase,$(wildcard $(TARGETFILE) $(HEADERFILE) $(BITMAPFILE) $(PARAMFILE) $(patsubst %b,%,$(SVGBFILES)) $(SVGBFILES)))
       
   112 # FLM specific block ends
       
   113 
       
   114 # for the abld -what target 
       
   115 RELEASEABLES:=$(TARGETFILE) $(HEADERFILE) $(BITMAPFILE)
       
   116 $(eval $(call whatmacro,$(RELEASEABLES),WHATBITMAP))