summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk
blob: 79c96d89361c5a650d3beb4cacefd0e32d57ab3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# $Id: Makefile.kmk $
## @file
# Makefile for VBox LightDM greeter for providing automated logons.
#

#
# Copyright (C) 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

ifndef VBOX_OSE
 include $(PATH_SUB_CURRENT)/liblightdm-gobject-1.5.0/Makefile.kmk
endif

# Enable building with FLTK UI + PNG support.
VBOX_WITH_FLTK := 1
VBOX_GREETER_WITH_PNG_SUPPORT := 1

# The greeter module.
PROGRAMS += vbox-greeter

vbox-greeter_TEMPLATE = VBOXGUESTR3EXE
vbox-greeter_DEFS     = LOG_TO_BACKDOOR VBOX_WITH_HGCM
vbox-greeter_DEFS    += \
	VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
vbox-greeter_DEFS    += \
	$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
	$(if $(VBOX_WITH_FLTK),VBOX_WITH_FLTK,) \
	$(if $(VBOX_GREETER_WITH_PNG_SUPPORT),VBOX_GREETER_WITH_PNG_SUPPORT,)

ifndef VBOX_WITH_FLTK
 vbox-greeter_DEFS   += \
	GTK_DISABLE_SINGLE_INCLUDES \
	GDK_DISABLE_DEPRECATED
endif
vbox-greeter_SOURCES  = vbox-greeter.cpp
### todo: define some _INCS in Config.kmk and use 'pkg-config glib-2.0 --cflags' in configure to override
vbox-greeter_INCS     = \
	/usr/lib/i386-linux-gnu/glib-2.0/include \
	/usr/lib/x86_64-linux-gnu/glib-2.0/include \
	/usr/include/glib-2.0 \
	/usr/include/lightdm-gobject-1
ifndef VBOX_WITH_FLTK
 vbox-greeter_INCS   += \
	/usr/include/glib-2.0 \
	/usr/include/gtk-3.0 \
	/usr/include/pango-1.0 \
	/usr/include/cairo \
	/usr/include/gdk-pixbuf-2.0 \
	/usr/include/atk-1.0
endif
### todo: define some _LIBS in Config.kmk and use 'pkg-config glib-2.0 --libs' in configure to override
vbox-greeter_LIBS = \
	$(if $(VBOX_OSE),lightdm-gobject-1,$(VBOX_PATH_ADDITIONS_LIB)/VBox-liblightdm-gobject$(VBOX_SUFF_LIB)) \
	glib-2.0 \
	gio-2.0 \
	gobject-2.0 \
	$(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
	$(VBOX_LIB_VBGL_R3_SHARED) \
	$(VBOX_LIB_IPRT_GUEST_R3_SHARED)
ifndef VBOX_WITH_FLTK
 vbox-greeter_LIBS += gtk-3
endif
ifdef VBOX_WITH_FLTK
 #vbox-greeter_LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro /usr/lib/i386-linux-gnu/libfltk.a -lXext -lXft -lfontconfig -lfontconfig -lXinerama -ldl -lm -lX11
 vbox-greeter_LDFLAGS += -s
 vbox-greeter_LIBS += fltk
 ifdef VBOX_GREETER_WITH_PNG_SUPPORT
  vbox-greeter_LIBS += fltk_images
 endif
endif

include $(FILE_KBUILD_SUB_FOOTER)