1 | # $Id: Makefile.kmk 46247 2013-05-23 19:19:42Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the storage device & driver testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2012 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | #
|
---|
22 | # vditool - useful too for manipulating VDIs, but now pretty obsolete and
|
---|
23 | # probably will go away soon. Testcase only now.
|
---|
24 | #
|
---|
25 | if defined(VBOX_WITH_TESTCASES) || defined(VBOX_WITH_VDITOOL)
|
---|
26 | PROGRAMS += vditool
|
---|
27 | vditool_TEMPLATE = VBOXR3TSTEXE
|
---|
28 | vditool_LIBS = $(LIB_DDU)
|
---|
29 | vditool_SOURCES = vditool.cpp
|
---|
30 | endif
|
---|
31 |
|
---|
32 | #
|
---|
33 | # Basic testcases for the VD code.
|
---|
34 | #
|
---|
35 | ifdef VBOX_WITH_TESTCASES
|
---|
36 | PROGRAMS += tstVD tstVD-2 tstVDCopy tstVDSnap tstVDShareable
|
---|
37 |
|
---|
38 | tstVD_TEMPLATE = VBOXR3TSTEXE
|
---|
39 | tstVD_SOURCES = tstVD.cpp
|
---|
40 | tstVD_LIBS = $(LIB_DDU)
|
---|
41 |
|
---|
42 | tstVD-2_TEMPLATE = VBOXR3TSTEXE
|
---|
43 | tstVD-2_SOURCES = tstVD-2.cpp
|
---|
44 | tstVD-2_LIBS = $(LIB_DDU)
|
---|
45 |
|
---|
46 | tstVDCopy_TEMPLATE = VBOXR3TSTEXE
|
---|
47 | tstVDCopy_SOURCES = tstVDCopy.cpp
|
---|
48 | tstVDCopy_LIBS = $(LIB_DDU)
|
---|
49 |
|
---|
50 | ifn1of ($(KBUILD_TARGET),win)
|
---|
51 | PROGRAMS += tstVDIo
|
---|
52 |
|
---|
53 | tstVDIo_TEMPLATE = VBOXR3TSTEXE
|
---|
54 | tstVDIo_SOURCES = tstVDIo.cpp \
|
---|
55 | VDIoBackend.cpp \
|
---|
56 | VDIoBackendMem.cpp \
|
---|
57 | VDMemDisk.cpp \
|
---|
58 | VDIoRnd.cpp \
|
---|
59 | VDScript.cpp \
|
---|
60 | VDScriptAst.cpp \
|
---|
61 | VDScriptChecker.cpp \
|
---|
62 | VDScriptInterp.cpp
|
---|
63 | tstVDIo_LIBS = \
|
---|
64 | $(LIB_DDU) \
|
---|
65 | $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
|
---|
66 | endif
|
---|
67 |
|
---|
68 | tstVDSetUuid_TEMPLATE = VBOXR3TSTEXE
|
---|
69 | tstVDSetUuid_LIBS = $(LIB_DDU)
|
---|
70 |
|
---|
71 | tstVDShareable_TEMPLATE = VBOXR3TSTEXE
|
---|
72 | tstVDShareable_LIBS = $(LIB_DDU)
|
---|
73 | tstVDShareable_SOURCES = tstVDShareable.cpp
|
---|
74 |
|
---|
75 | tstVDSnap_TEMPLATE = VBOXR3TSTEXE
|
---|
76 | tstVDSnap_LIBS = $(LIB_DDU)
|
---|
77 | tstVDSnap_SOURCES = tstVDSnap.cpp
|
---|
78 | endif
|
---|
79 |
|
---|
80 | if defined(VBOX_WITH_TESTCASES) || defined(VBOX_WITH_VBOX_IMG)
|
---|
81 | PROGRAMS += vbox-img
|
---|
82 |
|
---|
83 | #
|
---|
84 | # vbox-img - static because it migth be used as at standalone tool.
|
---|
85 | #
|
---|
86 | vbox-img_TEMPLATE = VBOXR3STATIC
|
---|
87 | vbox-img_DEFS += IN_VBOXDDU IN_VBOXDDU_STATIC VBOX_HDD_NO_DYNAMIC_BACKENDS IN_RT_R3
|
---|
88 | vbox-img_SOURCES = \
|
---|
89 | vbox-img.cpp \
|
---|
90 | $(VBOX_PATH_STORAGE_SRC)/VD.cpp \
|
---|
91 | $(VBOX_PATH_STORAGE_SRC)/VDVfs.cpp \
|
---|
92 | $(VBOX_PATH_STORAGE_SRC)/VDI.cpp \
|
---|
93 | $(VBOX_PATH_STORAGE_SRC)/VMDK.cpp \
|
---|
94 | $(VBOX_PATH_STORAGE_SRC)/VHD.cpp \
|
---|
95 | $(VBOX_PATH_STORAGE_SRC)/DMG.cpp \
|
---|
96 | $(VBOX_PATH_STORAGE_SRC)/Parallels.cpp \
|
---|
97 | $(VBOX_PATH_STORAGE_SRC)/ISCSI.cpp \
|
---|
98 | $(VBOX_PATH_STORAGE_SRC)/RAW.cpp \
|
---|
99 | $(VBOX_PATH_STORAGE_SRC)/QED.cpp \
|
---|
100 | $(VBOX_PATH_STORAGE_SRC)/QCOW.cpp \
|
---|
101 | $(VBOX_PATH_STORAGE_SRC)/VHDX.cpp \
|
---|
102 | $(VBOX_PATH_STORAGE_SRC)/VCICache.cpp
|
---|
103 | vbox-img_LIBS = \
|
---|
104 | $(VBOX_LIB_RUNTIME_STATIC)
|
---|
105 | if1of ($(KBUILD_TARGET),os2 win)
|
---|
106 | vbox-img_LIBS += \
|
---|
107 | $(PATH_STAGE_LIB)/VBox-liblzf-static$(VBOX_SUFF_LIB) \
|
---|
108 | $(PATH_STAGE_LIB)/VBox-zlib-static$(VBOX_SUFF_LIB)
|
---|
109 | else
|
---|
110 | vbox-img_LIBS += \
|
---|
111 | $(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB) \
|
---|
112 | $(SDK_VBOX_ZLIB_LIBS)
|
---|
113 | endif
|
---|
114 | ifeq ($(KBUILD_TARGET),linux)
|
---|
115 | vbox-img_LIBS += crypt
|
---|
116 | else if1of ($(KBUILD_TARGET),darwin freebsd)
|
---|
117 | vbox-img_LIBS += iconv
|
---|
118 | else ifeq ($(KBUILD_TARGET),win)
|
---|
119 | vbox-img_SDKS.win = VBOX_NTDLL
|
---|
120 | else ifeq ($(KBUILD_TARGET),solaris)
|
---|
121 | vbox-img_LIBS += kstat
|
---|
122 | endif
|
---|
123 |
|
---|
124 | endif
|
---|
125 |
|
---|
126 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
127 |
|
---|