sbsv2/raptor/lib/flm/msvctools.flm
branchwip
changeset 457 9bebdb95e0de
parent 385 cc1110af33a3
equal deleted inserted replaced
455:6cc6d1d59188 457:9bebdb95e0de
     1 # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 # Copyright (c) 2008-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".
    26 
    26 
    27 # make the output directories while reading makefile - some build engines prefer this
    27 # make the output directories while reading makefile - some build engines prefer this
    28 $(call makepath,$(RELEASEPATH))
    28 $(call makepath,$(RELEASEPATH))
    29 $(call makepath,$(BUILDPATH))
    29 $(call makepath,$(BUILDPATH))
    30 
    30 
    31 RELEASEABLES:=$(RELEASEABLES) $(RELEASETARGET)
    31 RELEASABLES:=$(RELEASABLES) $(RELEASETARGET)
    32 
    32 
    33 GENDEBUGINFO:=$(if $(findstring deb,$(VARIANTTYPE)),1,)
    33 GENDEBUGINFO:=$(if $(findstring deb,$(VARIANTTYPE)),1,)
    34 
    34 
    35 # MSVC "no space" arguments must take the form /<ARG><PATH_WITH_DOS_SLASHES> e.g.
    35 # MSVC "no space" arguments must take the form /<ARG><PATH_WITH_DOS_SLASHES> e.g.
    36 # 	/FoF:\object\file\to\be\created.obj
    36 # 	/FoF:\object\file\to\be\created.obj
    55 PINCLUDE:=$(OPT.PREINCLUDE)$(notdir $(PRODUCT_INCLUDE))
    55 PINCLUDE:=$(OPT.PREINCLUDE)$(notdir $(PRODUCT_INCLUDE))
    56 INCLUDES:=$(PINCLUDE) $(UINCLUDE) $(SINCLUDE)
    56 INCLUDES:=$(PINCLUDE) $(UINCLUDE) $(SINCLUDE)
    57 
    57 
    58 # macros
    58 # macros
    59 DEFINES:=$(call makemacrodef,$(OPT.DEFINE),$(CDEFS) $(BASE_MACRO) $(CFLAGS.ADD))
    59 DEFINES:=$(call makemacrodef,$(OPT.DEFINE),$(CDEFS) $(BASE_MACRO) $(CFLAGS.ADD))
    60 
       
    61 # other
       
    62 PDBFILE:=$(if $(GENDEBUGINFO),$(RELEASEPATH)/$(TARGET).pdb,)
       
    63 CLEANTARGETS:=$(CLEANTARGETS) $(PDBFILE)
       
    64 
    60 
    65 #compile
    61 #compile
    66 define msvctoolscompile
    62 define msvctoolscompile
    67   $(BUILDPATH)/$(basename $(notdir $(1))).obj: $(1) $(PROJECT_META) $(if $(HAVE_ORDERONLY),|,)  EXPORT
    63   $(BUILDPATH)/$(basename $(notdir $(1))).obj: $(1) $(PROJECT_META) $(if $(HAVE_ORDERONLY),|,)  EXPORT
    68 	$(call startrule,msvctoolscompile,,$(1)) \
    64 	$(call startrule,msvctoolscompile,,$(1)) \
    69 	$(CC) \
    65 	$(CC) \
    70 	$(if $(findstring staticlib,$(BASE_TYPE)),,$(CFLAGS.LIB)) \
    66 	$(if $(findstring staticlib,$(BASE_TYPE)),,$(CFLAGS.LIB)) \
    71 	$(CFLAGS) $$(subst /,-,$(OPTION_MSVC)) \
    67 	$(CFLAGS) $$(subst /,-,$(OPTION_MSVC)) \
    72 	$(if $(findstring /W,$(OPTION_MSVC)),,$(CFLAGS.DEFAULT.WARNLEVEL)) \
    68 	$(if $(findstring /W,$(OPTION_MSVC)),,$(CFLAGS.DEFAULT.WARNLEVEL)) \
    73 	$(if $(PDBFILE),$$(call msvcformatarg,$(OPT.PDBFILE),$(PDBFILE)),) \
       
    74 	$(DEFINES) $(INCLUDES) \
    69 	$(DEFINES) $(INCLUDES) \
    75 	$$(call msvcformatarg,$(OPT.BROWSEFILE),$(BUILDPATH)/$(basename $(notdir $(1))).sbr) \
    70 	$$(call msvcformatarg,$(OPT.BROWSEFILE),$(BUILDPATH)/$(basename $(notdir $(1))).sbr) \
    76 	$$(call msvcformatarg,$(OPT.OBJECTFILE),$$@) $(1) \
    71 	$$(call msvcformatarg,$(OPT.OBJECTFILE),$$@) $(1) \
    77 	$(call endrule,msvctoolscompile)
    72 	$(call endrule,msvctoolscompile)
    78 endef
    73 endef
   154 ## INSTALL ##
   149 ## INSTALL ##
   155 #############
   150 #############
   156 
   151 
   157 ifneq ($(INSTALLPATH),)
   152 ifneq ($(INSTALLPATH),)
   158   INSTALLTARGET:=$(INSTALLPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
   153   INSTALLTARGET:=$(INSTALLPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
   159   RELEASEABLES:=$(RELEASEABLES) $(INSTALLTARGET)
   154   RELEASABLES:=$(RELEASABLES) $(INSTALLTARGET)
   160 
   155 
   161   define msvctoolsinstall
   156   define msvctoolsinstall
   162     $(INSTALLTARGET): $(RELEASETARGET)
   157     $(INSTALLTARGET): $(RELEASETARGET)
   163 	  $(call startrule,msvctoolsinstall) \
   158 	  $(call startrule,msvctoolsinstall) \
   164 	  $(GNUCP) $$< $$@ && \
   159 	  $(GNUCP) $$< $$@ && \
   177 
   172 
   178 ifneq ($(GENDEBUGINFO),)
   173 ifneq ($(GENDEBUGINFO),)
   179   BSCFILE:=$(RELEASEPATH)/$(TARGET).bsc
   174   BSCFILE:=$(RELEASEPATH)/$(TARGET).bsc
   180   BSCRESPONSEFILE:=$(BUILDPATH)/$(TARGET).brf
   175   BSCRESPONSEFILE:=$(BUILDPATH)/$(TARGET).brf
   181   CLEANTARGETS:=$(CLEANTARGETS) $(BSCRESPONSEFILE)
   176   CLEANTARGETS:=$(CLEANTARGETS) $(BSCRESPONSEFILE)
   182   RELEASEABLES:=$(RELEASEABLES) $(BSCFILE)
   177   RELEASABLES:=$(RELEASABLES) $(BSCFILE)
   183 
   178 
   184   define msvctoolsgenbrowse  
   179   define msvctoolsgenbrowse  
   185     $(BSCFILE): $(OBJFILES)
   180     $(BSCFILE): $(OBJFILES)
   186 	  @echo "" > $(BSCRESPONSEFILE);
   181 	  @echo "" > $(BSCRESPONSEFILE);
   187 	  $(call groupin10infile,$(BSCRESPONSEFILE),$(SBRFILES)) ;
   182 	  $(call groupin10infile,$(BSCRESPONSEFILE),$(SBRFILES)) ;
   195 endif
   190 endif
   196 
   191 
   197 
   192 
   198 # Global targets
   193 # Global targets
   199 .PHONY:: $(ALLTARGET)
   194 .PHONY:: $(ALLTARGET)
   200 $(ALLTARGET):: $(RELEASEABLES)
   195 $(ALLTARGET):: $(RELEASABLES)
   201 TARGET:: $(RELEASEABLES)
   196 TARGET:: $(RELEASABLES)
   202 
   197 
   203 ifeq ($(BASE_TYPE),staticlib)
   198 ifeq ($(BASE_TYPE),staticlib)
   204   LIBRARY:: $(RELEASETARGET) $(INSTALLTARGET)
   199   LIBRARY:: $(RELEASETARGET) $(INSTALLTARGET)
   205 endif
   200 endif
   206 
   201