makefile.tstVBoxAPIWin revision 97f18fc3d908924a073e536c0eedb296a1f774ee
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# tstVBoxAPILinux makefile
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Copyright (C) 2006-2013 Oracle Corporation
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# available from http://www.virtualbox.org. This file is free software;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# you can redistribute it and/or modify it under the terms of the GNU
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# General Public License (GPL) as published by the Free Software
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Several assumptions and propositions:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# - Visual Studio has already installed on machine or you already have nmake.exe, cl.exe, link.exe
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# - Windows SDK has already installed on machine or you already have Uuid.Lib Ole32.Lib OleAut32.Lib OleDlg.Lib
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# - VirtualBox SDK was downloaded and was placed into folder where VirtualBox had been installed.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# - nmake is a default tool that builds projects based on commands contained in this description file
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# - cl is cl.exe - Windows compiler
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# - link is link.exe - Windows linker
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# - all needed paths have been set in working environment. It means that when you type "cl" from the console,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Windows shall find cl.exe by using enviroment variable PATH or something similar.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# The best way to accomplish it is to run a script vcvars32.bat located in the Visual studio "bin" directory.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# This script installs needed paths in your working environment.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Important!!!
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Script vcvars32.bat sets up needed paths only for local console session.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# For permanent using, needed paths must be added globally.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Several possible examples of paths:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# VS_INSTALL_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# VS_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# VS_ATLMFC_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# WIN_SDK_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# WIN_SDK_LIB_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64\"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# VB_INSTALL_PATH = "C:\Program Files\Oracle\VirtualBox"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCXX = cl
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncLINK = link
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncPATH_MSCOM = ../../../bindings/mscom
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncINCS_MSCOM = $(PATH_MSCOM)/include
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncLIBS_MSCOM = $(PATH_MSCOM)/lib
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncLIBS_DEPS = "Uuid.Lib" "Ole32.Lib" "OleAut32.Lib" "OleDlg.Lib"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctstVBoxAPIWin_SOURCES = $(LIBS_MSCOM)/VirtualBox_i.c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctstVBoxAPIWin_DEPS = $(INCS_MSCOM)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPILER_CMDLINE = /Zi /nologo /W3 /WX- /Od /Oy- /Gm /EHsc /RTC1 /GS /fp:precise /Gd /analyze- /errorReport:queue
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncLINKER_CMDLINE = /INCREMENTAL /DEBUG /SUBSYSTEM:CONSOLE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# default linking
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctstVBoxAPIWin.exe: tstVBoxAPIWin.obj VirtualBox_i.obj
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(LINK) /out:tstVBoxAPIWin.exe $** $(LIBS_DEPS)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# default compilation
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctstVBoxAPIWin.obj:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(CXX) /c /I$(INCS_MSCOM) tstVBoxAPIWin.cpp
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# default compilation
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncVirtualBox_i.obj:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(CXX) /c /I$(INCS_MSCOM) $(tstVBoxAPIWin_SOURCES)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# linking with defined linker's options
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#tstVBoxAPIWin.exe: tstVBoxAPIWin.obj VirtualBox_i.obj
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# $(LINK) $(LINKER_CMDLINE) /out:tstVBoxAPIWin.exe $** $(LIBS_DEPS)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# compile with pre-defined compiler's options and locally defined paths
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#tstVBoxAPIWin.obj:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# $(CXX) /c $(COMPILER_CMDLINE) /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) tstVBoxAPIWin.cpp
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# compile with locally defined paths
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#tstVBoxAPIWin.obj:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# $(CXX) /c /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) tstVBoxAPIWin.cpp
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# compile with pre-defined compiler's options and locally defined paths
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#VirtualBox_i.obj:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# $(CXX) /c $(COMPILER_CMDLINE) /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) $(tstVBoxAPIWin_SOURCES)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# compile with locally defined paths
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#VirtualBox_i.obj:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# $(CXX) /c /I$(INCS_MSCOM) /I$(WIN_SDK_INCLUDE_PATH) /I$(VS_INCLUDE_PATH) $(tstVBoxAPIWin_SOURCES)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync