1 | # $Id: makefile.tstVBoxAPIWin 69500 2017-10-28 15:14:05Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # tstVBoxAPILinux makefile
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2017 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 | #
|
---|
19 | # Several assumptions and propositions:
|
---|
20 | # - Visual Studio has already installed on machine or you already have nmake.exe, cl.exe, link.exe
|
---|
21 | # - Windows SDK has already installed on machine or you already have Uuid.Lib Ole32.Lib OleAut32.Lib OleDlg.Lib
|
---|
22 | # - VirtualBox SDK was downloaded and was placed into folder where VirtualBox had been installed.
|
---|
23 | # - nmake is a default tool that builds projects based on commands contained in this description file
|
---|
24 | # - cl is cl.exe - Windows compiler
|
---|
25 | # - link is link.exe - Windows linker
|
---|
26 | # - all needed paths have been set in working environment. It means that when you type "cl" from the console,
|
---|
27 | # Windows shall find cl.exe by using enviroment variable PATH or something similar.
|
---|
28 | #
|
---|
29 | # The best way to accomplish it is to run a script vcvars32.bat located in the Visual studio "bin" directory.
|
---|
30 | # This script installs needed paths in your working environment.
|
---|
31 | # Important!!!
|
---|
32 | # Script vcvars32.bat sets up needed paths only for local console session.
|
---|
33 | # For permanent using, needed paths must be added globally.
|
---|
34 | #
|
---|
35 | # Several possible examples of paths:
|
---|
36 | # VS_INSTALL_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\"
|
---|
37 | # VS_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
|
---|
38 | # WIN_SDK_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"
|
---|
39 | # WIN_SDK_LIB_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64\"
|
---|
40 | # VB_INSTALL_PATH = "C:\Program Files\Oracle\VirtualBox"
|
---|
41 | #
|
---|
42 |
|
---|
43 |
|
---|
44 | CXX = cl
|
---|
45 | LINK = link
|
---|
46 | PATH_MSCOM = ../../../bindings/mscom
|
---|
47 | INCS_MSCOM = $(PATH_MSCOM)/include
|
---|
48 | LIBS_MSCOM = $(PATH_MSCOM)/lib
|
---|
49 |
|
---|
50 | LIBS_DEPS = "Uuid.Lib" "Ole32.Lib" "OleAut32.Lib" "OleDlg.Lib"
|
---|
51 |
|
---|
52 | tstVBoxAPIWin_SOURCES = $(LIBS_MSCOM)/VirtualBox_i.c
|
---|
53 | tstVBoxAPIWin_DEPS = $(INCS_MSCOM)
|
---|
54 |
|
---|
55 | COMPILER_CMDLINE = /Zi /nologo /W3 /WX- /Od /Oy- /Gm /EHsc /RTC1 /GS /fp:precise /Gd /analyze- /errorReport:queue
|
---|
56 |
|
---|
57 | LINKER_CMDLINE = /INCREMENTAL /DEBUG /SUBSYSTEM:CONSOLE
|
---|
58 |
|
---|
59 | # default linking
|
---|
60 | tstVBoxAPIWin.exe: tstVBoxAPIWin.obj VirtualBox_i.obj
|
---|
61 | $(LINK) /out:tstVBoxAPIWin.exe $** $(LIBS_DEPS)
|
---|
62 |
|
---|
63 | # default compilation
|
---|
64 | tstVBoxAPIWin.obj:
|
---|
65 | $(CXX) /c /I$(INCS_MSCOM) tstVBoxAPIWin.cpp
|
---|
66 |
|
---|
67 | # default compilation
|
---|
68 | VirtualBox_i.obj:
|
---|
69 | $(CXX) /c /I$(INCS_MSCOM) $(tstVBoxAPIWin_SOURCES)
|
---|
70 |
|
---|
71 | # linking with defined linker's options
|
---|
72 | #tstVBoxAPIWin.exe: tstVBoxAPIWin.obj VirtualBox_i.obj
|
---|
73 | # $(LINK) $(LINKER_CMDLINE) /out:tstVBoxAPIWin.exe $** $(LIBS_DEPS)
|
---|
74 |
|
---|
75 | # compile with pre-defined compiler's options and locally defined paths
|
---|
76 | #tstVBoxAPIWin.obj:
|
---|
77 | # $(CXX) /c $(COMPILER_CMDLINE) /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) tstVBoxAPIWin.cpp
|
---|
78 |
|
---|
79 | # compile with locally defined paths
|
---|
80 | #tstVBoxAPIWin.obj:
|
---|
81 | # $(CXX) /c /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) tstVBoxAPIWin.cpp
|
---|
82 |
|
---|
83 | # compile with pre-defined compiler's options and locally defined paths
|
---|
84 | #VirtualBox_i.obj:
|
---|
85 | # $(CXX) /c $(COMPILER_CMDLINE) /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) $(tstVBoxAPIWin_SOURCES)
|
---|
86 |
|
---|
87 | # compile with locally defined paths
|
---|
88 | #VirtualBox_i.obj:
|
---|
89 | # $(CXX) /c /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) $(tstVBoxAPIWin_SOURCES)
|
---|
90 |
|
---|