Makefile.kmk revision ad1c538f298dad2073517c8773fca41b5243201c
3726777f47ac4bba3e21b075905959bbea47e72eerikabele# $Id$
b51bf223f42d43ca6b1b33c95124edcfa5a871a4nd## @file
6b94184a299e2bce617aa1806da5f6008b38b92bkess# Makefile for VBoxSDL (a simple frontend based on SDL).
3726777f47ac4bba3e21b075905959bbea47e72eerikabele#
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding#
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# Copyright (C) 2006-2007 innotek GmbH
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding#
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# This file is part of VirtualBox Open Source Edition (OSE), as
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# available from http://www.virtualbox.org. This file is free software;
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# you can redistribute it and/or modify it under the terms of the GNU
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd# General Public License as published by the Free Software Foundation,
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd# distribution. VirtualBox OSE is distributed in the hope that it will
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd# be useful, but WITHOUT ANY WARRANTY of any kind.
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506ndDEPTH = ../../../..
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506ndinclude $(PATH_KBUILD)/header.kmk
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506ndPROGRAMS = VBoxSDL tstSDL
dba4cfbd6e9a1f639fb6831d1bca86bef6bf8506nd
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72nd#
eed2a23d9b5986937f1e2b1c120be97744508a72nd# VBoxSDL
eed2a23d9b5986937f1e2b1c120be97744508a72nd#
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_SDKS = LIBSDL
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_SOURCES = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd VBoxSDL.cpp \
eed2a23d9b5986937f1e2b1c120be97744508a72nd Framebuffer.cpp \
eed2a23d9b5986937f1e2b1c120be97744508a72nd Helper.cpp
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_SOURCES.darwin = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd VBoxSDLMain-darwin.m
eed2a23d9b5986937f1e2b1c120be97744508a72ndifndef VBOX_OSE
eed2a23d9b5986937f1e2b1c120be97744508a72nd VBoxSDL_SOURCES.win = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd win32/WinUI.cpp \
eed2a23d9b5986937f1e2b1c120be97744508a72nd win32/TitlebarButtons.cpp \
eed2a23d9b5986937f1e2b1c120be97744508a72nd win32/VBoxSDL.rc
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_DEFS =
eed2a23d9b5986937f1e2b1c120be97744508a72ndifdef VBOX_WITH_SECURELABEL
eed2a23d9b5986937f1e2b1c120be97744508a72nd VBoxSDL_DEFS += VBOX_SECURELABEL
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72ndifdef VBOX_WITH_VRDP
eed2a23d9b5986937f1e2b1c120be97744508a72nd VBoxSDL_DEFS += VBOX_VRDP
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
eed2a23d9b5986937f1e2b1c120be97744508a72ndifdef VBOX_OPENGL
eed2a23d9b5986937f1e2b1c120be97744508a72nd #VBoxSDL_DEFS.linux += VBOX_OPENGL
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72ndifndef VBOX_OSE
eed2a23d9b5986937f1e2b1c120be97744508a72nd VBoxSDL_DEFS.win = VBOX_WIN32_UI
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_INCS = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd $(PATH_BIN)/sdk/include \
eed2a23d9b5986937f1e2b1c120be97744508a72nd $(PATH_VBoxSDL)
eed2a23d9b5986937f1e2b1c120be97744508a72ndifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_INCS += \
f5e4573f2a3ca4b7d7d10bfb50950fa7eff27efbnilgun $(VBOX_XCURSOR_INCS)
f5e4573f2a3ca4b7d7d10bfb50950fa7eff27efbnilgunendif
f5e4573f2a3ca4b7d7d10bfb50950fa7eff27efbnilgunVBoxSDL_INCS.freebsd = \
f5e4573f2a3ca4b7d7d10bfb50950fa7eff27efbnilgun /usr/include \
eed2a23d9b5986937f1e2b1c120be97744508a72nd /usr/local/include \
eed2a23d9b5986937f1e2b1c120be97744508a72nd /usr/X11R6/include ## @todo figure this out.
eed2a23d9b5986937f1e2b1c120be97744508a72ndifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_LIBS = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd $(LIB_SDK_LIBSDL_SDLMAIN)
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72ndifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
eed2a23d9b5986937f1e2b1c120be97744508a72ndVBoxSDL_LIBS += \
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd $(VBOX_XCURSOR_LIBS) \
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd X11
4930be147adf9e3f6d3ca9313a6524f9bf654b2dndVBoxSDL_LIBPATH = \
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd $(VBOX_LIBPATH_X11)
4930be147adf9e3f6d3ca9313a6524f9bf654b2dndendif
4930be147adf9e3f6d3ca9313a6524f9bf654b2dndifdef VBOX_OPENGL
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd #VBoxSDL_LIBS.linux += GL
4930be147adf9e3f6d3ca9313a6524f9bf654b2dndendif
eed2a23d9b5986937f1e2b1c120be97744508a72nd
4930be147adf9e3f6d3ca9313a6524f9bf654b2dndVBoxSDL_LDFLAGS.darwin = \
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd -framework Foundation -framework AppKit
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd
4930be147adf9e3f6d3ca9313a6524f9bf654b2dndVBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
eed2a23d9b5986937f1e2b1c120be97744508a72ndFramebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72nd#
eed2a23d9b5986937f1e2b1c120be97744508a72nd# tstSDL
eed2a23d9b5986937f1e2b1c120be97744508a72nd#
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_TEMPLATE = VBOXR3NPEXE
9ead22080b72dcfbf031f25179e89a7fab346f8andtstSDL_SDKS = LIBSDL
9ead22080b72dcfbf031f25179e89a7fab346f8andtstSDL_INST = $(INST_TESTCASE)
9ead22080b72dcfbf031f25179e89a7fab346f8andtstSDL_SOURCES = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd VBoxSDLTest.cpp
61d237f7e3a54089a7514227d663fac296d7d8f0bnicholeststSDL_SOURCES.darwin = \
61d237f7e3a54089a7514227d663fac296d7d8f0bnicholes VBoxSDLMain-darwin.m
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
eed2a23d9b5986937f1e2b1c120be97744508a72ndifdef VBOX_OPENGL
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_DEFS.linux = VBOX_OPENGL
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_INCS = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd $(PATH_tstSDL)
f27d739355a5cc1324bb38feb6af7808d79cc642kess
f27d739355a5cc1324bb38feb6af7808d79cc642kesststSDL_LIBS = \
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim $(LIB_RUNTIME)
eed2a23d9b5986937f1e2b1c120be97744508a72ndifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_LIBS += \
61d237f7e3a54089a7514227d663fac296d7d8f0bnicholes $(LIB_SDK_LIBSDL_SDLMAIN)
b51bf223f42d43ca6b1b33c95124edcfa5a871a4ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72ndifdef VBOX_OPENGL
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_LIBS.linux += GL
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
8daf1ddf6285e4ded262f7a7a8e2e983a84a3cbdhumbedoohifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_LIBPATH = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd $(VBOX_LIBPATH_X11)
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_INCS.freebsd = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd /usr/include \
eed2a23d9b5986937f1e2b1c120be97744508a72nd /usr/local/include \
b51bf223f42d43ca6b1b33c95124edcfa5a871a4nd /usr/X11R6/include ## @todo figure this out.
eed2a23d9b5986937f1e2b1c120be97744508a72ndendif
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_LDFLAGS.darwin = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd -framework Foundation -framework AppKit
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_CXXFLAGS.win = \
eed2a23d9b5986937f1e2b1c120be97744508a72nd -EHsc
eed2a23d9b5986937f1e2b1c120be97744508a72ndtstSDL_CXXFLAGS.linux = \
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72nd# generate rules
eed2a23d9b5986937f1e2b1c120be97744508a72ndinclude $(PATH_KBUILD)/footer.kmk
eed2a23d9b5986937f1e2b1c120be97744508a72nd
eed2a23d9b5986937f1e2b1c120be97744508a72nd
b3027c7641b1104ee50404cca6868e5101a7ca45nd# Convert the pnm-file to a byte array.
9b76f9c772decf1ce4bfd760ad245b1ab9721768nd$(PATH_VBoxSDL)/Ico64x01.h: ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
9b76f9c772decf1ce4bfd760ad245b1ab9721768nd $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
9b76f9c772decf1ce4bfd760ad245b1ab9721768nd $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
f1110149b5b6c28ecc39d1958d98ad9cfa8e41f3nd
f1110149b5b6c28ecc39d1958d98ad9cfa8e41f3nd