Makefile.kmk revision e06cbb510db6f327856cabc016398e4fda505809
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# $Id$
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster## @file
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Makefile for VBoxSDL (a simple frontend based on SDL).
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster#
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster#
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Copyright (C) 2006-2007 innotek GmbH
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster#
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# This file is part of VirtualBox Open Source Edition (OSE), as
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# available from http://www.virtualbox.org. This file is free software;
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# you can redistribute it and/or modify it under the terms of the GNU
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# General Public License as published by the Free Software Foundation,
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# distribution. VirtualBox OSE is distributed in the hope that it will
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# be useful, but WITHOUT ANY WARRANTY of any kind.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster#
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# If you received this file as part of a commercial VirtualBox
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# distribution, then only the terms of your commercial VirtualBox
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# license agreement apply instead of the previous paragraph.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster#
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster
0a99555401a033704f1f171baab6db11fb5528f2Allan FosterDEPTH = ../../../..
0a99555401a033704f1f171baab6db11fb5528f2Allan Fosterinclude $(PATH_KBUILD)/header.kmk
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster
0a99555401a033704f1f171baab6db11fb5528f2Allan FosterPROGRAMS = VBoxSDL tstSDL
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster#
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# VBoxSDL
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster#
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster
0a99555401a033704f1f171baab6db11fb5528f2Allan FosterVBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
0a99555401a033704f1f171baab6db11fb5528f2Allan FosterVBoxSDL_SDKS = LIBSDL
0a99555401a033704f1f171baab6db11fb5528f2Allan FosterVBoxSDL_SOURCES = \
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster VBoxSDL.cpp \
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster Framebuffer.cpp \
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster Helper.cpp
ifndef VBOX_OSE
VBoxSDL_SOURCES.win= \
win32/WinUI.cpp \
win32/TitlebarButtons.cpp \
win32/VBoxSDL.rc
endif
VBoxSDL_DEFS =
ifdef VBOX_WITH_SECURELABEL
VBoxSDL_DEFS += VBOX_SECURELABEL
endif
ifdef VBOX_WITH_VRDP
VBoxSDL_DEFS += VBOX_VRDP
endif
VBoxSDL_DEFS.linux = _GNU_SOURCE
ifdef VBOX_OPENGL
#VBoxSDL_DEFS.linux += VBOX_OPENGL
endif
ifndef VBOX_OSE
VBoxSDL_DEFS.win = VBOX_WIN32_UI
endif
VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
VBoxSDL_INCS = \
$(PATH_BIN)/sdk/include \
$(PATH_VBoxSDL)
ifndef ($(filter-out win,$(BUILD_TARGET),)
VBoxSDL_LIBS = \
$(LIB_SDK_LIBSDL_SDLMAIN)
endif
VBoxSDL_LIBS.linux = \
$(LIB_XCURSOR)
VBoxSDL_LDFLAGS.darwin = \
-framework Foundation -framework AppKit
ifdef VBOX_OPENGL
#VBoxSDL_LIBS.linux += GL
endif
VBoxSDL_LIBPATH.linux = \
$(VBOX_LIBPATH_X11)
VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
Framebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
#
# tstSDL
#
tstSDL_TEMPLATE = VBOXR3NPEXE
tstSDL_SDKS = LIBSDL
tstSDL_INST = $(INST_TESTCASE)
tstSDL_SOURCES = \
VBoxSDLTest.cpp
tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
ifdef VBOX_OPENGL
tstSDL_DEFS.linux = VBOX_OPENGL
endif
tstSDL_INCS = \
$(PATH_tstSDL)
tstSDL_LIBS = \
$(LIB_RUNTIME)
ifneq ($(filter-out win,$(BUILD_TARGET)),) # someone PLEASE explain why we don't use sdl main!
tstSDL_LIBS += \
$(LIB_SDK_LIBSDL_SDLMAIN)
endif
ifdef VBOX_OPENGL
tstSDL_LIBS.linux += GL
endif
tstSDL_LIBPATH.linux = \
$(VBOX_LIBPATH_X11)
tstSDL_LDFLAGS.darwin = \
-framework Foundation -framework AppKit
tstSDL_CXXFLAGS.win = \
-EHsc
tstSDL_CXXFLAGS.linux = \
-DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
-Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
# generate rules
include $(PATH_KBUILD)/footer.kmk
# Convert the pnm-file to a byte array.
$(PATH_VBoxSDL)/Ico64x01.h: ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
$(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
$(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@