VirtualBox

Changeset 83 in kBuild for trunk


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

..

Location:
trunk/kBuild
Files:
3 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
  • trunk/kBuild/header.kmk

    r78 r83  
    8484BUILD_PLATFORM      := win32
    8585endif
    86 ifeq ($(BUILD_PLATFORM),WIN32)
     86ifeq ($(BUILD_PLATFORM),win32)
    8787_BUILD_PLATFORM_OK  := 1
    8888endif
     
    180180ifeq ($(BUILD_PLATFORM),os2)
    181181PATH_TOOLS          := $(PATH_TOOLS_OS2)
    182 EXEC_X86_WIN32      := $(PATH_TOOLS)/bin/innopec.exe
     182EXEC_X86_WIN32      := innopec.exe
    183183HOSTSUFF_EXE        := .exe
    184184endif
  • trunk/kBuild/tools/VCC70.kmk

    r82 r83  
    5050TOOL_VCC70_ASOBJSUFF          := .obj
    5151
    52 TOOL_VCC70_AR                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70)/bin/ar$(HOSTSUFF_EXE)
     52TOOL_VCC70_AR                 := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70)/bin/lib.exe
    5353TOOL_VCC70_ARFLAGS            := -nologo
    5454TOOL_VCC70_ARLIBSUFF          := .lib
     
    7878        $(TOOL_VCC70_CC) -c\
    7979                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    80                 -Fo:$$@\
     80                -Fo$$@\
    8181                $(PATH_CURRENT)/$(source)               
    8282               
     
    102102        $(TOOL_VCC70_CXX) -c\
    103103                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    104                 -Fo:$$@\
     104                -Fo$$@\
    105105                $(PATH_CURRENT)/$(source)               
    106106               
     
    156156endef
    157157
     158
     159## Link system module (windows aka driver, linux aka kernel module)
     160# @param    $(target)   Normalized main target name.
     161# @param    $(sys)              System module name.
     162# @param    $(objs)     Object files to link together.
     163# @param    $(libs)     Libraries to search.
     164# @param    $(libpath)  Library search paths.
     165# @param    $(flags)    Flags.
     166# @param        $(dirdep)   Directory creation dependency.
     167# @param        $(deps)         Other dependencies.
     168# @param        $(deffile)  Definition file. (optional, PC only)
     169# @param        $(custom_pre)   Custom step invoked before linking.
     170# @param        $(custom_post)  Custom step invoked after linking.
     171#
     172# @param    $(outbase)  Output basename (full). Use this for list files and such.
     173define TOOL_VCC70_LINK_SYSMOD
     174$(warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     175$(sys): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps)
     176        $(call MSG_L1,Creating Program $$@)
     177ifneq ($(custom_pre),)
     178        $(eval $(custom_pre))
     179endif   
     180        $(TOOL_VCC70_LD) $(flags) \
     181                /OUT:$$@ $(objs) \
     182                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
     183ifneq ($(custom_post),)
     184        $(eval $(custom_post))
     185endif   
     186       
     187endef
     188
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette