sbsv2/raptor/lib/flm/tools2exe.flm
changeset 13 c327db0664bb
parent 2 39c28ec933dd
child 28 b8fa7dfeeaa1
equal deleted inserted replaced
12:5e7562f67577 13:c327db0664bb
     1 # Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 # Copyright (c) 2006-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".
    14 # Function-Like Makefile to build a TOOLS2 EXE with gcc
    14 # Function-Like Makefile to build a TOOLS2 EXE with gcc
    15 # 
    15 # 
    16 #
    16 #
    17 
    17 
    18 ## Outputs - externally relevant targets that this FLM generates
    18 ## Outputs - externally relevant targets that this FLM generates
    19 ifeq ($(OSTYPE),cygwin)
    19 ifeq ($(filter win,$(HOSTPLATFORM)),win)
    20 SYSTEMLIBS:=$(LIBS.WIN32)
    20 SYSTEMLIBS:=$(LIBS.WIN32)
    21 else
    21 else
       
    22 ifneq ($(TOOLS2WIN32),)
       
    23 # Build win32 tools in Linux 
       
    24 SYSTEMLIBS:=$(LIBS.WIN32)
       
    25 else
       
    26 # Build linux tools in Linux
    22 SYSTEMLIBS:=$(LIBS.LINUX)
    27 SYSTEMLIBS:=$(LIBS.LINUX)
    23 endif
    28 endif
       
    29 endif
       
    30 
    24 
    31 
    25 EXETARGET:=$(RELEASEPATH)/$(TARGET)$(DOTEXE)
    32 EXETARGET:=$(RELEASEPATH)/$(TARGET)$(DOTEXE)
    26 
    33 
       
    34 INSTALLED:=
    27 ifneq ($(TOOLSPATH),)
    35 ifneq ($(TOOLSPATH),)
    28 INSTALLED:=$(TOOLSPATH)/$(TARGET)$(DOTEXE)
    36 INSTALLED:=$(TOOLSPATH)/$(TARGET)$(DOTEXE)
    29 endif
    37 endif
    30 
    38 
    31 ## Target groups
    39 ## Target groups
    32 RELEASEABLES:=$(INSTALLED)
    40 RELEASABLES:=$(INSTALLED)
    33 TARGETS:=$(EXETARGET) $(INSTALLED)
    41 TARGETS:=$(EXETARGET) $(INSTALLED)
    34 
    42 
    35 ## Common build steps (compiling and cleaning)
    43 ## Common build steps (compiling and cleaning)
    36 include $(FLMHOME)/tools2common.flm
    44 include $(FLMHOME)/tools2common.flm
    37 
    45 
    49 ## Link executable
    57 ## Link executable
    50 # get OBJECTFILES from call to tools2common
    58 # get OBJECTFILES from call to tools2common
    51 define tools2linkexe
    59 define tools2linkexe
    52 $(EXETARGET): $(OBJECTFILES) $(STATICLIBS)
    60 $(EXETARGET): $(OBJECTFILES) $(STATICLIBS)
    53 	$(call startrule,tools2linkexe) \
    61 	$(call startrule,tools2linkexe) \
    54 	$(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) \
    62 	$(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) $(LINKER_OPTIONS) \
    55 	$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \
    63 	$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \
    56 	$(call endrule,tools2linkexe)
    64 	$(call endrule,tools2linkexe)
    57 
    65 
    58 endef
    66 endef
    59 
    67