diff options
Diffstat (limited to '')
-rw-r--r-- | src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk b/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk new file mode 100644 index 00000000..5cc838c6 --- /dev/null +++ b/src/VBox/Additions/linux/lightdm-greeter/Makefile.kmk @@ -0,0 +1,104 @@ +# $Id: Makefile.kmk $ +## @file +# Makefile for VBox LightDM greeter for providing automated logons. +# + +# +# Copyright (C) 2012-2019 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_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 +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_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 +ifeq ($(KBUILD_TARGET),linux) +vbox-greeter_LIBS += crypt +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) |