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