Makefile.kmk revision 84d5d5272edbc1f41f963221b74a7eda71d0e2a2
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync# Makefile for VBoxSDL (a simple frontend based on SDL).
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# Copyright (C) 2006-2007 innotek GmbH
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# available from http://www.virtualbox.org. This file is free software;
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# you can redistribute it and/or modify it under the terms of the GNU
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# General Public License as published by the Free Software Foundation,
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# distribution. VirtualBox OSE is distributed in the hope that it will
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync# be useful, but WITHOUT ANY WARRANTY of any kind.
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncDEPTH = ../../../..
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncinclude $(PATH_KBUILD)/header.kmk
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncPROGRAMS = VBoxSDL tstSDL
4896726d903f56fe43eb13e2ba27ae1d63b8c40evboxsyncVBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_SDKS = LIBSDL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncVBoxSDL_SOURCES = \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifndef VBOX_OSE
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
e90bc1b0a8fb83acc1c1dc65176f143163cbb1a4vboxsyncVBoxSDL_DEFS.solaris += VBOX_WITHOUT_XCURSOR ## @todo build xcursor or something.
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)
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsyncifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsyncVBoxSDL_INCS += \
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsync $(VBOX_XCURSOR_INCS)
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsync /usr/X11R6/include ## @todo figure this out.
0edd5583e49bb46471ed27200f0fe2fdf00f5ecavboxsyncifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
e06cbb510db6f327856cabc016398e4fda505809vboxsyncVBoxSDL_LIBS = \
e06cbb510db6f327856cabc016398e4fda505809vboxsync $(LIB_SDK_LIBSDL_SDLMAIN)
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsyncifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsyncVBoxSDL_LIBS += \
84d5d5272edbc1f41f963221b74a7eda71d0e2a2vboxsync $(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
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_SDKS = LIBSDL
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_INST = $(INST_TESTCASE)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_SOURCES = \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_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)
22cf3a5eb5a3cc2ea58e4fe974914e6a32514614vboxsyncifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsynctstSDL_LIBS += \
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(LIB_SDK_LIBSDL_SDLMAIN)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncifdef VBOX_OPENGL
10f224d85cd1135f0ca4ee1c1c1a7e15988bed58vboxsyncifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_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
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsyncinclude $(PATH_KBUILD)/footer.kmk
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync# Convert the pnm-file to a byte array.
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync$(PATH_VBoxSDL)/Ico64x01.h: ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
9e201d78ac6efdd08550263f2e146cdb76e9d49bvboxsync $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@