Makefile.kmk revision 8887849668e69def9136d8d8a31766069a60d7f5
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# $Id$
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## @file
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright (C) 2006-2007 Sun Microsystems, Inc.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# This file is part of VirtualBox Open Source Edition (OSE), as
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# available from http://www.virtualbox.org. This file is free software;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# you can redistribute it and/or modify it under the terms of the GNU
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# General Public License (GPL) as published by the Free Software
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Foundation, in version 2 as it comes in the "COPYING" file of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Clara, CA 95054 USA or visit http://www.sun.com if you need
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# additional information or have any questions.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, Ramana
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDEPTH ?= ../../../..
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSUB_DEPTH = ..
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude $(PATH_KBUILD)/subheader.kmk
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePROGRAMS += VBoxSDL tstSDL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# VBoxSDL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_SDKS = LIBSDL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_SOURCES = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBoxSDL.cpp \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Framebuffer.cpp \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Helper.cpp
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_SOURCES.darwin = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBoxSDLMain-darwin.m
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifndef VBOX_OSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBoxSDL_SOURCES.win = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte win32/WinUI.cpp \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte win32/TitlebarButtons.cpp \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte win32/VBoxSDL.rc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortewin32/VBoxSDL.rc_DEPS = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortewin32/VBoxSDL.rc_CLEAN = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_DEFS =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifdef VBOX_WITH_SECURELABEL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBoxSDL_DEFS += VBOX_SECURELABEL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifdef VBOX_WITH_VRDP
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBoxSDL_DEFS += VBOX_VRDP
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweVBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifdef VBOX_OPENGL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte #VBoxSDL_DEFS.linux += VBOX_OPENGL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifndef VBOX_OSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBoxSDL_DEFS.win = VBOX_WIN32_UI
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Loweendif
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweVBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweVBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_INCS = \
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, Ramana $(PATH_BIN)/sdk/include \
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, Ramana $(PATH_VBoxSDL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_INCS += \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(VBOX_XCURSOR_INCS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_INCS.freebsd = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /usr/include \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /usr/local/include \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /usr/X11R6/include ## @todo figure this out.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_LIBS = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(LIB_SDK_LIBSDL_SDLMAIN)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, Ramanaifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_LIBS += \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(VBOX_XCURSOR_LIBS) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte X11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_LIBPATH = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(VBOX_LIBPATH_X11)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifdef VBOX_OPENGL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte #VBoxSDL_LIBS.linux += GL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_LDFLAGS.darwin = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -framework Foundation -framework AppKit
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteVBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteFramebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# tstSDL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, RamanatstSDL_TEMPLATE = VBOXR3NPEXE
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, RamanatstSDL_SDKS = LIBSDL
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, RamanatstSDL_INST = $(INST_TESTCASE)
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, RamanatstSDL_SOURCES = \
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, Ramana VBoxSDLTest.cpp
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, RamanatstSDL_SOURCES.darwin = \
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, Ramana VBoxSDLMain-darwin.m
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, RamanatstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, RamanatstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
a1e9eea083a8f257157edb8a1efb5bbd300eb4bfSrikanth, Ramanaifdef VBOX_OPENGL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortetstSDL_DEFS.linux = VBOX_OPENGL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortetstSDL_INCS = \
$(PATH_tstSDL)
tstSDL_LIBS = \
$(LIB_RUNTIME)
ifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
tstSDL_LIBS += \
$(LIB_SDK_LIBSDL_SDLMAIN)
endif
ifdef VBOX_OPENGL
tstSDL_LIBS.linux += GL
endif
ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
tstSDL_LIBPATH = \
$(VBOX_LIBPATH_X11)
tstSDL_INCS.freebsd = \
/usr/include \
/usr/local/include \
/usr/X11R6/include ## @todo figure this out.
endif
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)/subfooter.kmk
# Convert the pnm-file to a byte array.
$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
$(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
$(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
# Icon include file.
$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(PATH_SUB_CURRENT)/win32/VBoxSDL.rc Makefile.kmk | $$(call DIRDEP,$$(@D))
$(RM) -f $@
$(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'