Makefile.kmk revision 6e9aa255e3376b2da5824c09c4c62bc233463bfe
# $Id$
## @file
# VBox - rdesktop with VRDP enhancements sub-makefile.
#
#
# Copyright (C) 2006-2012 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
SUB_DEPTH = ../../../..
include $(KBUILD_PATH)/subheader.kmk
# Globals
VBOX_PATH_RDESKTOP_SRC := $(PATH_SUB_CURRENT)
VBOX_PATH_DEVICES_USB := $(PATH_ROOT)/src/VBox/Devices/USB
VBOX_PATH_USB_LIB := $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB
VBOX_PATH_MAIN_LINUX := $(PATH_ROOT)/src/VBox/Main/src-server/linux
VBOX_PATH_MAIN_INCLUDE := $(PATH_ROOT)/src/VBox/Main/include
VBOX_RDESKTOP_SRC_SUBDIR = rdesktop-1.8.3-vrdp
#
# The rdesktop-vrdp program.
#
PROGRAMS += rdesktop-vrdp
rdesktop-vrdp_TEMPLATE = VBOXR3NPEXE
rdesktop-vrdp_SDKS = VBOX_OPENSSL2
rdesktop-vrdp_DEFS = \
PACKAGE_NAME=\"rdesktop-vrdp\" PACKAGE_TARNAME=\"rdesktop-vrdp\" PACKAGE_VERSION=\"1.8.3\" \
PACKAGE_STRING=\"rdesktop\ 1.8.3\" PACKAGE_BUGREPORT=\"\" STDC_HEADERS=1 L_ENDIAN=1 \
HAVE_SYS_TYPES_H=1 HAVE_SYS_STAT_H=1 HAVE_STDLIB_H=1 HAVE_STRING_H=1 HAVE_MEMORY_H=1 \
HAVE_STRINGS_H=1 HAVE_INTTYPES_H=1 HAVE_STDINT_H=1 HAVE_UNISTD_H=1 HAVE_SYS_SELECT_H=1 \
HAVE_LOCALE_H=1 HAVE_LANGINFO_H=1 HAVE_ICONV_H=1 \
EGD_SOCKET=\"/var/run/egd-pool\" WITH_RDPSND=1 HAVE_DIRENT_H=1 \
HAVE_ICONV=1 HAVE_SYS_STATVFS_H=1 \
HAVE_SYS_PARAM_H=1 HAVE_SYS_MOUNT_H=1 HAVE_STRUCT_STATVFS_F_NAMEMAX=1 \
KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/opt/VirtualBox\")\"/rdesktop-vrdp-keymaps\" \
RDESKTOP=1
ifdef WITH_BIRD_VD_HACKS
rdesktop-vrdp_DEFS += WITH_BIRD_VD_HACKS
endif
HAVE_MNTENT_H=1 HAVE_SETMNTENT=1 STAT_STATVFS=1 HAVE_SYS_VFS_H=1 HAVE_STRUCT_STATFS_F_NAMELEN=1 \
ICONV_CONST= RDPSND_OSS=1 WITH_RDPUSB=1 HAVE_SYS_STATFS_H=1
# Solaris 10 doesn't have dirfd(), and as thus we go for the low tech solution.
HAVE_DIRFD=1 HAVE_DECL_DIRFD=1 VBOX_USB_WITH_SYSFS=1
ifdef VBOX_WITH_LINUX_COMPILER_H
rdesktop-vrdp_DEFS.linux += VBOX_WITH_LINUX_COMPILER_H
endif
# @todo once rdp proxy is available on Solaris, add WITH_RDPUSB=1
# snv_166+ dirent.h: defines dd_fd only if __USE_LEGACY_PROTOTYPES__ is defined, otherwise uses d_fd, let's just
# define __USE_LEGACY_PROTOTYPES__ until our buildbox is updated sufficiently
HAVE_SYS_FILIO_H=1 RDPSND_SUN=1 HAVE_ICONV_H=1 ICONV_CONST= STAT_STATVFS64=1 _FILE_OFFSET_BITS=64 \
DIR_FD_MEMBER_NAME=dd_fd __USE_LEGACY_PROTOTYPES__ HAVE_SYS_VFS_H=1 HAVE_SYS_STATFS_H=1
RDPSND_OSS=1 HAVE_ICONV_H=1 ICONV_CONST=const HAVE_SYS_STATVFS_H=1 _FILE_OFFSET_BITS=64 HAVE_DIRFD=1
rdesktop-vrdp_SOURCES = \
tcp.c \
asn.c \
iso.c \
mcs.c \
secure.c \
rdp.c \
orders.c \
bitmap.c \
cache.c \
rdp5.c \
rdpdr.c \
serial.c \
disk.c \
mppc.c \
lspci.c \
ssl.c \
utils.c \
xwin.c \
xclip.c \
ctrl.c \
rdpsnd.c \
$(VBOX_PATH_DEVICES_USB)/linux/USBProxyDevice-linux.cpp \
$(VBOX_PATH_MAIN_LINUX)/USBGetDevices.cpp \
$(VBOX_PATH_USB_LIB)/USBLib.cpp
rdesktop-vrdp_INCS += \
$(VBOX_PATH_RDESKTOP_SRC) \
$(VBOX_PATH_RDESKTOP_SRC)/vrdp \
$(VBOX_PATH_DEVICES_USB) \
$(VBOX_PATH_MAIN_INCLUDE) \
$(PATH_ROOT)/include/VBox
## @todo implement usb proxy for Solaris
rdesktop-vrdp_LIBPATH = \
/usr/lib \
$(VBOX_LIBPATH_X11)
rdesktop-vrdp_LIBS = \
X11 \
$(LIB_RUNTIME)
nsl
iconv
#
# The keymaps.
#
INSTALLS += rdesktop-vrdp-keymaps
rdesktop-vrdp-keymaps_INST = $(INST_BIN)rdesktop-vrdp-keymaps/
rdesktop-vrdp-keymaps_MODE = 644
rdesktop-vrdp-keymaps_DEFPATH := $(PATH_SUB_CURRENT)/keymaps
rdesktop-vrdp-keymaps_SOURCES = \
$(notdir $(wildcard $(VBOX_PATH_RDESKTOP_SRC)/keymaps/*))
rdesktop-vrdp-keymaps_convert-map_MODE = 755
#
# The source tarball (further down).
#
INSTALLS += rdesktop-src
rdesktop-src_INSTTYPE = stage
rdesktop-src_INST = misc-staging/$(VBOX_RDESKTOP_SRC_SUBDIR)/
rdesktop-src_EXEC_SOURCES = \
configure \
bootstrap \
install-sh \
rdesktop-src_SOURCES = \
COPYING=>COPYING \
README=>README \
$(PATH_OUT)/product-generated.h=>include/product-generated.h \
$(PATH_OUT)/version-generated.h=>include/version-generated.h \
$(PATH_OUT)/obj/Runtime/errmsgdata.h=>include/errmsgdata.h \
$(PATH_OUT)/obj/Runtime/errmsgvboxcomdata.h=>include/errmsgvboxcomdata.h \
$(PATH_ROOT)/include/iprt/alloc.h=>include/iprt/alloc.h \
$(PATH_ROOT)/include/iprt/alloca.h=>include/iprt/alloca.h \
$(PATH_ROOT)/include/iprt/asm.h=>include/iprt/asm.h \
$(PATH_ROOT)/include/iprt/asm-amd64-x86.h=>include/iprt/asm-amd64-x86.h \
$(PATH_ROOT)/include/iprt/asm-math.h=>include/iprt/asm-math.h \
$(PATH_ROOT)/include/iprt/assert.h=>include/iprt/assert.h \
$(PATH_ROOT)/include/iprt/avl.h=>include/iprt/avl.h \
$(PATH_ROOT)/include/iprt/cdefs.h=>include/iprt/cdefs.h \
$(PATH_ROOT)/include/iprt/cpp/autores.h=>include/iprt/cpp/autores.h \
$(PATH_ROOT)/include/iprt/critsect.h=>include/iprt/critsect.h \
$(PATH_ROOT)/include/iprt/ctype.h=>include/iprt/ctype.h \
$(PATH_ROOT)/include/iprt/dir.h=>include/iprt/dir.h \
$(PATH_ROOT)/include/iprt/env.h=>include/iprt/env.h \
$(PATH_ROOT)/include/iprt/err.h=>include/iprt/err.h \
$(PATH_ROOT)/include/iprt/errno.h=>include/iprt/errno.h \
$(PATH_ROOT)/include/iprt/file.h=>include/iprt/file.h \
$(PATH_ROOT)/include/iprt/fs.h=>include/iprt/fs.h \
$(PATH_ROOT)/include/iprt/linux/sysfs.h=>include/iprt/linux/sysfs.h \
$(PATH_ROOT)/include/iprt/list.h=>include/iprt/list.h \
$(PATH_ROOT)/include/iprt/log.h=>include/iprt/log.h \
$(PATH_ROOT)/include/iprt/lockvalidator.h=>include/iprt/lockvalidator.h \
$(PATH_ROOT)/include/iprt/mem.h=>include/iprt/mem.h \
$(PATH_ROOT)/include/iprt/net.h=>include/iprt/net.h \
$(PATH_ROOT)/include/iprt/param.h=>include/iprt/param.h \
$(PATH_ROOT)/include/iprt/path.h=>include/iprt/path.h \
$(PATH_ROOT)/include/iprt/pipe.h=>include/iprt/pipe.h \
$(PATH_ROOT)/include/iprt/poll.h=>include/iprt/poll.h \
$(PATH_ROOT)/include/iprt/process.h=>include/iprt/process.h \
$(PATH_ROOT)/include/iprt/queueatomic.h=>include/iprt/queueatomic.h \
$(PATH_ROOT)/include/iprt/sg.h=>include/iprt/sg.h \
$(PATH_ROOT)/include/iprt/stdarg.h=>include/iprt/stdarg.h \
$(PATH_ROOT)/include/iprt/stdint.h=>include/iprt/stdint.h \
$(PATH_ROOT)/include/iprt/stream.h=>include/iprt/stream.h \
$(PATH_ROOT)/include/iprt/string.h=>include/iprt/string.h \
$(PATH_ROOT)/include/iprt/time.h=>include/iprt/time.h \
$(PATH_ROOT)/include/iprt/thread.h=>include/iprt/thread.h \
$(PATH_ROOT)/include/iprt/types.h=>include/iprt/types.h \
$(PATH_ROOT)/include/iprt/uni.h=>include/iprt/uni.h \
$(PATH_ROOT)/include/iprt/x86.h=>include/iprt/x86.h \
$(PATH_ROOT)/include/VBox/cdefs.h=>include/VBox/cdefs.h \
$(PATH_ROOT)/include/VBox/err.h=>include/VBox/err.h \
$(PATH_ROOT)/include/VBox/log.h=>include/VBox/log.h \
$(PATH_ROOT)/include/VBox/sup.h=>include/VBox/sup.h \
$(PATH_ROOT)/include/VBox/types.h=>include/VBox/types.h \
$(PATH_ROOT)/include/VBox/usb.h=>include/VBox/usb.h \
$(PATH_ROOT)/include/VBox/usbfilter.h=>include/VBox/usbfilter.h \
$(PATH_ROOT)/include/VBox/usblib.h=>include/VBox/usblib.h \
$(PATH_ROOT)/include/VBox/version.h=>include/VBox/version.h \
$(PATH_ROOT)/include/VBox/vusb.h=>include/VBox/vusb.h \
$(PATH_ROOT)/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp=>vrdp/linux/USBProxyDevice-linux.cpp \
$(PATH_ROOT)/src/VBox/Devices/USB/USBProxyDevice.h=>vrdp/USBProxyDevice.h \
$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/USBLib.cpp=>vrdp/USBLib.cpp \
$(PATH_ROOT)/src/VBox/Main/include/USBGetDevices.h=>vrdp/USBGetDevices.h \
$(PATH_ROOT)/src/VBox/Main/include/vector.h=>vrdp/vector.h \
$(PATH_ROOT)/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp=>Runtime/common/err/RTErrConvertFromErrno.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/err/RTErrConvertToErrno.cpp=>Runtime/common/err/RTErrConvertToErrno.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/misc/sg.cpp=>Runtime/common/misc/sg.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/path/RTPathAppendEx.cpp=>Runtime/common/path/RTPathAppendEx.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/path/RTPathCountComponents.cpp=>Runtime/common/path/RTPathCountComponents.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/path/RTPathFilename.cpp=>Runtime/common/path/RTPathFilename.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/path/rtPathRootSpecLen.cpp=>Runtime/common/path/rtPathRootSpecLen.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/path/RTPathStripFilename.cpp=>Runtime/common/path/RTPathStripFilename.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/path/RTPathStripTrailingSlash.cpp=>Runtime/common/path/RTPathStripTrailingSlash.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/path/rtPathVolumeSpecLen.cpp=>Runtime/common/path/rtPathVolumeSpecLen.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/string/stringalloc.cpp=>Runtime/common/string/stringalloc.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/string/strformatrt.cpp=>Runtime/common/string/strformatrt.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/string/strformattype.cpp=>Runtime/common/string/strformattype.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/string/unidata-flags.cpp=>Runtime/common/string/unidata-flags.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/string/unidata-upper.cpp=>Runtime/common/string/unidata-upper.cpp \
$(PATH_ROOT)/src/VBox/Runtime/common/string/unidata-lower.cpp=>Runtime/common/string/unidata-lower.cpp \
$(PATH_ROOT)/src/VBox/Runtime/generic/RTPathAbs-generic.cpp=>Runtime/generic/RTPathAbs-generic.cpp \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/alignmentchecks.h=>include/internal/alignmentchecks.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/dir.h=>include/internal/dir.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/file.h=>include/internal/file.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/fs.h=>include/internal/fs.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/iprt.h=>include/internal/iprt.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/mem.h=>include/internal/mem.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/path.h=>include/internal/path.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/pipe.h=>include/internal/pipe.h \
$(PATH_ROOT)/src/VBox/Runtime/include/internal/time.h=>include/internal/time.h \
$(PATH_ROOT)/src/VBox/Runtime/r3/alloc.cpp=>Runtime/r3/alloc.cpp \
$(PATH_ROOT)/src/VBox/Runtime/r3/alloc-ef.h=>Runtime/r3/alloc-ef.h \
$(PATH_ROOT)/src/VBox/Runtime/r3/dir.cpp=>Runtime/r3/dir.cpp \
$(PATH_ROOT)/src/VBox/Runtime/r3/fileio.cpp=>Runtime/r3/fileio.cpp \
$(PATH_ROOT)/src/VBox/Runtime/r3/fs.cpp=>Runtime/r3/fs.cpp \
$(PATH_ROOT)/src/VBox/Runtime/r3/linux/sysfs.cpp=>Runtime/r3/linux/sysfs.cpp \
$(PATH_ROOT)/src/VBox/Runtime/r3/stream.cpp=>Runtime/r3/stream.cpp
INSTALLS += rdesktop-tarball
rdesktop-tarball_INST = $(INST_BIN)
rdesktop-tarball_MODE = a+r,u+w
rdesktop-tarball_SOURCES = $(rdesktop-tarball_0_OUTDIR)/rdesktop-vrdp.tar.gz
rdesktop-tarball_CLEAN = $(rdesktop-tarball_0_OUTDIR)/rdesktop-vrdp.tar.gz
$$(rdesktop-tarball_0_OUTDIR)/rdesktop-vrdp.tar.gz: \
$$(rdesktop-src_1_TARGET) \
| $$(dir $$@)
$(call MSG_TOOL,tar/gzip,,$@)
$(QUIET)cd $(PATH_STAGE)/$(rdesktop-src_INST).. && tar -cf - $(VBOX_RDESKTOP_SRC_SUBDIR)/ | gzip - > $@
include $(FILE_KBUILD_SUB_FOOTER)