Makefile.kmk revision e90bc1b0a8fb83acc1c1dc65176f143163cbb1a4
4b3769ce483ece06f60f983193712492b920144fJake Feasel# $Id$
4b3769ce483ece06f60f983193712492b920144fJake Feasel## @file
4b3769ce483ece06f60f983193712492b920144fJake Feasel# Makefile for VBoxSDL (a simple frontend based on SDL).
4b3769ce483ece06f60f983193712492b920144fJake Feasel#
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller#
4b3769ce483ece06f60f983193712492b920144fJake Feasel# Copyright (C) 2006-2007 innotek GmbH
4b3769ce483ece06f60f983193712492b920144fJake Feasel#
4b3769ce483ece06f60f983193712492b920144fJake Feasel# This file is part of VirtualBox Open Source Edition (OSE), as
4b3769ce483ece06f60f983193712492b920144fJake Feasel# available from http://www.virtualbox.org. This file is free software;
4b3769ce483ece06f60f983193712492b920144fJake Feasel# you can redistribute it and/or modify it under the terms of the GNU
4b3769ce483ece06f60f983193712492b920144fJake Feasel# General Public License as published by the Free Software Foundation,
4b3769ce483ece06f60f983193712492b920144fJake Feasel# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
4b3769ce483ece06f60f983193712492b920144fJake Feasel# distribution. VirtualBox OSE is distributed in the hope that it will
4b3769ce483ece06f60f983193712492b920144fJake Feasel# be useful, but WITHOUT ANY WARRANTY of any kind.
4b3769ce483ece06f60f983193712492b920144fJake Feasel
4b3769ce483ece06f60f983193712492b920144fJake FeaselDEPTH = ../../../..
4b3769ce483ece06f60f983193712492b920144fJake Feaselinclude $(PATH_KBUILD)/header.kmk
4b3769ce483ece06f60f983193712492b920144fJake Feasel
4b3769ce483ece06f60f983193712492b920144fJake FeaselPROGRAMS = VBoxSDL tstSDL
4b3769ce483ece06f60f983193712492b920144fJake Feasel
4b3769ce483ece06f60f983193712492b920144fJake Feasel
4b3769ce483ece06f60f983193712492b920144fJake Feasel#
4b3769ce483ece06f60f983193712492b920144fJake Feasel# VBoxSDL
4b3769ce483ece06f60f983193712492b920144fJake Feasel#
4b3769ce483ece06f60f983193712492b920144fJake Feasel
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan MmillerVBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan MmillerVBoxSDL_SDKS = LIBSDL
4b3769ce483ece06f60f983193712492b920144fJake FeaselVBoxSDL_SOURCES = \
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller VBoxSDL.cpp \
4b3769ce483ece06f60f983193712492b920144fJake Feasel Framebuffer.cpp \
4b3769ce483ece06f60f983193712492b920144fJake Feasel Helper.cpp
4b3769ce483ece06f60f983193712492b920144fJake Feaselifndef VBOX_OSE
4b3769ce483ece06f60f983193712492b920144fJake Feasel VBoxSDL_SOURCES.win= \
4b3769ce483ece06f60f983193712492b920144fJake Feasel win32/WinUI.cpp \
4b3769ce483ece06f60f983193712492b920144fJake Feasel win32/TitlebarButtons.cpp \
4b3769ce483ece06f60f983193712492b920144fJake Feasel win32/VBoxSDL.rc
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan Mmillerendif
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan MmillerVBoxSDL_DEFS =
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan Mmillerifdef VBOX_WITH_SECURELABEL
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller VBoxSDL_DEFS += VBOX_SECURELABEL
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmillerendif
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan Mmillerifdef VBOX_WITH_VRDP
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller VBoxSDL_DEFS += VBOX_VRDP
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan Mmillerendif
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan MmillerVBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan MmillerVBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan MmillerVBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan MmillerVBoxSDL_DEFS.solaris += VBOX_WITHOUT_XCURSOR ## @todo build xcursor or something.
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan Mmillerifdef VBOX_OPENGL
0b90cf39da4c7ba2b843ffd3512d84d009b5dff0Brendan Mmiller #VBoxSDL_DEFS.linux += VBOX_OPENGL
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmillerendif
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmillerifndef VBOX_OSE
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller VBoxSDL_DEFS.win = VBOX_WIN32_UI
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmillerendif
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan MmillerVBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan MmillerVBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan MmillerVBoxSDL_INCS = \
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller $(PATH_BIN)/sdk/include \
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller $(PATH_VBoxSDL)
4b3769ce483ece06f60f983193712492b920144fJake Feaselifndef ($(filter-out win,$(BUILD_TARGET),)
4b3769ce483ece06f60f983193712492b920144fJake FeaselVBoxSDL_LIBS = \
4b3769ce483ece06f60f983193712492b920144fJake Feasel $(LIB_SDK_LIBSDL_SDLMAIN)
4b3769ce483ece06f60f983193712492b920144fJake Feaselendif
4b3769ce483ece06f60f983193712492b920144fJake FeaselVBoxSDL_LIBS.linux = \
4b3769ce483ece06f60f983193712492b920144fJake Feasel $(LIB_XCURSOR)
4b3769ce483ece06f60f983193712492b920144fJake Feasel# @todo deal with missing xcursor on solaris.
0c3f79f75f596c8d6700b2de830000f754bb28a9Phill Cunnington#VBoxSDL_LIBS.solaris = \
4b3769ce483ece06f60f983193712492b920144fJake Feasel# $(LIB_XCURSOR)
4b3769ce483ece06f60f983193712492b920144fJake FeaselVBoxSDL_LIBS.solaris += \
4b3769ce483ece06f60f983193712492b920144fJake Feasel $(LIB_X11)
4b3769ce483ece06f60f983193712492b920144fJake Feaselifdef VBOX_OPENGL
4b3769ce483ece06f60f983193712492b920144fJake Feasel #VBoxSDL_LIBS.linux += GL
4b3769ce483ece06f60f983193712492b920144fJake Feaselendif
4b3769ce483ece06f60f983193712492b920144fJake FeaselVBoxSDL_LIBPATH.linux = \
4b3769ce483ece06f60f983193712492b920144fJake Feasel $(VBOX_LIBPATH_X11)
4b3769ce483ece06f60f983193712492b920144fJake FeaselVBoxSDL_LIBPATH.solaris = \
4b3769ce483ece06f60f983193712492b920144fJake Feasel $(VBOX_LIBPATH_X11)
4b3769ce483ece06f60f983193712492b920144fJake FeaselVBoxSDL_LDFLAGS.darwin = \
4b3769ce483ece06f60f983193712492b920144fJake Feasel -framework Foundation -framework AppKit
b4260bb3e2303240ecf6c7e4e5639439c3f98889Brendan Mmiller
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_LDFLAGS.darwin = \
-framework Foundation -framework AppKit
tstSDL_LIBPATH.linux = \
$(VBOX_LIBPATH_X11)
tstSDL_LIBPATH.solaris = \
$(VBOX_LIBPATH_X11)
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 $< $@