Changeset 83 for trunk/kBuild/footer.kmk


Ignore:
Timestamp:
Jun 1, 2004, 4:36:56 PM (21 years ago)
Author:
bird
Message:

..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r81 r83  
    3434
    3535# all targets.
    36 ALL_TARGETS := $(LIBRARIES) $(PROGRAMS) $(DLLS) $(DRIVERS) $(OTHERS)
     36ALL_TARGETS := $(LIBRARIES) $(PROGRAMS) $(DLLS) $(SYSMODS) $(OTHERS)
    3737
    3838# dependency files.
     
    4949_DLLS   :=
    5050_EXES   :=
     51_SYSMODS:=
    5152_DIRS   :=
    5253
     
    694695
    695696#
    696 # DRIVERS
    697 #
     697# SYSMODS
     698#
     699
     700## System moduler (one).
     701# @param    $(target)   Normalized target (program) name.
     702define def_sysmod
     703# source -> object
     704$(eval $(def_target_sources))
     705
     706# library
     707$(eval tool        := $(call _TARGET_TOOL,$(target),LD))
     708$(eval flags       :=\
     709        $(TOOL_$(tool)_LDFLAGS)\
     710        $(TOOL_$(tool)_LDFLAGS.$(BUILD_TYPE))\
     711        $(LDFLAGS)\
     712        $(LDFLAGS.$(BUILD_TYPE))\
     713        $($(target)_LDFLAGS)\
     714        $($(target)_LDFLAGS.$(BUILD_TYPE))\
     715)
     716$(eval syssuff     := $(firstword $($(target)_SYSSUFF) $($(target)_SYSSUFF) $(TOOL_$(tool)_LDSYSSUFF) $(SUFF_SYS)))
     717$(eval outbase     := $(call _TARGET_BASE,$(target),$(target)))
     718$(eval sys         := $(outbase)$(syssuff))
     719$(eval objs         = $(_OBJS_$(target)))
     720$(eval libs        :=\
     721        $($(target)_LIBS.$(BUILD_TYPE))\
     722        $($(target)_LIBS)\
     723        $(LIBS.$(BUILD_TYPE))\
     724        $(LIBS)\
     725        $(TOOL_$(tool)_LIBS.$(BUILD_TYPE))\
     726        $(TOOL_$(tool)_LIBS)\
     727)
     728$(eval libpath    :=\
     729        $($(target)_LIBPATH.$(BUILD_TYPE))\
     730        $($(target)_LIBPATH)\
     731        $(LIBPATH.$(BUILD_TYPE))\
     732        $(LIBPATH)\
     733        $(TOOL_$(tool)_LIBPATH.$(BUILD_TYPE))\
     734        $(TOOL_$(tool)_LIBPATH)\
     735)
     736$(eval dirdep      := $(dir $(sys)).dir_created)
     737## @todo fix dependencies
     738$(eval deps        := )
     739#
     740$(eval deffile    := $(strip $(firstword
     741        $($(target)_DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\
     742        $($(target)_DEFFILE.$(BUILD_TARGET))\
     743        $($(target)_DEFFILE.$(BUILD_TYPE))\
     744        $($(target)_DEFFILE)\
     745        $(DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\
     746        $(DEFFILE.$(BUILD_TARGET))\
     747        $(DEFFILE.$(BUILD_TYPE))\
     748        $(DEFFILE)\
     749)))
     750$(eval custom_pre    := $(strip $(firstword
     751        $($(target)_CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\
     752        $($(target)_CUSTOM_PRE.$(BUILD_TARGET))\
     753        $($(target)_CUSTOM_PRE.$(BUILD_TYPE))\
     754        $($(target)_CUSTOM_PRE)\
     755        $(CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\
     756        $(CUSTOM_PRE.$(BUILD_TARGET))\
     757        $(CUSTOM_PRE.$(BUILD_TYPE))\
     758        $(CUSTOM_PRE)\
     759)))
     760$(eval custom_post    := $(strip $(firstword
     761        $($(target)_CUSTOM_POST.$(BUILD_TARGET).$(BUILD_TYPE))\
     762        $($(target)_CUSTOM_POST.$(BUILD_TARGET))\
     763        $($(target)_CUSTOM_POST.$(BUILD_TYPE))\
     764        $($(target)_CUSTOM_POST)\
     765        $(CUSTOM_POST.$(BUILD_TARGET).$(BUILD_TYPE))\
     766        $(CUSTOM_POST.$(BUILD_TARGET))\
     767        $(CUSTOM_POST.$(BUILD_TYPE))\
     768        $(CUSTOM_POST)\
     769)))
     770
     771$(eval $(TOOL_$(tool)_LINK_SYSMOD))
     772
     773_OBJS += $(_OBJS_$(target))
     774_SYSMODS += $(sys)
     775_OUT_FILES += $(sys)
     776endef
     777
     778# Process libraries
     779$(foreach target, $(SYSMODS), $(eval $(def_sysmod)))
    698780
    699781
     
    713795# Directories.
    714796#
    715 _OUTPUT_FILES := $(_OBJS) $(_LIBS) $(_EXES) $(_DLLS)
     797_OUTPUT_FILES := $(_OBJS) $(_LIBS) $(_EXES) $(_DLLS) $(_SYSMODS)
    716798_DIRFILES := $(sort $(addsuffix /.dir_created,$(_DIRS)) $(addsuffix .dir_created,$(dir $(_OUTPUT_FILES))))
    717799
     
    805887
    806888## PASS: binaries
    807 # This pass builds binary targets, i.e. programs, dlls, drivers and stuff.
    808 pass_binaries_doit: $(_DLLS) $(_EXES) $(_KMODS) $(_OTHER_BINARIES)
     889# This pass builds binary targets, i.e. programs, dlls, system modules and stuff.
     890pass_binaries_doit: $(_DLLS) $(_EXES) $(_SYSMODS) $(_OTHER_BINARIES)
    809891pass := binaries
    810892PASS := BINARIES
     
    812894
    813895## PASS: others
    814 # This pass builds binary targets, i.e. programs, dlls, drivers and stuff.
     896# This pass builds other targets.
    815897pass_others_doit: $(_OTHERS)
    816898pass := others
     
    872954programs:  $(_EXES)
    873955dlls:      $(_DLLS)     
    874 kernelmodules: $(_KMODS)
     956sysmods:   $(_SYSMODS)
    875957
    876958
Note: See TracChangeset for help on using the changeset viewer.