Makefile.kmk revision 13ff4cb7febf37387a41d738e110802d54a37edd
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.
995825c1ba4ab8b5d5b52ce33327f4630ad7ca64vboxsyncSUB_DEPTH = ../../../..
27537ffef7291d0bb3a24e459a6b94c65586defevboxsyncinclude $(KBUILD_PATH)/subheader.kmk
7a39033381dbde37dc7b59b2440d643b1cbac21dvboxsyncif !defined(VBOX_WITH_HARDENING) || "$(KBUILD_TARGET)" != "darwin" # No hardened VBoxSDL on darwin.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifdef VBOX_WITH_HARDENING
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync PROGRAMS += VBoxSDLHardened
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync DLLS += VBoxSDL
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync PROGRAMS += VBoxSDL
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncPROGRAMS += tstSDL
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Hardened VBoxSDL
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxSDLHardened_TEMPLATE = VBOXR3HARDENEDEXE
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxSDLHardened_SOURCES = VBoxSDLHardened.cpp
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxSDLHardened_NAME = VBoxSDL
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,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
3f8fa562bb916e87b0beff9ec2a4e241c643dcc8vboxsync VBoxSDL_DEFS += VBOX_WITH_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
f3777d764085ae73efc77dc3ef74ed13e3008815vboxsyncVBoxSDL_INTERMEDIATES = $(PATH_VBoxSDL)/Ico64x01.h
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync# Convert the pnm-file to a byte array.
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync$$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync# Icon include file.
13ff4cb7febf37387a41d738e110802d54a37eddvboxsync$$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_PATH)/Makefile.kmk | $$(dir $$@)
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync $(RM) -f $@
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
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
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsyncendif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
27537ffef7291d0bb3a24e459a6b94c65586defevboxsyncinclude $(KBUILD_PATH)/subfooter.kmk