Changeset 21812 for branches/gcc-kmk


Ignore:
Timestamp:
Nov 15, 2011, 7:40:01 PM (14 years ago)
Author:
dmik
Message:

Config.kmk: Add support for custom C++ exports to odin_implib macro.

Location:
branches/gcc-kmk
Files:
5 edited

Legend:

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

    r21804 r21812  
    2828# @param 2 .def file (defaults to <1>.def).
    2929# @param 3 .def file for debug (defaults to <2>).
    30 # @param 4 non-empty to disable .def post-processing with ImpDef.
    31 #
    32 odin_implib = $(evalcall odin_implib_common,$(1),$(2),$(3),$(4))
     30# @param 4 list of object files containing additional exports.
     31# @param 5 non-empty to disable .def post-processing with ImpDef.
     32#
     33odin_implib = $(evalcall odin_implib_common,$(1),$(2),$(3),$(4),$(5))
    3334
    3435define odin_implib_common
     
    4041        local def_exp_debug := $(notdir $(basename $(def_debug))).exp.def
    4142endif
    42     local no_def_exp := $(4)
     43    local obj_list := $(4)
     44    local do_def_exp := $(if $(5),,1)
    4345    $(eval $(def_odin_implib))
    4446endef
     
    4850    $(target)_imp_TEMPLATE = OdinCxx
    4951    $(target)_imp_NAME     = $(target)
    50     $$$$($(target)_imp_0_OUTDIR)/$(def_exp): $(def) $$(PATH_STAGE_BIN)/impdef.exe | $$$$(dir $$$$@)
     52    $$$$($(target)_imp_0_OUTDIR)/$(def_exp): $(def) \
     53      $(addsuffix $$$$(TOOL_GXX3OMF_COBJSUFF), \
     54                  $(addprefix $$$$($(target)_0_OUTDIR)/,$(obj_list))) \
     55      $$(PATH_STAGE_BIN)/impdef.exe | $$$$(dir $$$$@)
    5156                %$$(call MSG_TOOL,impdef,$(target)_imp,$(abspath $$<),$$@)
    52                 $(QUIET2)$$(PATH_STAGE_BIN)/impdef.exe $$< $$@
     57ifneq ($(do_def_exp),)
     58                $(QUIET2)$$(PATH_STAGE_BIN)/impdef.exe $(def) $$@
     59else
     60                $(QUIET2)$(CP) $(def) $$@
     61endif
     62ifneq ($(obj_list),)
     63                $(QUIET2)emxexp.exe \
     64                    $(addsuffix $$(TOOL_GXX3OMF_COBJSUFF), \
     65                                $(addprefix $$($(target)_0_OUTDIR)/,$(obj_list))) >> $$@
     66endif
    5367ifeq ($(def_exp_debug),)
    54  ifeq ($(no_def_exp),)
     68 ifneq ($(do_def_exp)$(obj_list),)
    5569    $(target)_imp_SOURCES  = $$($(target)_imp_0_OUTDIR)/$(def_exp)
    5670    $(target)_imp_CLEAN   += $$($(target)_imp_0_OUTDIR)/$(def_exp)
     
    5973 endif
    6074else
    61  ifeq ($(no_def_exp),)
     75 ifneq ($(do_def_exp)$(obj_list),)
    6276    $(target)_imp_SOURCES.release  = $$($(target)_imp_0_OUTDIR)/$(def_exp)
    6377    $(target)_imp_CLEAN.release   += $$($(target)_imp_0_OUTDIR)/$(def_exp)
    64     $$$$($(target)_imp_0_OUTDIR)/$(def_exp_debug): $(def_debug) | $$$$(dir $$$$@)
     78    $$$$($(target)_imp_0_OUTDIR)/$(def_exp_debug): $(def_debug) \
     79        $(addsuffix $$$$(TOOL_GXX3OMF_COBJSUFF), \
     80                    $(addprefix $$$$($(target)_0_OUTDIR)/,$(obj_list))) \
     81        $$(PATH_STAGE_BIN)/impdef.exe | $$$$(dir $$$$@)
    6582                %$$(call MSG_TOOL,impdef,$(target)_imp,$(abspath $$<),$$@)
    66                 $(QUIET2)$$(PATH_STAGE_BIN)/impdef $$< $$@
     83ifneq ($(do_def_exp),)
     84                $(QUIET2)$$(PATH_STAGE_BIN)/impdef.exe $(def_debug) $$@
     85else
     86                $(QUIET2)$(CP) $(def_debug) $$@
     87endif
     88ifneq ($(obj_list),)
     89                $(QUIET2)emxexp.exe \
     90                    $(addsuffix $$(TOOL_GXX3OMF_COBJSUFF), \
     91                                $(addprefix $$($(target)_0_OUTDIR)/,$(obj_list))) >> $$@
     92endif
    6793    $(target)_imp_SOURCES.debug    = $$($(target)_imp_0_OUTDIR)/$(def_exp_debug)
    6894    $(target)_imp_CLEAN.debug     += $$($(target)_imp_0_OUTDIR)/$(def_exp_debug)
     
    75101
    76102##
    77 # Shortcut to $(call odin_implib,<1>,<2>,<3>,1) used to disable .def file
     103# Shortcut to $(call odin_implib,<1>,<2>,<3>,<4>,1) used to disable .def file
    78104# post-processing with the ImpDef tool.
    79105#
     
    81107# @param 2 .def file (defaults to <1>.def).
    82108# @param 3 .def file for debug (defaults to <2>).
    83 #
    84 odin_implib_no_expdef = $(call odin_implib,$(1),$(2),(3),1)
    85 
    86 ##
    87 # Shortcut to $(call odin_implib, <1>, <1>.def, <1>dbg.def).
    88 #
    89 # @param 1 DLL target name.
    90 #
    91 odin_implib_2 = $(call odin_implib,$(1),$(1).def,$(1)dbg.def)
    92 
    93 ##
    94 # Shortcut to $(call odin_implib_no_expdef,<1>,<1>.def,<1>dbg.def).
    95 #
    96 # @param 1 DLL target name.
    97 #
    98 odin_implib_2_no_expdef = $(call odin_implib_no_expdef,$(1),$(1).def,$(1)dbg.def)
     109# @param 4 list of object files containing additional exports.
     110#
     111odin_implib_no_expdef = $(call odin_implib,$(1),$(2),(3),$(4),1)
     112
     113##
     114# Shortcut to $(call odin_implib, <1>,<1>.def,<1>dbg.def,<2>).
     115#
     116# @param 1 DLL target name.
     117# @param 2 list of object files containing additional exports.
     118#
     119odin_implib_2 = $(call odin_implib,$(1),$(1).def,$(1)dbg.def,$(2))
     120
     121##
     122# Shortcut to $(call odin_implib_no_expdef,<1>,<1>.def,<1>dbg.def,<2>).
     123#
     124# @param 1 DLL target name.
     125# @param 2 list of object files containing additional exports.
     126#
     127odin_implib_2_no_expdef = $(call odin_implib_no_expdef,$(1),$(1).def,$(1)dbg.def,$(2))
    99128
    100129#
  • branches/gcc-kmk/src/gdi32/Makefile.kmk

    r21803 r21812  
    66include $(KBUILD_PATH)/subheader.kmk
    77
    8 $(call odin_implib,gdi32)
     8$(call odin_implib_2,gdi32)
    99
    1010DLLS               += gdi32
  • branches/gcc-kmk/src/kernel32/Makefile.kmk

    r21803 r21812  
    1010seh_SOURCES         = seh/sehutil.s
    1111
    12 $(call odin_implib_2,kernel32)
     12$(call odin_implib_2,kernel32,vmutex)
    1313
    1414DLLS               += kernel32
  • branches/gcc-kmk/src/odincrt/Makefile.kmk

    r21794 r21812  
    66include $(KBUILD_PATH)/subheader.kmk
    77
    8 #$(call odin_implib_no_expdef,odincrt,odincrt,odincrtd)
    9 $(call odin_implib,odincrt,odincrt.def,odincrtd.def,1)
     8$(call odin_implib_no_expdef,odincrt,odincrt.def,odincrtd.def)
    109
    1110DLLS               += odincrt
  • branches/gcc-kmk/src/user32/Makefile.kmk

    r21811 r21812  
    66include $(KBUILD_PATH)/subheader.kmk
    77
    8 $(call odin_implib,user32)
     8$(call odin_implib_2,user32)
    99
    1010DLLS               += user32
Note: See TracChangeset for help on using the changeset viewer.