1 | # $Id: Makefile.kmk 98103 2023-01-17 14:15:46Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for VBox LightDM greeter for providing automated logons.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2012-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | ifndef VBOX_LIGHTDM_GREETER_CONFIG_KMK_INCLUDED
|
---|
32 | include $(PATH_SUB_CURRENT)/Config.kmk
|
---|
33 | endif
|
---|
34 |
|
---|
35 | ifndef VBOX_OSE
|
---|
36 | include $(PATH_SUB_CURRENT)/liblightdm-gobject-1.5.0/Makefile.kmk
|
---|
37 | endif
|
---|
38 |
|
---|
39 | # Enable building with FLTK UI + PNG support.
|
---|
40 | VBOX_WITH_FLTK := 1
|
---|
41 | VBOX_GREETER_WITH_PNG_SUPPORT := 1
|
---|
42 |
|
---|
43 | # The greeter module.
|
---|
44 | PROGRAMS += vbox-greeter
|
---|
45 | vbox-greeter_TEMPLATE = VBOXGUESTR3EXE
|
---|
46 | vbox-greeter_SDKS = VBoxGlib20WithIo
|
---|
47 | vbox-greeter_DEFS = LOG_TO_BACKDOOR VBOX_WITH_HGCM
|
---|
48 | vbox-greeter_DEFS += \
|
---|
49 | VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
|
---|
50 | vbox-greeter_DEFS += \
|
---|
51 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
52 | $(if $(VBOX_GREETER_WITH_PNG_SUPPORT),VBOX_GREETER_WITH_PNG_SUPPORT,)
|
---|
53 | ifdef VBOX_WITH_FLTK
|
---|
54 | vbox-greeter_DEFS += \
|
---|
55 | VBOX_WITH_FLTK
|
---|
56 | else
|
---|
57 | vbox-greeter_DEFS += \
|
---|
58 | GTK_DISABLE_SINGLE_INCLUDES \
|
---|
59 | GDK_DISABLE_DEPRECATED
|
---|
60 | endif
|
---|
61 | vbox-greeter_CFLAGS := $(if $(VBOX_OSE),%(filter-out -I%,$(shell pkg-config --cflags liblightdm-gobject-1)),)
|
---|
62 | ## @todo r=bird: Why are we cooking our own lightdm-gobject-1 but using system headers?
|
---|
63 | ## That sounds like a very risky business to me. I've added liblightdm-gobject-1.5.0
|
---|
64 | ## to the INCS, however lightdm.h is missing and will be taken from the system.
|
---|
65 | vbox-greeter_INCS := \
|
---|
66 | /usr/lib/i386-linux-gnu/glib-2.0/include \
|
---|
67 | /usr/lib/x86_64-linux-gnu/glib-2.0/include \
|
---|
68 | /usr/include/glib-2.0 \
|
---|
69 | $(if $(VBOX_OSE),,liblightdm-gobject-1.5.0) \
|
---|
70 | /usr/include/lightdm-gobject-1 \
|
---|
71 | $(if $(VBOX_OSE),$(patsubst -I%,%,%(filter -I%,$(shell pkg-config --cflags liblightdm-gobject-1))),)
|
---|
72 | ifndef VBOX_WITH_FLTK
|
---|
73 | vbox-greeter_INCS += \
|
---|
74 | /usr/include/glib-2.0 \
|
---|
75 | /usr/include/gtk-3.0 \
|
---|
76 | /usr/include/pango-1.0 \
|
---|
77 | /usr/include/cairo \
|
---|
78 | /usr/include/gdk-pixbuf-2.0 \
|
---|
79 | /usr/include/atk-1.0
|
---|
80 | endif
|
---|
81 |
|
---|
82 | vbox-greeter_SOURCES = \
|
---|
83 | vbox-greeter.cpp
|
---|
84 |
|
---|
85 | vbox-greeter_LIBS := \
|
---|
86 | $(if $(VBOX_OSE),lightdm-gobject-1,$(VBOX_PATH_ADDITIONS_LIB)/VBox-liblightdm-gobject$(VBOX_SUFF_LIB)) \
|
---|
87 | glib-2.0 \
|
---|
88 | gio-2.0 \
|
---|
89 | gobject-2.0 \
|
---|
90 | $(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
|
---|
91 | $(VBOX_LIB_VBGL_R3_SHARED) \
|
---|
92 | $(VBOX_LIB_IPRT_GUEST_R3_SHARED)
|
---|
93 | ifdef VBOX_WITH_FLTK
|
---|
94 | vbox-greeter_LIBS += fltk
|
---|
95 | ifdef VBOX_GREETER_WITH_PNG_SUPPORT
|
---|
96 | vbox-greeter_LIBS += fltk_images
|
---|
97 | endif
|
---|
98 | if $(HOSTNAME) == "3960x.dev" && $(USER) == "bird" # whatever.
|
---|
99 | vbox-greeter_LIBS += stdc++
|
---|
100 | endif
|
---|
101 | else
|
---|
102 | vbox-greeter_LIBS += gtk-3
|
---|
103 | endif
|
---|
104 |
|
---|
105 | vbox-greeter_LDFLAGS = $(if $(VBOX_OSE),$(shell pkg-config --libs liblightdm-gobject-1),)
|
---|
106 | ifdef VBOX_WITH_FLTK
|
---|
107 | #vbox-greeter_LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro /usr/lib/i386-linux-gnu/libfltk.a -lXext -lXft -lfontconfig -lfontconfig -lXinerama -ldl -lm -lX11
|
---|
108 | vbox-greeter_LDFLAGS += -s
|
---|
109 | endif
|
---|
110 |
|
---|
111 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|