sbsv2/raptor/lib/flm/bitmap.flm
branchfix
changeset 266 23ff30e04b42
parent 260 6956be913ed6
equal deleted inserted replaced
265:904ed405cc3f 266:23ff30e04b42
     1 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 # Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 # All rights reserved.
     2 # All rights reserved.
     3 # This component and the accompanying materials are made available
     3 # This component and the accompanying materials are made available
     4 # under the terms of the License "Eclipse Public License v1.0"
     4 # under the terms of the License "Eclipse Public License v1.0"
     5 # which accompanies this distribution, and is available
     5 # which accompanies this distribution, and is available
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
   116 
   116 
   117 ifneq ($(MBMCOPYFILES),)
   117 ifneq ($(MBMCOPYFILES),)
   118 $(eval $(call copybitmap))
   118 $(eval $(call copybitmap))
   119 endif
   119 endif
   120 
   120 
   121 ################################### localisation #########################################
       
   122 ## copy .bmp files to localisation
       
   123 
       
   124 # $(BMPFILES) is a list of bmp files in src
       
   125 BMPFILES:=$(subst FILE=,,$(filter FILE=%,$(SOURCE)))
       
   126 BMBASENAME:=$(call lowercase,$(basename $(BMTARGET)))
       
   127 BMPCOPYFILES:=
       
   128 BMPCOPYDIR:=$(EPOCROOT)/epoc32/localisation/$(BMBASENAME)/mbm
       
   129 $(call makepath,$(BMPCOPYDIR))
       
   130 
       
   131 define copyBMP
       
   132 # $(1) is the source .bmp file
       
   133 # $(2) is the (lower cased) copy in localisation 
       
   134 
       
   135 ifneq ($(BINCOPYDIRS),)
       
   136 BITMAP:: $(2)
       
   137 
       
   138 $(2): $(1)
       
   139 	$(call startrule,bmpfilecopy,FORCESUCCESS) \
       
   140 	$(GNUCP) $(1) $(2) && $(GNUCHMOD) +rw $(2) \
       
   141 	$(call endrule,bmpfilecopy)
       
   142 	
       
   143 endif
       
   144 
       
   145 BMPCOPYFILES:=$$(BMPCOPYFILES) $(2)
       
   146 endef
       
   147 
       
   148 $(foreach BMP,$(BMPFILES),$(eval $(call copyBMP,$(BMP),$(BMPCOPYDIR)/$(call lowercase,$(notdir $(BMP))))))
       
   149 
       
   150 ## create and edit info files for bitmap files in localisation/group
       
   151 INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(BMBASENAME).info
       
   152 DEPTH:=$(subst DEPTH=,,$(filter DEPTH=%,$(SOURCE)))
       
   153 BMP:=$(notdir $(BMPFILES))
       
   154 DEPTHBMP:=$(subst _,\,$(join $(patsubst %,/%,$(DEPTH)),$(patsubst %,_%,$(BMP))))
       
   155 
       
   156 define bmpInfo
       
   157 
       
   158 BITMAP::$(INFOFILE)
       
   159 
       
   160 $(INFOFILE)::
       
   161 	@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
       
   162 	@if [ ! -f $$@ ]; then echo "DATADIR: /$(BMBASENAME)" > $$@ ; fi
       
   163 	@echo -e "\n/z$(TARGETPATH)/$(BMTARGET) : $(DEPTHBMP)" >> $$@
       
   164 endef
       
   165 
       
   166 $(eval $(call bmpInfo))
       
   167 
       
   168 # end of localisation #########################################################
       
   169 
   121 
   170 ## Clean up
   122 ## Clean up
   171 $(call raptor_clean,$(CLEANTARGETS))
   123 $(call raptor_clean,$(CLEANTARGETS))
   172 $(call makepath,$(CREATABLEPATHS))
   124 $(call makepath,$(CREATABLEPATHS))
   173 $(call makepathfor,$(BITMAPHEADER))
   125 $(call makepathfor,$(BITMAPHEADER))
   174 
   126 
   175 # for the abld -what target
   127 # for the abld -what target
   176 BMPRELEASEABLES:=$(RELEASEABLES) $(MBMCOPYFILES) $(BMPCOPYFILES) $(INFOFILE)
   128 BMPRELEASEABLES:=$(RELEASEABLES) $(MBMCOPYFILES)
   177 $(call raptor_release,$(BMPRELEASEABLES),BITMAP)
   129 $(call raptor_release,$(BMPRELEASEABLES),BITMAP)
   178 
   130