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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# $Id: Makefile.kmk $
## @file
# Makefile for VBox LightDM greeter for providing automated logons.
#
# Note! This isn't compiled any more. Remove?
#
#
# Copyright (C) 2012-2023 Oracle and/or its affiliates.
#
# This file is part of VirtualBox base platform packages, as
# available from https://www.virtualbox.org.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, in version 3 of the
# License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses>.
#
# SPDX-License-Identifier: GPL-3.0-only
#
SUB_DEPTH = ../../../../..
include $(KBUILD_PATH)/subheader.kmk
ifndef VBOX_LIGHTDM_GREETER_CONFIG_KMK_INCLUDED
include $(PATH_SUB_CURRENT)/Config.kmk
endif
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_SDKS = VBoxGlib20WithIo
vbox-greeter_DEFS = LOG_TO_BACKDOOR VBOX_WITH_HGCM
ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
vbox-greeter_DEFS += VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
else
vbox-greeter_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
endif
vbox-greeter_DEFS += \
$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
$(if $(VBOX_GREETER_WITH_PNG_SUPPORT),VBOX_GREETER_WITH_PNG_SUPPORT,)
ifdef VBOX_WITH_FLTK
vbox-greeter_DEFS += \
VBOX_WITH_FLTK
else
vbox-greeter_DEFS += \
GTK_DISABLE_SINGLE_INCLUDES \
GDK_DISABLE_DEPRECATED
endif
vbox-greeter_CFLAGS := $(if $(VBOX_OSE),%(filter-out -I%,$(shell pkg-config --cflags liblightdm-gobject-1)),)
## @todo r=bird: Why are we cooking our own lightdm-gobject-1 but using system headers?
## That sounds like a very risky business to me. I've added liblightdm-gobject-1.5.0
## to the INCS, however lightdm.h is missing and will be taken from the system.
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 \
$(if $(VBOX_OSE),,liblightdm-gobject-1.5.0) \
/usr/include/lightdm-gobject-1 \
$(if $(VBOX_OSE),$(patsubst -I%,%,%(filter -I%,$(shell pkg-config --cflags liblightdm-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
vbox-greeter_SOURCES = \
vbox-greeter.cpp
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)
ifdef VBOX_WITH_FLTK
vbox-greeter_LIBS += fltk
ifdef VBOX_GREETER_WITH_PNG_SUPPORT
vbox-greeter_LIBS += fltk_images
endif
if $(HOSTNAME) == "3960x.dev" && $(USER) == "bird" # whatever.
vbox-greeter_LIBS += stdc++
endif
else
vbox-greeter_LIBS += gtk-3
endif
vbox-greeter_LDFLAGS = $(if $(VBOX_OSE),$(shell pkg-config --libs liblightdm-gobject-1),)
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
endif
include $(FILE_KBUILD_SUB_FOOTER)
|