Makefile.kmk revision 261cd37de54c6e69a839e58af61300bb56824aad
6d1a8b922859f63b629351cba4793043627d7c8fvboxsync# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# available from http://www.virtualbox.org. This file is free software;
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# additional information or have any questions.
995825c1ba4ab8b5d5b52ce33327f4630ad7ca64vboxsyncifdef VBOX_KBUILD_HACKING
995825c1ba4ab8b5d5b52ce33327f4630ad7ca64vboxsyncSUB_DEPTH = ../../../..
995825c1ba4ab8b5d5b52ce33327f4630ad7ca64vboxsyncDEPTH ?= ../../../..
6d1a8b922859f63b629351cba4793043627d7c8fvboxsyncSUB_DEPTH = ..
27537ffef7291d0bb3a24e459a6b94c65586defevboxsyncinclude $(KBUILD_PATH)/subheader.kmk
6d1a8b922859f63b629351cba4793043627d7c8fvboxsyncPROGRAMS += VBoxSDL tstSDL
4896726d903f56fe43eb13e2ba27ae1d63b8c40evboxsyncVBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_SDKS = LIBSDL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_SOURCES = \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifndef VBOX_OSE
a882c87b5d8115089725175d3d966f380f67a6afvboxsyncwin32/VBoxSDL.rc_INCS = $(PATH_VBoxSDL)
8887849668e69def9136d8d8a31766069a60d7f5vboxsyncwin32/VBoxSDL.rc_DEPS = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
8887849668e69def9136d8d8a31766069a60d7f5vboxsyncwin32/VBoxSDL.rc_CLEAN = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_DEFS =
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_WITH_SECURELABEL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync VBoxSDL_DEFS += VBOX_SECURELABEL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_WITH_VRDP
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync VBoxSDL_DEFS += VBOX_VRDP
4e46eee5a96078ebec6cb36939b794a391f1ade0vboxsyncVBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
4e46eee5a96078ebec6cb36939b794a391f1ade0vboxsyncVBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
4e46eee5a96078ebec6cb36939b794a391f1ade0vboxsyncVBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_OPENGL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync #VBoxSDL_DEFS.linux += VBOX_OPENGL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifndef VBOX_OSE
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync VBoxSDL_DEFS.win = VBOX_WIN32_UI
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_INCS = \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(PATH_VBoxSDL)
7fdd763c6c507adde17f4bd278b15891b8ebf568vboxsyncifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsyncVBoxSDL_INCS += \
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsync $(VBOX_XCURSOR_INCS)
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsync /usr/X11R6/include ## @todo figure this out.
7fdd763c6c507adde17f4bd278b15891b8ebf568vboxsyncifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
e06cbb510db6f327856cabc016398e4fda505809vboxsyncVBoxSDL_LIBS = \
e06cbb510db6f327856cabc016398e4fda505809vboxsync $(LIB_SDK_LIBSDL_SDLMAIN)
7fdd763c6c507adde17f4bd278b15891b8ebf568vboxsyncifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsyncVBoxSDL_LIBS += \
43b9d660479e358a9b61827b8037ea65268345e9vboxsync $(VBOX_XCURSOR_LIBS) \
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsyncVBoxSDL_LIBPATH = \
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsync $(VBOX_LIBPATH_X11)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_OPENGL
48eca14ff165b52c459d7c3090f1f5dba0d1fedbvboxsync -framework Foundation -framework AppKit
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_TEMPLATE = VBOXR3NPEXE
67b414aa650cb27688d387c2184f8488d801cd72vboxsynctstSDL_SDKS = LIBSDL
67b414aa650cb27688d387c2184f8488d801cd72vboxsynctstSDL_INST = $(INST_TESTCASE)
67b414aa650cb27688d387c2184f8488d801cd72vboxsynctstSDL_SOURCES = \
67b414aa650cb27688d387c2184f8488d801cd72vboxsynctstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_OPENGL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_INCS = \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(PATH_tstSDL)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_LIBS = \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(LIB_RUNTIME)
7fdd763c6c507adde17f4bd278b15891b8ebf568vboxsyncifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_LIBS += \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(LIB_SDK_LIBSDL_SDLMAIN)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_OPENGL
7fdd763c6c507adde17f4bd278b15891b8ebf568vboxsyncifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsynctstSDL_LIBPATH = \
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsync $(VBOX_LIBPATH_X11)
607049337dcf359292c82c9372a2c19d9c4cdd2fvboxsync /usr/X11R6/include ## @todo figure this out.
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync -framework Foundation -framework AppKit
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync# generate rules
27537ffef7291d0bb3a24e459a6b94c65586defevboxsyncinclude $(KBUILD_PATH)/subfooter.kmk
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync# Convert the pnm-file to a byte array.
6d1a8b922859f63b629351cba4793043627d7c8fvboxsync$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
8887849668e69def9136d8d8a31766069a60d7f5vboxsync# Icon include file.
261cd37de54c6e69a839e58af61300bb56824aadvboxsync$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $(VBoxSDL_PATH)/Makefile.kmk | $$(call DIRDEP,$$(@D))
8887849668e69def9136d8d8a31766069a60d7f5vboxsync $(RM) -f $@
8887849668e69def9136d8d8a31766069a60d7f5vboxsync $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'