VirtualBox

Changeset 53979 in vbox for trunk/src/VBox/ExtPacks


Ignore:
Timestamp:
Jan 27, 2015 6:34:14 PM (10 years ago)
Author:
vboxsync
Message:

Start building the dtrace wrapper program, the ext pack is disabled for now.

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

Legend:

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

    r47207 r53979  
    55
    66#
    7 # Copyright (C) 2010-2012 Oracle Corporation
     7# Copyright (C) 2010-2016 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    2222 include $(PATH_SUB_CURRENT)/Puel/Makefile.kmk
    2323endif
     24if    defined(VBOX_WITH_EXTPACK_VBOXDTRACE) \
     25   || defined(VBOX_WITH_DTRACE) \
     26   || defined(VBOX_WITH_DTRACE_R3) \
     27   || defined(VBOX_WITH_DTRACE_R0) \
     28   || defined(VBOX_WITH_DTRACE_R0DRV) \
     29   || defined(VBOX_WITH_DTRACE_RC)
     30 include $(PATH_SUB_CURRENT)/VBoxDTrace/Makefile.kmk
     31endif
    2432ifdef VBOX_WITH_EXTPACK_VNC
    2533 include $(PATH_SUB_CURRENT)/VNC/Makefile.kmk
  • trunk/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk

    r53978 r53979  
    4444
    4545
    46 #
    47 # Extend the extension pack templates.
    48 #
    4946ifdef VBOX_WITH_EXTPACK_VBOXDTRACE
     47
     48 #
     49 # Extend the extension pack templates.
     50 #
    5051 TEMPLATE_VBoxR3ExtPackDTrace = For the ring-3 context modules in the VBoxDTrace extension pack.
    5152 TEMPLATE_VBoxR3ExtPackDTrace_EXTENDS = VBoxR3ExtPack
     
    5960 TEMPLATE_VBoxInsExtPackDTrace_EXTENDS = VBoxR0ExtPack
    6061 TEMPLATE_VBoxInsExtPackDTrace_INST = $(INST_EXTPACK_VBOXDTRACE)
    61 endif
    62 
    63 
    64 #
    65 # Install the description.
    66 #
    67 INSTALLS += VBoxDTraceIns
    68 VBoxDTraceIns_TEMPLATE = VBoxInsExtPackDTrace
    69 VBoxDTraceIns_SOURCES = \
    70         $(VBoxDTraceIns_0_OUTDIR)/ExtPack.xml \
    71         COPYING=>ExtPack-SourceCodeLicense.txt
    72 $(call VBOX_EDIT_VERSION_RULE_FN,VBoxDTraceIns,ExtPack.xml)
    73 
    74 
    75 #
    76 # VBoxDTraceMain - The module which the VirtualBox Main API talks to.
    77 #
    78 DLLS += VBoxDTraceMain
    79 VBoxDTraceMain_TEMPLATE = VBoxR3ExtPackDTrace
    80 VBoxDTraceMain_SOURCES = VBoxDTraceMain.cpp
    81 
    82 
    83 #
    84 # The ring-3 VBoxDTrace command implementation (library).
    85 #
    86 DLLS += VBoxDTraceCmd
    87 VBoxDTraceCmd_TEMPLATE = VBoxR3ExtPackDTrace
    88 VBoxDTraceCmd_DEFS = RTMEM_WRAP_TO_EF_APIS
    89 #VBoxDTraceCmd_DEFS += YYDEBUG
    90 VBoxDTraceCmd_SDKS = VBOX_ZLIB
    91 ifn1of ($(KBUILD_TARGET), win)
    92  VBoxDTraceCmd_CFLAGS = -Wno-format -Wno-overlength-strings -Wno-sign-compare -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-shadow
    93 endif
    94 VBoxDTraceCmd_INCS = \
    95         include \
    96         $(VBOXDT_PATH_UTS)/common \
    97         $(VBOXDT_PATH_LIBCTF)/common \
    98         $(VBOXDT_PATH_LIBDTRACE)/common \
    99         $(VBOXDT_PATH_CMN_CTF)
    100 VBoxDTraceCmd_SOURCES = \
    101         $(VBOXDT_PATH_CMD)/dtrace/dtrace.c \
    102         \
    103         $(VBOXDT_PATH_LIBDTRACE)/common/dt_as.c \
    104         $(VBOXDT_PATH_LIBDTRACE)/common/dt_aggregate.c \
    105         $(VBOXDT_PATH_LIBDTRACE)/common/dt_buf.c \
    106         $(VBOXDT_PATH_LIBDTRACE)/common/dt_cc.c \
    107         $(VBOXDT_PATH_LIBDTRACE)/common/dt_cg.c \
    108         $(VBOXDT_PATH_LIBDTRACE)/common/dt_consume.c \
    109         $(VBOXDT_PATH_LIBDTRACE)/common/dt_decl.c \
    110         $(VBOXDT_PATH_LIBDTRACE)/common/dt_dis.c \
    111         $(VBOXDT_PATH_LIBDTRACE)/common/dt_dof.c \
    112         $(VBOXDT_PATH_LIBDTRACE)/common/dt_error.c \
    113         $(VBOXDT_PATH_LIBDTRACE)/common/dt_handle.c \
    114         $(VBOXDT_PATH_LIBDTRACE)/common/dt_ident.c \
    115         $(VBOXDT_PATH_LIBDTRACE)/common/dt_inttab.c \
    116         $(VBOXDT_PATH_LIBDTRACE)/common/dt_list.c \
    117         $(VBOXDT_PATH_LIBDTRACE)/common/dt_map.c \
    118         $(VBOXDT_PATH_LIBDTRACE)/common/dt_module.c \
    119         $(VBOXDT_PATH_LIBDTRACE)/common/dt_program.c \
    120         $(VBOXDT_PATH_LIBDTRACE)/common/dt_open.c \
    121         $(VBOXDT_PATH_LIBDTRACE)/common/dt_options.c \
    122         $(VBOXDT_PATH_LIBDTRACE)/common/dt_parser.c \
    123         $(VBOXDT_PATH_LIBDTRACE)/common/dt_pcb.c \
    124         $(VBOXDT_PATH_LIBDTRACE)/common/dt_pragma.c \
    125         $(VBOXDT_PATH_LIBDTRACE)/common/dt_printf.c \
    126         $(VBOXDT_PATH_LIBDTRACE)/common/dt_proc.c \
    127         $(VBOXDT_PATH_LIBDTRACE)/common/dt_provider.c \
    128         $(VBOXDT_PATH_LIBDTRACE)/common/dt_regset.c \
    129         $(VBOXDT_PATH_LIBDTRACE)/common/dt_string.c \
    130         $(VBOXDT_PATH_LIBDTRACE)/common/dt_strtab.c \
    131         $(VBOXDT_PATH_LIBDTRACE)/common/dt_subr.c \
    132         $(VBOXDT_PATH_LIBDTRACE)/common/dt_work.c \
    133         $(VBOXDT_PATH_LIBDTRACE)/common/dt_xlator.c \
    134         \
    135         $(VBoxDTraceCmd_0_OUTDIR)/dt_errtags.c \
    136         $(VBoxDTraceCmd_0_OUTDIR)/dt_names.c \
    137         \
    138         $(VBOXDT_PATH_CMN_CTF)/ctf_create.c \
    139         $(VBOXDT_PATH_CMN_CTF)/ctf_error.c \
    140         $(VBOXDT_PATH_CMN_CTF)/ctf_decl.c \
    141         $(VBOXDT_PATH_CMN_CTF)/ctf_hash.c \
    142         $(VBOXDT_PATH_CMN_CTF)/ctf_labels.c \
    143         $(VBOXDT_PATH_CMN_CTF)/ctf_lookup.c \
    144         $(VBOXDT_PATH_CMN_CTF)/ctf_open.c \
    145         $(VBOXDT_PATH_CMN_CTF)/ctf_types.c \
    146         $(VBOXDT_PATH_CMN_CTF)/ctf_util.c \
    147         \
    148         $(VBOXDT_PATH_LIBCTF)/common/ctf_subr.c \
    149         $(VBOXDT_PATH_LIBCTF)/common/ctf_lib.c
    150 
    151 if 1
    152  USES                   += yacc
    153  VBoxDTraceCmd_USES     += yacc
    154  VBoxDTraceCmd_YACCTOOL  = BISON
    155  VBoxDTraceCmd_YACCFLAGS = -d -y
    156  VBoxDTraceCmd_SOURCES  += \
    157         $(VBOXDT_PATH_LIBDTRACE)/common/dt_grammar.y
    158  VBoxDTraceCmd_INCS     += $(VBoxDTraceCmd_0_OUTDIR)/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common
    159 else
    160  # TODO: generate these.
    161 endif
    162 
    163 if 1
    164  USES                   += lex
    165  VBoxDTraceCmd_USES     += lex
    166  VBoxDTraceCmd_LEXTOOL   = FLEX
    167  VBoxDTraceCmd_LEXFLAGS  = -l -B #-d -T
    168  VBoxDTraceCmd_DEFS     += USING_FLEX
    169  VBoxDTraceCmd_SOURCES  += \
    170         $(VBOXDT_PATH_LIBDTRACE)/common/dt_lex.l
    171 else
    172  # TODO: generate this.
    173 endif
    174 
    175 VBoxDTraceCmd_LIBS = \
    176         $(LIB_RUNTIME)
     62
     63
     64 #
     65 # Install the description.
     66 #
     67 INSTALLS += VBoxDTraceIns
     68 VBoxDTraceIns_TEMPLATE = VBoxInsExtPackDTrace
     69 VBoxDTraceIns_SOURCES = \
     70        $(VBoxDTraceIns_0_OUTDIR)/ExtPack.xml \
     71        COPYING=>ExtPack-SourceCodeLicense.txt
     72 $(call VBOX_EDIT_VERSION_RULE_FN,VBoxDTraceIns,ExtPack.xml)
     73
     74
     75 #
     76 # VBoxDTraceMain - The module which the VirtualBox Main API talks to.
     77 #
     78 DLLS += VBoxDTraceMain
     79 VBoxDTraceMain_TEMPLATE = VBoxR3ExtPackDTrace
     80 VBoxDTraceMain_SOURCES = VBoxDTraceMain.cpp
     81
     82
     83 #
     84 # The ring-3 VBoxDTrace command implementation (library).
     85 #
     86 DLLS += VBoxDTraceCmd
     87 VBoxDTraceCmd_TEMPLATE = VBoxR3ExtPackDTrace
     88 VBoxDTraceCmd_DEFS = RTMEM_WRAP_TO_EF_APIS
     89 #VBoxDTraceCmd_DEFS += YYDEBUG
     90 VBoxDTraceCmd_SDKS = VBOX_ZLIB
     91 ifn1of ($(KBUILD_TARGET), win)
     92  VBoxDTraceCmd_CFLAGS = -Wno-format -Wno-overlength-strings -Wno-sign-compare -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-shadow
     93 endif
     94 VBoxDTraceCmd_INCS = \
     95        include \
     96        $(VBOXDT_PATH_UTS)/common \
     97        $(VBOXDT_PATH_LIBCTF)/common \
     98        $(VBOXDT_PATH_LIBDTRACE)/common \
     99        $(VBOXDT_PATH_CMN_CTF)
     100 VBoxDTraceCmd_SOURCES = \
     101        $(VBOXDT_PATH_CMD)/dtrace/dtrace.c \
     102        \
     103        $(VBOXDT_PATH_LIBDTRACE)/common/dt_as.c \
     104        $(VBOXDT_PATH_LIBDTRACE)/common/dt_aggregate.c \
     105        $(VBOXDT_PATH_LIBDTRACE)/common/dt_buf.c \
     106        $(VBOXDT_PATH_LIBDTRACE)/common/dt_cc.c \
     107        $(VBOXDT_PATH_LIBDTRACE)/common/dt_cg.c \
     108        $(VBOXDT_PATH_LIBDTRACE)/common/dt_consume.c \
     109        $(VBOXDT_PATH_LIBDTRACE)/common/dt_decl.c \
     110        $(VBOXDT_PATH_LIBDTRACE)/common/dt_dis.c \
     111        $(VBOXDT_PATH_LIBDTRACE)/common/dt_dof.c \
     112        $(VBOXDT_PATH_LIBDTRACE)/common/dt_error.c \
     113        $(VBOXDT_PATH_LIBDTRACE)/common/dt_handle.c \
     114        $(VBOXDT_PATH_LIBDTRACE)/common/dt_ident.c \
     115        $(VBOXDT_PATH_LIBDTRACE)/common/dt_inttab.c \
     116        $(VBOXDT_PATH_LIBDTRACE)/common/dt_list.c \
     117        $(VBOXDT_PATH_LIBDTRACE)/common/dt_map.c \
     118        $(VBOXDT_PATH_LIBDTRACE)/common/dt_module.c \
     119        $(VBOXDT_PATH_LIBDTRACE)/common/dt_program.c \
     120        $(VBOXDT_PATH_LIBDTRACE)/common/dt_open.c \
     121        $(VBOXDT_PATH_LIBDTRACE)/common/dt_options.c \
     122        $(VBOXDT_PATH_LIBDTRACE)/common/dt_parser.c \
     123        $(VBOXDT_PATH_LIBDTRACE)/common/dt_pcb.c \
     124        $(VBOXDT_PATH_LIBDTRACE)/common/dt_pragma.c \
     125        $(VBOXDT_PATH_LIBDTRACE)/common/dt_printf.c \
     126        $(VBOXDT_PATH_LIBDTRACE)/common/dt_proc.c \
     127        $(VBOXDT_PATH_LIBDTRACE)/common/dt_provider.c \
     128        $(VBOXDT_PATH_LIBDTRACE)/common/dt_regset.c \
     129        $(VBOXDT_PATH_LIBDTRACE)/common/dt_string.c \
     130        $(VBOXDT_PATH_LIBDTRACE)/common/dt_strtab.c \
     131        $(VBOXDT_PATH_LIBDTRACE)/common/dt_subr.c \
     132        $(VBOXDT_PATH_LIBDTRACE)/common/dt_work.c \
     133        $(VBOXDT_PATH_LIBDTRACE)/common/dt_xlator.c \
     134        \
     135        $(VBoxDTraceCmd_0_OUTDIR)/dt_errtags.c \
     136        $(VBoxDTraceCmd_0_OUTDIR)/dt_names.c \
     137        \
     138        $(VBOXDT_PATH_CMN_CTF)/ctf_create.c \
     139        $(VBOXDT_PATH_CMN_CTF)/ctf_error.c \
     140        $(VBOXDT_PATH_CMN_CTF)/ctf_decl.c \
     141        $(VBOXDT_PATH_CMN_CTF)/ctf_hash.c \
     142        $(VBOXDT_PATH_CMN_CTF)/ctf_labels.c \
     143        $(VBOXDT_PATH_CMN_CTF)/ctf_lookup.c \
     144        $(VBOXDT_PATH_CMN_CTF)/ctf_open.c \
     145        $(VBOXDT_PATH_CMN_CTF)/ctf_types.c \
     146        $(VBOXDT_PATH_CMN_CTF)/ctf_util.c \
     147        \
     148        $(VBOXDT_PATH_LIBCTF)/common/ctf_subr.c \
     149        $(VBOXDT_PATH_LIBCTF)/common/ctf_lib.c
     150
     151 if 1
     152  USES                   += yacc
     153  VBoxDTraceCmd_USES     += yacc
     154  VBoxDTraceCmd_YACCTOOL  = BISON
     155  VBoxDTraceCmd_YACCFLAGS = -d -y
     156  VBoxDTraceCmd_SOURCES  += \
     157        $(VBOXDT_PATH_LIBDTRACE)/common/dt_grammar.y
     158  VBoxDTraceCmd_INCS     += $(VBoxDTraceCmd_0_OUTDIR)/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common
     159 else
     160  # TODO: generate these.
     161 endif
     162
     163 if 1
     164  USES                   += lex
     165  VBoxDTraceCmd_USES     += lex
     166  VBoxDTraceCmd_LEXTOOL   = FLEX
     167  VBoxDTraceCmd_LEXFLAGS  = -l -B #-d -T
     168  VBoxDTraceCmd_DEFS     += USING_FLEX
     169  VBoxDTraceCmd_SOURCES  += \
     170        $(VBOXDT_PATH_LIBDTRACE)/common/dt_lex.l
     171 else
     172  # TODO: generate this.
     173 endif
     174
     175 VBoxDTraceCmd_LIBS = \
     176        $(LIB_RUNTIME)
    177177
    178178
    179179# Generate sources
    180 $$(VBoxDTraceCmd_0_OUTDIR)/dt_errtags.c: \
    181                 $(VBOXDT_PATH_LIBDTRACE)/common/dt_errtags.h \
    182                 $(VBOXDT_PATH_LIBDTRACE)/common/mkerrtags.sed \
    183                 | $$(dir $$@)
     180 $$(VBoxDTraceCmd_0_OUTDIR)/dt_errtags.c: \
     181                $(VBOXDT_PATH_LIBDTRACE)/common/dt_errtags.h \
     182                $(VBOXDT_PATH_LIBDTRACE)/common/mkerrtags.sed \
     183                | $$(dir $$@)
    184184        $(MSG_GENERATE,VBoxDTraceCmd,$@,$<)
    185185        $(SED) -n -f $(VBOXDT_PATH_LIBDTRACE)/common/mkerrtags.sed --output $@ $<
    186186
    187 $$(VBoxDTraceCmd_0_OUTDIR)/dt_names.c: \
    188                 $(VBOXDT_PATH_UTS)/common/sys/dtrace.h \
    189                 $(VBOXDT_PATH_LIBDTRACE)/common/mknames.sed \
    190                 | $$(dir $$@)
     187 $$(VBoxDTraceCmd_0_OUTDIR)/dt_names.c: \
     188                $(VBOXDT_PATH_UTS)/common/sys/dtrace.h \
     189                $(VBOXDT_PATH_LIBDTRACE)/common/mknames.sed \
     190                | $$(dir $$@)
    191191        $(MSG_GENERATE,VBoxDTraceCmd,$@,$<)
    192192        $(SED) -n -f $(VBOXDT_PATH_LIBDTRACE)/common/mknames.sed --output $@ $<
    193193
    194194
    195 #
    196 # Source not used or wanted: \
    197 #       $(VBOXDT_PATH_LIBDTRACE)/common/dt_link.c
    198 #       $(VBOXDT_PATH_LIBDTRACE)/common/dt_pid.c
    199 #
    200 
    201 
    202 #
    203 # The ring-0 part of VBoxDTrace.
    204 #
    205 SYSMODS += VBoxDTraceR0
    206 VBoxDTraceR0_TEMPLATE = VBoxR0ExtPackDTrace
    207 VBoxDTraceR0_DEFS = IN_VBOXDTRACE_R0 IN_RT_R0
    208 ifeq ($(VBOX_LDR_FMT),elf)
    209  VBoxDTraceR0_LDFLAGS = -e ModuleInit
    210 endif
    211 VBoxDTraceR0_INCS = \
    212         include \
    213         $(VBOXDT_PATH_UTS)/common
    214 VBoxDTraceR0_SOURCES = \
    215         VBoxDTraceR0.cpp \
    216         VBoxDTraceR0A.asm \
    217         $(VBOXDT_PATH_UTS)/common/dtrace/dtrace.c
    218 VBoxDTraceR0_LIBS = \
    219         $(PATH_STAGE_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
    220 ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
    221  VBoxDTraceR0_LIBS += \
    222         $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
    223 endif
    224 
    225 
    226 #
    227 # Packing.
    228 #
    229 ifndef VBOX_WITHOUT_EXTPACK_VBOXDTRACE_PACKING
    230  PACKING += $(VBOX_PATH_PACKAGES)/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack
    231 endif
    232 
    233 ifndef VBOX_WITH_EXTPACK_OS_ARCHS
    234  ifeq ($(USER),bird) # for now
    235   VBOX_WITH_EXTPACK_OS_ARCHS = $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
    236  endif
    237 endif
    238 
    239 # Build the file list.  The macro takes 1=darwin.x86, 2=dist/VirtualBox.app/Contents/MacOS, 3=dylib
    240 VBOX_VBOXDTRACE_FILES_MACRO = \
    241         $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)/$(1)/VBoxDTraceMain.$(3)=>$(1)/VBoxDTraceMain.$(3) \
    242         $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)/$(1)/VBoxDTraceCmd.$(3)=>$(1)/VBoxDTraceCmd.$(3) \
    243         $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)/$(1)/VBoxDTraceR0.r0=>$(1)/VBoxDTraceR0.r0
    244 
    245 VBOX_VBOXDTRACE_FILES := \
    246         $(VBOX_PATH_EXTPACK_VBOXDTRACE)/ExtPack.xml=>ExtPack.xml \
    247         $(VBOX_PATH_EXTPACK_VBOXDTRACE)/ExtPack-SourceCodeLicense.txt=>ExtPack-SourceCodeLicense.txt
    248 
    249 if1of (darwin.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    250  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,darwin.amd64,dist/VirtualBox.app/Contents/MacOS,dylib)
    251 endif
    252 if1of (darwin.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    253  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,darwin.x86,dist/VirtualBox.app/Contents/MacOS,dylib)
    254 endif
    255 if1of (freebsd.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    256  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,freebsd.amd64,bin,so)
    257 endif
    258 if1of (freebsd.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    259  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,freebsd.x86,bin,so)
    260 endif
    261 if1of (linux.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    262  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,linux.amd64,bin,so)
    263 endif
    264 if1of (linux.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    265  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,linux.x86,bin,so)
    266 endif
    267 if1of (os2.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    268  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,os2.x86,bin,so)
    269 endif
    270 if1of (solaris.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    271  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,solaris.amd64,bin,so)
    272 endif
    273 if1of (solaris.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    274  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,solaris.x86,bin,so)
    275 endif
    276 if1of (win.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    277  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,win.amd64,bin,dll)
    278 endif
    279 if1of (win.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    280  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,win.x86,bin,dll)
    281 endif
    282 
    283 # Pack it all up using a temporary staging directory.
    284 $(VBOX_PATH_PACKAGES)/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack: \
    285                 $$(foreach file, $$(VBOX_VBOXDTRACE_FILES), $$(firstword $$(subst =>,$$(SP),$$(file)))) \
    286                 | $(VBOX_PATH_PACKAGES)/
     195 #
     196 # Source not used or wanted: \
     197 #      $(VBOXDT_PATH_LIBDTRACE)/common/dt_link.c
     198 #      $(VBOXDT_PATH_LIBDTRACE)/common/dt_pid.c
     199 #
     200
     201
     202 #
     203 # The ring-0 part of VBoxDTrace.
     204 #
     205 SYSMODS += VBoxDTraceR0
     206 VBoxDTraceR0_TEMPLATE = VBoxR0ExtPackDTrace
     207 VBoxDTraceR0_DEFS = IN_VBOXDTRACE_R0 IN_RT_R0
     208 ifeq ($(VBOX_LDR_FMT),elf)
     209  VBoxDTraceR0_LDFLAGS = -e ModuleInit
     210 endif
     211 VBoxDTraceR0_INCS = \
     212        include \
     213        $(VBOXDT_PATH_UTS)/common
     214 VBoxDTraceR0_SOURCES = \
     215        VBoxDTraceR0.cpp \
     216        VBoxDTraceR0A.asm \
     217        $(VBOXDT_PATH_UTS)/common/dtrace/dtrace.c
     218 VBoxDTraceR0_LIBS = \
     219        $(PATH_STAGE_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
     220 ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
     221  VBoxDTraceR0_LIBS += \
     222        $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
     223 endif
     224
     225
     226 #
     227 # Packing.
     228 #
     229 ifndef VBOX_WITHOUT_EXTPACK_VBOXDTRACE_PACKING
     230  PACKING += $(VBOX_PATH_PACKAGES)/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack
     231 endif
     232
     233 ifndef VBOX_WITH_EXTPACK_OS_ARCHS
     234  ifeq ($(USER),bird) # for now
     235   VBOX_WITH_EXTPACK_OS_ARCHS = $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
     236  endif
     237 endif
     238
     239 # Build the file list.  The macro takes 1=darwin.x86, 2=dist/VirtualBox.app/Contents/MacOS, 3=dylib
     240 VBOX_VBOXDTRACE_FILES_MACRO = \
     241        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)/$(1)/VBoxDTraceMain.$(3)=>$(1)/VBoxDTraceMain.$(3) \
     242        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)/$(1)/VBoxDTraceCmd.$(3)=>$(1)/VBoxDTraceCmd.$(3) \
     243        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)/$(1)/VBoxDTraceR0.r0=>$(1)/VBoxDTraceR0.r0
     244
     245 VBOX_VBOXDTRACE_FILES := \
     246        $(VBOX_PATH_EXTPACK_VBOXDTRACE)/ExtPack.xml=>ExtPack.xml \
     247        $(VBOX_PATH_EXTPACK_VBOXDTRACE)/ExtPack-SourceCodeLicense.txt=>ExtPack-SourceCodeLicense.txt
     248
     249 if1of (darwin.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     250  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,darwin.amd64,dist/VirtualBox.app/Contents/MacOS,dylib)
     251 endif
     252 if1of (darwin.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     253  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,darwin.x86,dist/VirtualBox.app/Contents/MacOS,dylib)
     254 endif
     255 if1of (freebsd.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     256  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,freebsd.amd64,bin,so)
     257 endif
     258 if1of (freebsd.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     259  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,freebsd.x86,bin,so)
     260 endif
     261 if1of (linux.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     262  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,linux.amd64,bin,so)
     263 endif
     264 if1of (linux.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     265  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,linux.x86,bin,so)
     266 endif
     267 if1of (os2.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     268  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,os2.x86,bin,so)
     269 endif
     270 if1of (solaris.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     271  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,solaris.amd64,bin,so)
     272 endif
     273 if1of (solaris.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     274  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,solaris.x86,bin,so)
     275 endif
     276 if1of (win.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     277  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,win.amd64,bin,dll)
     278 endif
     279 if1of (win.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
     280  VBOX_VBOXDTRACE_FILES += $(call VBOX_VBOXDTRACE_FILES_MACRO,win.x86,bin,dll)
     281 endif
     282
     283 # Pack it all up using a temporary staging directory.
     284 $(VBOX_PATH_PACKAGES)/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack: \
     285                $$(foreach file, $$(VBOX_VBOXDTRACE_FILES), $$(firstword $$(subst =>,$$(SP),$$(file)))) \
     286                | $(VBOX_PATH_PACKAGES)/
    287287        $(RM) -f $(wildcard $(VBOX_PATH_PACKAGES)/$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)-*.vbox-extpack) \
    288288                $(VBoxDTraceIns_0_OUTDIR)/ExtPack.manifest \
    289289                $(VBoxDTraceIns_0_OUTDIR)/ExtPack.signature
    290 # Stage all the files
     290 # Stage all the files
    291291        $(RM) -Rf $(VBoxDTraceIns_0_OUTDIR)/Stage/
    292292        $(foreach file, $(VBOX_VBOXDTRACE_FILES),\
    293293                $(NLTAB)$(MKDIR) -p $(dir $(lastword $(subst =>,$(SP)$(VBoxDTraceIns_0_OUTDIR)/Stage/,$(file)))) \
    294294                $(NLTAB)$(CP) $(subst =>,$(SP)$(VBoxDTraceIns_0_OUTDIR)/Stage/,$(file)) )
    295 # Create the manifest
     295 # Create the manifest
    296296        $(VBOX_RTMANIFEST) \
    297297                --manifest $(VBoxDTraceIns_0_OUTDIR)/Stage/ExtPack.manifest \
     
    302302                $(VBoxDTraceIns_0_OUTDIR)/Stage/ExtPack.manifest \
    303303                $(VBoxDTraceIns_0_OUTDIR)/Stage/ExtPack.signature
    304 # Tar it up.
     304 # Tar it up.
    305305        tar -cvf - -C $(VBoxDTraceIns_0_OUTDIR)/Stage/ . | gzip -9c > $@
    306 # Clean up
     306 # Clean up
    307307        $(RM) -Rf $(VBoxDTraceIns_0_OUTDIR)/Stage/
    308308
    309 BLDDIRS += $(VBOX_PATH_PACKAGES)/
    310 
     309 BLDDIRS += $(VBOX_PATH_PACKAGES)/
     310
     311endif # VBOX_WITH_EXTPACK_VBOXDTRACE
    311312
    312313include $(FILE_KBUILD_SUB_FOOTER)
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