sbsv2/raptor/lib/flm/tracecompiler.mk
branchwip
changeset 342 f0e42ff3359f
parent 293 5bbbb5fd2a8a
child 300 e87b08dc4b44
equal deleted inserted replaced
341:4fd571a5fb6a 342:f0e42ff3359f
     1 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1 # Copyright (c) 2009-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".
    11 # Contributors:
    11 # Contributors:
    12 #
    12 #
    13 # Description:
    13 # Description:
    14 # Run Trace Compiler on source files to generate trace headers and decode files
    14 # Run Trace Compiler on source files to generate trace headers and decode files
    15 
    15 
       
    16 # Set project name as <mmp_name>
    16 TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
    17 TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
       
    18 
       
    19 TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
       
    20 
    17 # Find out TRACE_PATH
    21 # Find out TRACE_PATH
       
    22 # first look for .*/traces/traces_<target_name>_<target_extension>
       
    23 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces/traces_$(TARGET)_$(TARGETEXT),$(DIR))))
       
    24 
       
    25 ifneq ($(TRACE_PATH),)
       
    26 # set project name as <target_name>_<target_extension> instead of <mmp_name>
       
    27 TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
       
    28 endif
       
    29 
       
    30 # if not found look for .*/traces_<mmp_name>
       
    31 ifeq ($(TRACE_PATH),)
    18 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
    32 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
       
    33 endif
       
    34 
       
    35 # if not found look for .*/traces
    19 ifeq ($(TRACE_PATH),)
    36 ifeq ($(TRACE_PATH),)
    20 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
    37 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
    21 endif
    38 endif
       
    39 
       
    40 # if not found look for .*/traces_<target_name>_<target_type>
    22 ifeq ($(TRACE_PATH),)
    41 ifeq ($(TRACE_PATH),)
    23 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
    42 TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
    24 # Use target name instead of mmp file name
    43 # set project name as <target_name>_<target_type> instead of <mmp_name>
    25 TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
    44 TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
    26 endif
    45 endif
    27 
    46 
    28 TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME)_0x$(UID_TC)_Dictionary.xml
    47 # initialise (so what output will be correct if we don't actually run the TC)
    29 AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/$(TRACE_PRJNAME)_0x$(UID_TC)_TraceDefinitions.h
    48 TRACE_DICTIONARY:=
       
    49 AUTOGEN_HEADER:=
    30 
    50 
    31 $(if $(FLMDEBUG),$(info <debug>TRACE_PATH = $(TRACE_PATH)</debug>))
    51 $(if $(FLMDEBUG),$(info <debug>TRACE_PATH = $(TRACE_PATH)</debug>))
    32 
    52 
    33 # Run trace compiler only if TRACE_PATH exists
    53 # Run trace compiler only if TRACE_PATH exists
    34 ifneq ($(TRACE_PATH),)
    54 ifneq ($(TRACE_PATH),)
    49 
    69 
    50 $(TRACE_HEADERS): $(TRACE_MARKER)
    70 $(TRACE_HEADERS): $(TRACE_MARKER)
    51 
    71 
    52 ifeq ($(GUARD_$(call sanitise,$(TRACE_MARKER))),)
    72 ifeq ($(GUARD_$(call sanitise,$(TRACE_MARKER))),)
    53 GUARD_$(call sanitise,$(TRACE_MARKER)):=1
    73 GUARD_$(call sanitise,$(TRACE_MARKER)):=1
       
    74 
       
    75 TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME)_0x$(UID_TC)_Dictionary.xml
       
    76 AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/$(TRACE_PRJNAME)_0x$(UID_TC)_TraceDefinitions.h
    54 
    77 
    55 JAVA_COMMAND:=$(SBS_JAVATC)
    78 JAVA_COMMAND:=$(SBS_JAVATC)
    56 TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
    79 TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
    57 TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
    80 TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
    58 
    81