Ignore:
Timestamp:
Oct 27, 2011, 12:34:53 AM (14 years ago)
Author:
dmik
Message:

Add handler to compile .asm files with the MASM-compilant tool.

This is necessary to overwrite GAS used by default for .asm files in the
GCC toolschains.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/Config.kmk

    r21748 r21749  
    1414endef
    1515
     16# Override handler for .asm files to compile them with the MASM-compilant tool
     17KBUILD_SRC_HANDLERS := .asm:def_src_handler_masm $(KBUILD_SRC_HANDLERS)
     18define def_src_handler_masm
     19local type := $(if $(TOOL_$(tool)_COMPILE_MASM_CMDS),MASM,AS)
     20 $(kb-src-one 2)
     21endef
     22
    1623#------------------------------------------------------------------------------
    1724# Tools
     
    2027# Add support for Wine RC to the GCC compiler
    2128TOOL_GXX3OMF_WRC                = $(PATH_STAGE_BIN)/winerc.exe
    22 TOOL_GXX3OMF_WRCOBJSUFF         = .o
     29TOOL_GXX3OMF_WRCOBJSUFF         = $(TOOL_GXX3OMF_COBJSUFF)
    2330TOOL_GXX3OMF_COMPILE_WRC_OUTPUT = $(outbase).orc.s
    2431TOOL_GXX3OMF_COMPILE_WRC_DEPEND =
     
    3441                | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
    3542        $(subst $(source),$(TOOL_GXX3OMF_COMPILE_WRC_OUTPUT),$(TOOL_GXX3OMF_COMPILE_AS_CMDS))
     43endef
     44
     45TOOL_GXX3OMF_MASM                   = $(firstword $(PATH_TOOL_ALP) alp.exe)
     46TOOL_GXX3OMF_MASMFLAGS              = -Mb
     47TOOL_GXX3OMF_COMPILE_MASM_OUTPUT    = $(outbase).lst
     48TOOL_GXX3OMF_COMPILE_MASM_DEPEND    =
     49TOOL_GXX3OMF_COMPILE_MASM_DEPORD    =
     50define TOOL_GXX3OMF_COMPILE_MASM_CMDS
     51        $(QUIET)$(TOOL_GXX3OMF_MASM)\
     52                $(flags) $(addsuffix /,$(addprefix -I:, $(incs))) $(addprefix -D:, $(defs))\
     53                $(source)\
     54                -Fl:$(outbase).lst\
     55                -Fd:$(dep)\
     56                -Fo:$(obj)
    3657endef
    3758
Note: See TracChangeset for help on using the changeset viewer.