sbsv2/raptor/lib/flm/build.flm
changeset 0 044383f39525
child 3 e1eecf4d390d
child 590 360bd6b35136
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of the License "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description:
       
    14 #
       
    15 #
       
    16 
       
    17 # Parameters:
       
    18 # COMPONENT_PATHS
       
    19 # CONFIGS
       
    20 #
       
    21 
       
    22 CREATABLEPATHS:=
       
    23 CLEANTARGETS:=
       
    24 
       
    25 .PHONY:: PP_EXPORTS
       
    26 
       
    27 
       
    28 SBS := $(subst \,/,$(SBS_HOME)/bin/sbs)
       
    29 
       
    30 define doexports
       
    31 PP_EXPORTS::
       
    32 	$(call startrule,makefile_generation_exports) \
       
    33 	export TALON_DESCRAMBLE=0; \
       
    34 	$(SBS) --export-only $(component_list) $(config_list) -f- -m $(SBS_BUILD_DIR)/makefiles_export.mk $(cli_options)  --mo=DESCRAMBLE:=  --mo=TALON_DESCRAMBLE:=0 | $(GNUSED) 's#]I*]>#XXX#' \
       
    35 	$(call endrule,makefile_generation_exports)
       
    36 
       
    37 CLEANTARGETS:=$$(CLEANTARGETS) $(SBS_BUILD_DIR)/makefiles_export.mk
       
    38 endef
       
    39 
       
    40 # Generate makefiles for particular bldinf
       
    41 # $(1) = source target source target......
       
    42 define generate_makefiles
       
    43 
       
    44 $$(info XXX component_list=$(COMPONENT_PATHS) makefile=$(MAKEFILE_PATH))
       
    45 
       
    46 ifeq ($(NO_BUILD),1)
       
    47 ALL:: $(MAKEFILE_PATH)
       
    48 else
       
    49 include $(MAKEFILE_PATH)
       
    50 endif
       
    51 
       
    52 $(MAKEFILE_PATH): $(COMPONENT_PATHS) | PP_EXPORTS 
       
    53 	$(call startrule,makefile_generation) \
       
    54 	export TALON_DESCRAMBLE=0; \
       
    55 	$(SBS) --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- --mo=DESCRAMBLE:= --mo=TALON_DESCRAMBLE:=0  | $(GNUSED) 's#\]\][>]#XXX#' && \
       
    56 	$(MAKE) -j 8 -f $$@.resource_deps \
       
    57 	$(call endrule,makefile_generation)
       
    58 
       
    59 CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH) 
       
    60 
       
    61 endef
       
    62 
       
    63 # Create config list for commands
       
    64 config_list:=$(addprefix -c ,$(CONFIGS))
       
    65 component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
       
    66 $(info COMFIG_LIST: $(config_list))
       
    67 
       
    68 $(eval $(doexports))
       
    69 
       
    70 # Create the Makefiles
       
    71 $(eval $(call generate_makefiles))
       
    72 
       
    73 $(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
       
    74 $(call makepath,$(CREATABLEPATHS))
       
    75