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