1 | # $Id: makefile.tstVBoxAPIWin 96407 2022-08-22 17:43:14Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # tstVBoxAPILinux makefile
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2022 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | #
|
---|
29 | # Several assumptions and propositions:
|
---|
30 | # - Visual Studio has already installed on machine or you already have nmake.exe, cl.exe, link.exe
|
---|
31 | # - Windows SDK has already installed on machine or you already have Uuid.Lib Ole32.Lib OleAut32.Lib OleDlg.Lib
|
---|
32 | # - VirtualBox SDK was downloaded and was placed into folder where VirtualBox had been installed.
|
---|
33 | # - nmake is a default tool that builds projects based on commands contained in this description file
|
---|
34 | # - cl is cl.exe - Windows compiler
|
---|
35 | # - link is link.exe - Windows linker
|
---|
36 | # - all needed paths have been set in working environment. It means that when you type "cl" from the console,
|
---|
37 | # Windows shall find cl.exe by using enviroment variable PATH or something similar.
|
---|
38 | #
|
---|
39 | # The best way to accomplish it is to run a script vcvars32.bat located in the Visual studio "bin" directory.
|
---|
40 | # This script installs needed paths in your working environment.
|
---|
41 | # Important!!!
|
---|
42 | # Script vcvars32.bat sets up needed paths only for local console session.
|
---|
43 | # For permanent using, needed paths must be added globally.
|
---|
44 | #
|
---|
45 | # Several possible examples of paths:
|
---|
46 | # VS_INSTALL_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\"
|
---|
47 | # VS_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
|
---|
48 | # WIN_SDK_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"
|
---|
49 | # WIN_SDK_LIB_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64\"
|
---|
50 | # VB_INSTALL_PATH = "C:\Program Files\Oracle\VirtualBox"
|
---|
51 | #
|
---|
52 |
|
---|
53 |
|
---|
54 | CXX = cl
|
---|
55 | LINK = link
|
---|
56 | PATH_MSCOM = ../../../bindings/mscom
|
---|
57 | INCS_MSCOM = $(PATH_MSCOM)/include
|
---|
58 | LIBS_MSCOM = $(PATH_MSCOM)/lib
|
---|
59 |
|
---|
60 | LIBS_DEPS = "Uuid.Lib" "Ole32.Lib" "OleAut32.Lib" "OleDlg.Lib"
|
---|
61 |
|
---|
62 | tstVBoxAPIWin_SOURCES = $(LIBS_MSCOM)/VirtualBox_i.c
|
---|
63 | tstVBoxAPIWin_DEPS = $(INCS_MSCOM)
|
---|
64 |
|
---|
65 | COMPILER_CMDLINE = /Zi /nologo /W3 /WX- /Od /Oy- /Gm /EHsc /RTC1 /GS /fp:precise /Gd /analyze- /errorReport:queue
|
---|
66 |
|
---|
67 | LINKER_CMDLINE = /INCREMENTAL /DEBUG /SUBSYSTEM:CONSOLE
|
---|
68 |
|
---|
69 | # default linking
|
---|
70 | tstVBoxAPIWin.exe: tstVBoxAPIWin.obj VirtualBox_i.obj
|
---|
71 | $(LINK) /out:tstVBoxAPIWin.exe $** $(LIBS_DEPS)
|
---|
72 |
|
---|
73 | # default compilation
|
---|
74 | tstVBoxAPIWin.obj:
|
---|
75 | $(CXX) /c /I$(INCS_MSCOM) tstVBoxAPIWin.cpp
|
---|
76 |
|
---|
77 | # default compilation
|
---|
78 | VirtualBox_i.obj:
|
---|
79 | $(CXX) /c /I$(INCS_MSCOM) $(tstVBoxAPIWin_SOURCES)
|
---|
80 |
|
---|
81 | # linking with defined linker's options
|
---|
82 | #tstVBoxAPIWin.exe: tstVBoxAPIWin.obj VirtualBox_i.obj
|
---|
83 | # $(LINK) $(LINKER_CMDLINE) /out:tstVBoxAPIWin.exe $** $(LIBS_DEPS)
|
---|
84 |
|
---|
85 | # compile with pre-defined compiler's options and locally defined paths
|
---|
86 | #tstVBoxAPIWin.obj:
|
---|
87 | # $(CXX) /c $(COMPILER_CMDLINE) /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) tstVBoxAPIWin.cpp
|
---|
88 |
|
---|
89 | # compile with locally defined paths
|
---|
90 | #tstVBoxAPIWin.obj:
|
---|
91 | # $(CXX) /c /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) tstVBoxAPIWin.cpp
|
---|
92 |
|
---|
93 | # compile with pre-defined compiler's options and locally defined paths
|
---|
94 | #VirtualBox_i.obj:
|
---|
95 | # $(CXX) /c $(COMPILER_CMDLINE) /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) $(tstVBoxAPIWin_SOURCES)
|
---|
96 |
|
---|
97 | # compile with locally defined paths
|
---|
98 | #VirtualBox_i.obj:
|
---|
99 | # $(CXX) /c /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) $(tstVBoxAPIWin_SOURCES)
|
---|
100 |
|
---|