VirtualBox

Changeset 6752 in vbox


Ignore:
Timestamp:
Feb 2, 2008 7:21:42 AM (17 years ago)
Author:
vboxsync
Message:

Converted to sub-makefiles so we can build webservices in parallel with the other stuff (req. 0.1.3 binaries).

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r6511 r6752  
    1818
    1919DEPTH = ../../..
    20 include $(PATH_KBUILD)/header.kmk
    21 
    22 SUBDIRS_AFTER    = testcase
    23 ifdef VBOX_WITH_WEBSERVICES
    24  SUBDIRS_AFTER  += webservice
    25 endif
    26 
    27 ifndef VBOX_OSE
    28  DEFS           += VBOX_WITH_E1000
    29 endif
    30 
    31 LIBRARIES        = VBoxCOM
    32 DLLS             = VBoxSettings VBoxC
    33 PROGRAMS         = VBoxSVC
     20include $(PATH_KBUILD)/subheader.kmk
     21
     22# The KMK_OPTS_JOBS is a kmk v0.1.3 feature. Fake it for now.
     23ifndef KMK_OPTS_JOBS
     24 KMK_OPTS_JOBS = 1
     25endif
     26
     27# Include sub-makefile(s) first if we're doing parallel building.
     28# This is primarily a hack to try avoid idling all but one cpu when
     29# building the gigant soap sources.
     30ifneq ($(KMK_OPTS_JOBS),1)
     31 ifndef VBOX_OSE
     32  include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
     33 endif
     34 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
     35endif
     36
     37# targets++
     38LIBRARIES       += VBoxCOM
     39DLLS            += VBoxSettings VBoxC
     40PROGRAMS        += VBoxSVC
     41VBOX_MAIN_DEFS   =
    3442ifneq ($(BUILD_TARGET),win)
    3543 ifndef VBOX_WITH_XPCOM
     
    3846 DLLS           += VBoxSVCM
    3947 ifneq ($(BUILD_TARGET),os2)
    40   DEFS          += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
     48  VBOX_MAIN_DEFS+= VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
    4149 endif
    42  DEFS           += VBOX_WITH_UNIXY_TAP_NETWORKING
    43 endif
    44 
     50 VBOX_MAIN_DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
     51endif
     52ifndef VBOX_OSE
     53VBOX_MAIN_DEFS  += VBOX_WITH_E1000
     54endif
     55## @todo eliminate or expand VBOX_MAIN_DEFS.
     56
     57#PROGRAMS        += tstCFGLdr
    4558
    4659ifeq ($(BUILD_TARGET),win)
    47  OTHERS          = $(PATH_BIN)/comregister.cmd
     60 OTHERS         += $(PATH_BIN)/comregister.cmd
    4861 IDLFILE         = $(VBOX_PATH_SDK)/idl/VirtualBox.idl
    49  OTHER_CLEAN     = \
    50         $(PATH_BIN)/comregister.cmd \
    51     $(VBOX_PATH_SDK)/include/VirtualBox.h \
    52     $(IDLFILE) \
    53     $(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
    54     $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
    55     $(PATH_VBoxCOM)/VirtualBox.h \
    56     $(PATH_VBoxCOM)/VirtualBox_i.c \
    57     $(PATH_VBoxCOM)/VirtualBox.tlb
     62 OTHER_CLEAN    += \
     63        $(PATH_BIN)/comregister.cmd \
     64        $(VBOX_PATH_SDK)/include/VirtualBox.h \
     65        $(IDLFILE) \
     66        $(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
     67        $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
     68        $(PATH_VBoxCOM)/VirtualBox.h \
     69        $(PATH_VBoxCOM)/VirtualBox_i.c \
     70        $(PATH_VBoxCOM)/VirtualBox.tlb
    5871else
    59  INSTALLS        = xpcom-components
     72 INSTALLS       += xpcom-components
    6073 IDLFILE         = $(VBOX_PATH_SDK)/idl/VirtualBox_XPCOM.idl
    6174 ifeq ($(BUILD_TARGET),linux)
     
    6578 endif
    6679 IDLHEADER       = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
    67  OTHERS          = $(IDLTYPELIB)
    68  OTHER_CLEAN     = \
     80 OTHERS         += $(IDLTYPELIB)
     81 OTHER_CLEAN    += \
    6982    $(IDLFILE) \
    7083    $(IDLHEADER) \
    7184    $(IDLTYPELIB)
    7285
     86endif
     87
     88# Include sub-makefile(s) last if we're not doing parallel building.
     89ifeq ($(KMK_OPTS_JOBS),1)
     90 ifndef VBOX_OSE
     91  include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk
     92 endif
     93 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
    7394endif
    7495
     
    99120# VBoxSVC executable
    100121#
    101 
    102122VBoxSVC_TEMPLATE = VBOXMAINEXE
    103 VBoxSVC_DEFS = VBOX_MAIN_SETTINGS_ADDONS
     123VBoxSVC_DEFS = VBOX_MAIN_SETTINGS_ADDONS $(VBOX_MAIN_DEFS)
    104124ifdef VBOX_WITH_VRDP
    105125VBoxSVC_DEFS += VBOX_VRDP
     
    236256# VBoxSVC wrapper module
    237257#
    238 
    239258ifdef VBOX_WITH_XPCOM
    240259
     
    243262VBoxSVCM_INST           = $(INST_BIN)components/
    244263endif
    245 VBoxSVCM_DEFS           = IN_RING3
     264VBoxSVCM_DEFS           = IN_RING3 $(VBOX_MAIN_DEFS)
    246265VBoxSVCM_INCS           = \
    247266        include \
     
    267286# VBoxC module
    268287#
    269 
    270288VBoxC_TEMPLATE = VBOXMAINDLL
    271289ifneq ($(filter-out linux win,$(BUILD_TARGET)),)
     
    273291endif
    274292
    275 VBoxC_DEFS = IN_RING3
     293VBoxC_DEFS = IN_RING3 $(VBOX_MAIN_DEFS)
    276294VBoxC_DEFS += VBOX_COM_INPROC
    277295
     
    390408# VBoxSettings
    391409#
    392 
    393410VBoxSettings_TEMPLATE   = VBOXMAINDLL
    394411VBoxSettings_NAME       = $(basename $(notdir $(LIB_SETTINGS)))
     
    406423# VBoxCOM - COM Abstraction Layer library
    407424#
    408 
    409425VBoxCOM_TEMPLATE        = VBOXMAINLIB
    410426VBoxCOM_SOURCES         = \
     
    519535
    520536# generate
    521 include $(PATH_KBUILD)/footer.kmk
     537include $(PATH_KBUILD)/subfooter.kmk
    522538
    523539
     
    573589#
    574590# What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
    575 $(PATH_VBoxCOM)/VirtualBox_i.c: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
     591$(PATH_VBoxCOM)/VirtualBox_i.c \
     592+ $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
     593+ $(PATH_VBoxCOM)/VirtualBox.h \
     594+ $(VBOX_PATH_SDK)/include/VirtualBox.h \
     595+ $(PATH_VBoxCOM)/VirtualBox.tlb \
     596+ $(VBOX_PATH_SDK)/lib/VirtualBox.tlb: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
    576597        $(MAIN_IDL) $(IDL_DEFS) \
    577598                /out $(subst /,\\,$(PATH_VBoxCOM)) \
  • trunk/src/VBox/Main/testcase/Makefile.kmk

    r5999 r6752  
    1616#
    1717
    18 DEPTH = ../../../..
    19 include $(PATH_KBUILD)/header.kmk
     18DEPTH ?= ../../../..
     19SUB_DEPTH = ..
     20include $(PATH_KBUILD)/subheader.kmk
    2021
    2122ifdef VBOX_WITH_TESTCASES
    22  PROGRAMS       = tstAPI
    23  PROGRAMS.linux = tstVBoxAPILinux
    24  PROGRAMS.win   = tstVBoxAPIWin
     23 PROGRAMS       += tstAPI
     24 PROGRAMS.linux += tstVBoxAPILinux
     25 PROGRAMS.win   += tstVBoxAPIWin
    2526else ifeq ($(USERNAME),dmik)
    26  PROGRAMS       = tstAPI
    27  PROGRAMS.linux = tstVBoxAPILinux
    28  PROGRAMS.win   = tstVBoxAPIWin
     27 PROGRAMS       += tstAPI
     28 PROGRAMS.linux += tstVBoxAPILinux
     29 PROGRAMS.win   += tstVBoxAPIWin
    2930endif # VBOX_WITH_TESTCASES
    3031
    31 INSTALLS = samples
     32INSTALLS += samples
    3233
    3334#
     
    5051tstAPI_TEMPLATE = VBOXMAINCLIENTEXE
    5152tstAPI_SOURCES  = tstAPI.cpp
     53ifeq ($(BUILD_TARGET),win) ## @todo just add this to the template.
     54tstAPI_DEPS     = $(VBOX_PATH_SDK)/include/VirtualBox.h
     55else
     56tstAPI_DEPS     = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
     57endif
     58
    5259
    5360#
     
    6572tstVBoxAPILinux_LIBPATH  = $(LIBPATH_XPCOM)
    6673tstVBoxAPILinux_LIBS     = $(LIB_XPCOM)
     74tstVBoxAPILinux_DEPS     = \
     75        $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
    6776
    6877#
     
    7382        tstVBoxAPIWin.cpp \
    7483        $(PATH_BIN)/sdk/lib/VirtualBox_i.c
     84tstVBoxAPIWin_DEPS     = \
     85        $(VBOX_PATH_SDK)/include/VirtualBox.h
    7586
    7687# generate rules.
    77 include $(PATH_KBUILD)/footer.kmk
     88include $(PATH_KBUILD)/subfooter.kmk
    7889
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