Changeset 641 for trunk


Ignore:
Timestamp:
Dec 1, 2006, 7:32:45 PM (19 years ago)
Author:
bird
Message:

Resource file compilation.

Location:
trunk/kBuild
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r640 r641  
    977977# @remark       obsoleted by kBuild helpers in kmk. Only required for limited gmake compatbility.
    978978#
    979 define def_target_source_c_cpp_asm_old
    980 #$ (warning dbg: def_target_source_c_cpp_asm: source='$(source)' target='$(target)' type='$(type)')
     979define def_target_source_c_cpp_asm_rc_old
     980#$ (warning dbg: def_target_source_c_cpp_asm_rc_old: source='$(source)' target='$(target)' type='$(type)')
    981981
    982982tool := $(call _SOURCE_TOOL,$(source),$(target),$(type))
     
    13541354#
    13551355#$ (warning dbg: def_target_source_c_cpp_asm: source='$(source)' target='$(target)' type='$(type)')
    1356 def_target_source_c_cpp_asm_new = $(kb-src-one x)
     1356def_target_source_c_cpp_asm_rc_new = $(kb-src-one x)
    13571357
    13581358ifneq ($(filter kb-src-one,$(KMK_FEATURES)),)
    1359 def_target_source_c_cpp_asm_var = def_target_source_c_cpp_asm_new
     1359def_target_source_c_cpp_asm_rc_var = def_target_source_c_cpp_asm_rc_new
    13601360else
    1361 def_target_source_c_cpp_asm_var = def_target_source_c_cpp_asm_old
     1361def_target_source_c_cpp_asm_rc_var = def_target_source_c_cpp_asm_rc_old
    13621362endif
    13631363
     
    13691369type := C
    13701370$(foreach source, $(filter %.c             , $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
    1371    ,$(eval $(value $(def_target_source_c_cpp_asm_var))) )
     1371   ,$(eval $(value $(def_target_source_c_cpp_asm_rc_var))) )
    13721372
    13731373# C++ sources
    13741374type := CXX
    13751375$(foreach source, $(filter %.cpp %.cxx %.xx, $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
    1376         ,$(eval $(value $(def_target_source_c_cpp_asm_var))) )
     1376        ,$(eval $(value $(def_target_source_c_cpp_asm_rc_var))) )
    13771377
    13781378# ASM sources
    13791379type := AS
    13801380$(foreach source, $(filter %.asm %.s %.S   , $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
    1381         ,$(eval $(value $(def_target_source_c_cpp_asm_var))) )
     1381        ,$(eval $(value $(def_target_source_c_cpp_asm_rc_var))) )
     1382
     1383# Resource sources
     1384type := RC
     1385$(foreach source, $(filter %.rc            , $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
     1386        ,$(eval $(value $(def_target_source_c_cpp_asm_rc_var))) )
    13821387
    13831388endef
  • trunk/kBuild/header.kmk

    r640 r641  
    510510## PROPS_TOOLS
    511511# This is a subset of the other PROPS
    512 PROPS_TOOLS := TOOL CTOOL CXXTOOL ASTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL
     512PROPS_TOOLS := TOOL CTOOL CXXTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL
    513513
    514514## PROPS_SINGLE
     
    516516# A Config.kmk file can add it's own properties to this list and kBuild
    517517# will do the necessary inheritance from templates to targets.
    518 PROPS_SINGLE := $(PROPS_TOOLS) INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU FETCHDIR
     518PROPS_SINGLE := $(PROPS_TOOLS) INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU FETCHDIR \
     519        OBJSUFF COBJSUFF CXXOBJSUFF ASOBJSUFF RCOBJSUFF SYSSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF
    519520
    520521## PROPS_DEFERRED
     
    531532        COPTS CFLAGS CDEFS CINCS CXXOPTS CXXFLAGS CXXDEFS CXXINCS \
    532533        ASOPTS ASFLAGS ASDEFS ASINCS \
     534        RCOPTS RCFLAGS RCDEFS RCINCS \
    533535        LDFLAGS LIBS LIBPATH \
    534         SYSSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \
    535536        FETCHFLAGS UNPACKFLAGS PATCHFLAGS
    536537
  • trunk/kBuild/tools/VCC70.kmk

    r448 r641  
    5656TOOL_VCC70_ASOBJSUFF          := .obj
    5757
     58TOOL_VCC70_RC                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70)/bin/rc.exe
     59TOOL_VCC70_RCOBJSUFF          := .res
     60
    5861TOOL_VCC70_AR                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70)/bin/lib.exe
    5962TOOL_VCC70_ARFLAGS            := -nologo
     
    162165
    163166
     167## Compile resource source.
     168# @param    $(target)   Normalized main target name.
     169# @param    $(source)   Source filename (relative).
     170# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
     171# @param    $(dep)      Dependcy file. This shall be (re)created by the compilation.
     172# @param    $(flags)    Flags.
     173# @param    $(defs)     Definitions. No -D or something.
     174# @param    $(incs)     Includes. No -I or something.
     175# @param    $(dirdep)   Directory creation dependency.
     176# @param    $(deps)     Other dependencies.
     177#
     178# @param    $(outbase)  Output basename (full). Use this for list files and such.
     179# @param    $(objsuff)  Object suffix.
     180TOOL_VCC70_COMPILE_RC_OUTPUT =
     181TOOL_VCC70_COMPILE_RC_DEPEND =
     182TOOL_VCC70_COMPILE_RC_DEPORD =
     183define TOOL_VCC70_COMPILE_RC_CMDS
     184        $(TOOL_VCC70_RC) \
     185                $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
     186                /fo$(obj)\
     187                $(subst /,\\,$(call ABSPATH,$(source)))
     188endef
     189
     190
    164191## Link library
    165192# @param    $(target)   Normalized main target name.
     
    172199# @param    $(outbase)  Output basename (full). Use this for list files and such.
    173200#
    174 TOOL_VCC70_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb)
     201TOOL_VCC70_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb) $(outbase).pdb
    175202TOOL_VCC70_LINK_LIBRARY_DEPEND = $(othersrc)
    176203TOOL_VCC70_LINK_LIBRARY_DEPORD =
     
    195222# @param    $(outbase)      Output basename (full). Use this for list files and such.
    196223#
    197 TOOL_VCC70_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb) $(outbase).ilk
     224TOOL_VCC70_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk
    198225TOOL_VCC70_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    199226TOOL_VCC70_LINK_PROGRAM_DEPORD =
     
    225252#
    226253# @param    $(outbase)  Output basename (full). Use this for list files and such.
    227 TOOL_VCC70_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb) $(outbase).ilk
     254TOOL_VCC70_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk
    228255TOOL_VCC70_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    229256TOOL_VCC70_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB))
     
    262289#
    263290# @param    $(outbase)  Output basename (full). Use this for list files and such.
    264 TOOL_VCC70_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb) $(outbase).ilk
     291TOOL_VCC70_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk
    265292TOOL_VCC70_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    266293TOOL_VCC70_LINK_SYSMOD_DEPORD =
  • trunk/kBuild/tools/VCC80AMD64.kmk

    r457 r641  
    22## @file
    33#
    4 # kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005)
     4# kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14)
    55#
    66# Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
     
    5656TOOL_VCC80AMD64_ASOBJSUFF          := .obj
    5757
     58TOOL_VCC80AMD64_RC                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/../rc.exe
     59TOOL_VCC80AMD64_RCOBJSUFF          := .res
     60
    5861TOOL_VCC80AMD64_AR                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/lib.exe /MACHINE:X64
    5962TOOL_VCC80AMD64_ARFLAGS            := -nologo
     
    165168
    166169
     170## Compile resource source.
     171# @param    $(target)   Normalized main target name.
     172# @param    $(source)   Source filename (relative).
     173# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
     174# @param    $(dep)      Dependcy file. This shall be (re)created by the compilation.
     175# @param    $(flags)    Flags.
     176# @param    $(defs)     Definitions. No -D or something.
     177# @param    $(incs)     Includes. No -I or something.
     178# @param    $(dirdep)   Directory creation dependency.
     179# @param    $(deps)     Other dependencies.
     180#
     181# @param    $(outbase)  Output basename (full). Use this for list files and such.
     182# @param    $(objsuff)  Object suffix.
     183TOOL_VCC80AMD64_COMPILE_RC_OUTPUT =
     184TOOL_VCC80AMD64_COMPILE_RC_DEPEND =
     185TOOL_VCC80AMD64_COMPILE_RC_DEPORD =
     186define TOOL_VCC80AMD64_COMPILE_RC_CMDS
     187        $(TOOL_VCC80AMD64_RC) \
     188                $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
     189                /fo$(obj)\
     190                $(subst /,\\,$(call ABSPATH,$(source)))
     191endef
     192
     193
    167194## Link library
    168195# @param    $(target)   Normalized main target name.
     
    175202# @param    $(outbase)  Output basename (full). Use this for list files and such.
    176203#
    177 TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb)
     204TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb) $(outbase).pdb
    178205TOOL_VCC80AMD64_LINK_LIBRARY_DEPEND = $(othersrc)
    179206TOOL_VCC80AMD64_LINK_LIBRARY_DEPORD =
     
    198225# @param    $(outbase)      Output basename (full). Use this for list files and such.
    199226#
    200 TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb) $(outbase).ilk $(out).manifest
     227TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk $(out).manifest
    201228TOOL_VCC80AMD64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    202229TOOL_VCC80AMD64_LINK_PROGRAM_DEPORD =
     
    231258#
    232259# @param    $(outbase)  Output basename (full). Use this for list files and such.
    233 TOOL_VCC80AMD64_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb) $(outbase).ilk $(out).manifest
     260TOOL_VCC80AMD64_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk $(out).manifest
    234261TOOL_VCC80AMD64_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    235262TOOL_VCC80AMD64_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB))
     
    271298#
    272299# @param    $(outbase)  Output basename (full). Use this for list files and such.
    273 TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb) $(outbase).ilk $(out).manifest
     300TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80AMD64_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk $(out).manifest
    274301TOOL_VCC80AMD64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    275302TOOL_VCC80AMD64_LINK_SYSMOD_DEPORD =
  • trunk/kBuild/tools/VCC80X86.kmk

    r440 r641  
    22## @file
    33#
    4 # kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005)
     4# kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14)
    55#
    66# Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
     
    5252TOOL_VCC80X86_ASOBJSUFF          := .obj
    5353
     54TOOL_VCC80X86_RC                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80X86_BIN)/rc.exe
     55TOOL_VCC80X86_RCOBJSUFF          := .res
     56
    5457TOOL_VCC80X86_AR                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80X86_BIN)/lib.exe
    5558TOOL_VCC80X86_ARFLAGS            := -nologo
     
    161164
    162165
     166## Compile resource source.
     167# @param    $(target)   Normalized main target name.
     168# @param    $(source)   Source filename (relative).
     169# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
     170# @param    $(dep)      Dependcy file. This shall be (re)created by the compilation.
     171# @param    $(flags)    Flags.
     172# @param    $(defs)     Definitions. No -D or something.
     173# @param    $(incs)     Includes. No -I or something.
     174# @param    $(dirdep)   Directory creation dependency.
     175# @param    $(deps)     Other dependencies.
     176#
     177# @param    $(outbase)  Output basename (full). Use this for list files and such.
     178# @param    $(objsuff)  Object suffix.
     179TOOL_VCC80X86_COMPILE_RC_OUTPUT =
     180TOOL_VCC80X86_COMPILE_RC_DEPEND =
     181TOOL_VCC80X86_COMPILE_RC_DEPORD =
     182define TOOL_VCC80X86_COMPILE_RC_CMDS
     183        $(TOOL_VCC80X86_RC) \
     184                $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
     185                /fo$(obj)\
     186                $(subst /,\\,$(call ABSPATH,$(source)))
     187endef
     188
     189
    163190## Link library
    164191# @param    $(target)   Normalized main target name.
     
    171198# @param    $(outbase)  Output basename (full). Use this for list files and such.
    172199#
    173 TOOL_VCC80X86_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb)
     200TOOL_VCC80X86_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb) $(outbase).pdb
    174201TOOL_VCC80X86_LINK_LIBRARY_DEPEND = $(othersrc)
    175202TOOL_VCC80X86_LINK_LIBRARY_DEPORD =
     
    194221# @param    $(outbase)      Output basename (full). Use this for list files and such.
    195222#
    196 TOOL_VCC80X86_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb) $(outbase).ilk $(out).manifest
     223TOOL_VCC80X86_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk $(out).manifest
    197224TOOL_VCC80X86_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    198225TOOL_VCC80X86_LINK_PROGRAM_DEPORD =
     
    227254#
    228255# @param    $(outbase)  Output basename (full). Use this for list files and such.
    229 TOOL_VCC80X86_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb) $(outbase).ilk $(out).manifest
     256TOOL_VCC80X86_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk $(out).manifest
    230257TOOL_VCC80X86_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    231258TOOL_VCC80X86_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB))
     
    267294#
    268295# @param    $(outbase)  Output basename (full). Use this for list files and such.
    269 TOOL_VCC80X86_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb) $(outbase).ilk $(out).manifest
     296TOOL_VCC80X86_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC80X86_PDB, $(outbase),pdb) $(outbase).pdb $(outbase).ilk $(out).manifest
    270297TOOL_VCC80X86_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    271298TOOL_VCC80X86_LINK_SYSMOD_DEPORD =
Note: See TracChangeset for help on using the changeset viewer.