Makefile.kmk revision 3b3bc8a9383a065307e540b83fc3a3d6c548a082
6d1a8b922859f63b629351cba4793043627d7c8fvboxsync# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync# Copyright (C) 2006-2007 Oracle Corporation
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.
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 = \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_DEFS =
5c40e09e0c65ac2b73caaddaf4f24117e11a2637vboxsyncifdef VBOX_WITH_SDL13
5c40e09e0c65ac2b73caaddaf4f24117e11a2637vboxsync VBoxSDL_DEFS += VBOX_WITH_SDL13
5c40e09e0c65ac2b73caaddaf4f24117e11a2637vboxsync ifdef VBOX_WITH_SECURELABEL
5c40e09e0c65ac2b73caaddaf4f24117e11a2637vboxsync VBoxSDL_DEFS += VBOX_SECURELABEL
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
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_INCS = \
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsync $(VBoxSDL_0_OUTDIR)
7fdd763c6c507adde17f4bd278b15891b8ebf568vboxsyncifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsyncVBoxSDL_INCS += \
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsync $(VBOX_XCURSOR_INCS)
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 += \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) \
43b9d660479e358a9b61827b8037ea65268345e9vboxsync $(VBOX_XCURSOR_LIBS) \
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsyncVBoxSDL_LIBPATH = \
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsync $(VBOX_LIBPATH_X11)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_OPENGL
48eca14ff165b52c459d7c3090f1f5dba0d1fedbvboxsync -framework Foundation -framework AppKit
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsyncVBoxSDL_CLEAN = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsyncVBoxSDL_INTERMEDIATES = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsync# Convert the pnm-file to a byte array.
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsync$$(VBoxSDL_0_OUTDIR)/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.
cca462489c10352f8a0edc57e86c00866b934720vboxsync$$(VBoxSDL_0_OUTDIR)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_DEFPATH)/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_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)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync -framework Foundation -framework AppKit
233fca72708bd7dfbd75d68be112eff3572c052bvboxsync## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
233fca72708bd7dfbd75d68be112eff3572c052bvboxsync# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
233fca72708bd7dfbd75d68be112eff3572c052bvboxsync# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
233fca72708bd7dfbd75d68be112eff3572c052bvboxsync# Is this what's intended? Why -fshort-wchar?
233fca72708bd7dfbd75d68be112eff3572c052bvboxsynctstSDL_DEFS.linux = NDEBUG TRIMMED
233fca72708bd7dfbd75d68be112eff3572c052bvboxsynctstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
37eed2e0302518c6f0e74856c39d52a9417a551cvboxsyncendif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
27537ffef7291d0bb3a24e459a6b94c65586defevboxsyncinclude $(KBUILD_PATH)/subfooter.kmk