1 ################################################################################
5 ################################################################################
7 # Changeset on the master branch
8 FREERDP_VERSION
= 17834af7bb378f85a3b3cc4dcadaa5125a337e16
9 FREERDP_SITE
= $(call github
,FreeRDP
,FreeRDP
,$(FREERDP_VERSION
))
10 FREERDP_DEPENDENCIES
= libglib2 openssl zlib
11 FREERDP_LICENSE
= Apache-2.0
12 FREERDP_LICENSE_FILES
= LICENSE
14 FREERDP_INSTALL_STAGING
= YES
16 FREERDP_CONF_OPTS
= -DWITH_MANPAGES
=OFF
-Wno-dev
18 ifeq ($(BR2_PACKAGE_FREERDP_GSTREAMER
),y
)
19 FREERDP_CONF_OPTS
+= -DWITH_GSTREAMER_0_10
=ON
20 FREERDP_DEPENDENCIES
+= gstreamer gst-plugins-base libxml2 host-pkgconf
22 FREERDP_CONF_OPTS
+= -DWITH_GSTREAMER_0_10
=OFF
25 ifeq ($(BR2_PACKAGE_FREERDP_GSTREAMER1
),y
)
26 FREERDP_CONF_OPTS
+= -DWITH_GSTREAMER_1_0
=ON
27 FREERDP_DEPENDENCIES
+= gstreamer1 gst1-plugins-base
29 FREERDP_CONF_OPTS
+= -DWITH_GSTREAMER_1_0
=OFF
32 ifeq ($(BR2_PACKAGE_CUPS
),y
)
33 FREERDP_CONF_OPTS
+= -DWITH_CUPS
=ON
34 FREERDP_DEPENDENCIES
+= cups
36 FREERDP_CONF_OPTS
+= -DWITH_CUPS
=OFF
39 ifeq ($(BR2_PACKAGE_FFMPEG
),y
)
40 FREERDP_CONF_OPTS
+= -DWITH_FFMPEG
=ON
41 FREERDP_DEPENDENCIES
+= ffmpeg
43 FREERDP_CONF_OPTS
+= -DWITH_FFMPEG
=OFF
46 ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER
),y
)
47 FREERDP_CONF_OPTS
+= -DWITH_ALSA
=ON
48 FREERDP_DEPENDENCIES
+= alsa-lib
50 FREERDP_CONF_OPTS
+= -DWITH_ALSA
=OFF
53 ifeq ($(BR2_PACKAGE_PULSEAUDIO
),y
)
54 FREERDP_CONF_OPTS
+= -DWITH_PULSEAUDIO
=ON
55 FREERDP_DEPENDENCIES
+= pulseaudio
57 FREERDP_CONF_OPTS
+= -DWITH_PULSEAUDIO
=OFF
60 ifeq ($(BR2_ARM_CPU_HAS_NEON
),y
)
61 FREERDP_CONF_OPTS
+= -DWITH_NEON
=ON
63 FREERDP_CONF_OPTS
+= -DWITH_NEON
=OFF
66 ifeq ($(BR2_X86_CPU_HAS_SSE2
),y
)
67 FREERDP_CONF_OPTS
+= -DWITH_SSE2
=ON
69 FREERDP_CONF_OPTS
+= -DWITH_SSE2
=OFF
72 ifeq ($(BR2_arm
)$(BR2_armeb
),y
)
73 FREERDP_CONF_OPTS
+= -DARM_FP_ABI
=$(call qstrip
,$(BR2_GCC_TARGET_FLOAT_ABI
))
76 #---------------------------------------
77 # Enabling server and/or client
79 # Clients and server interface must always be enabled to build the
80 # corresponding libraries.
81 FREERDP_CONF_OPTS
+= -DWITH_SERVER_INTERFACE
=ON
82 FREERDP_CONF_OPTS
+= -DWITH_CLIENT_INTERFACE
=ON
84 ifeq ($(BR2_PACKAGE_FREERDP_SERVER
),y
)
85 FREERDP_CONF_OPTS
+= -DWITH_SERVER
=ON
88 ifneq ($(BR2_PACKAGE_FREERDP_CLIENT_X11
)$(BR2_PACKAGE_FREERDP_CLIENT_WL
),)
89 FREERDP_CONF_OPTS
+= -DWITH_CLIENT
=ON
92 #---------------------------------------
93 # Libraries for client and/or server
95 # The FreeRDP buildsystem uses non-orthogonal options. For example it
96 # is not possible to build the server and the wayland client without
97 # also building the X client. That's because the dependencies of the
98 # server (the X libraries) are a superset of those of the X client.
99 # So, as soon as FreeRDP is configured for the server and the wayland
100 # client, it will believe it also has to build the X client, because
101 # the libraries it needs are enabled.
103 # Furthermore, the shadow server is always built, even if there's nothing
104 # it can serve (i.e. the X libs are disabled).
106 # So, we do not care whether we build too much; we remove, as
107 # post-install hooks, whatever we do not want.
109 # If Xorg is enabled, and the server or the X client are, then libX11
110 # and libXext are forcibly enabled at the Kconfig level. However, if
111 # Xorg is enabled but neither the server nor the X client are, then
112 # there's nothing that guarantees those two libs are enabled. So we
113 # really must check for them.
114 ifeq ($(BR2_PACKAGE_XLIB_LIBX11
)$(BR2_PACKAGE_XLIB_LIBXEXT
),yy
)
115 FREERDP_DEPENDENCIES
+= xlib_libX11 xlib_libXext
116 FREERDP_CONF_OPTS
+= -DWITH_X11
=ON
118 FREERDP_CONF_OPTS
+= -DWITH_X11
=OFF
121 # The following libs are either optional or mandatory only for either
122 # the server or the client. A mandatory library for either one is
123 # selected from Kconfig, so we can make it conditional here
124 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR
),y
)
125 FREERDP_CONF_OPTS
+= -DWITH_XCURSOR
=ON
126 FREERDP_DEPENDENCIES
+= xlib_libXcursor
128 FREERDP_CONF_OPTS
+= -DWITH_XCURSOR
=OFF
131 ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE
),y
)
132 FREERDP_CONF_OPTS
+= -DWITH_XDAMAGE
=ON
133 FREERDP_DEPENDENCIES
+= xlib_libXdamage
135 FREERDP_CONF_OPTS
+= -DWITH_XDAMAGE
=OFF
138 ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES
),y
)
139 FREERDP_CONF_OPTS
+= -DWITH_XFIXES
=ON
140 FREERDP_DEPENDENCIES
+= xlib_libXfixes
142 FREERDP_CONF_OPTS
+= -DWITH_XFIXES
=OFF
145 ifeq ($(BR2_PACKAGE_XLIB_LIBXI
),y
)
146 FREERDP_CONF_OPTS
+= -DWITH_XI
=ON
147 FREERDP_DEPENDENCIES
+= xlib_libXi
149 FREERDP_CONF_OPTS
+= -DWITH_XI
=OFF
152 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA
),y
)
153 FREERDP_CONF_OPTS
+= -DWITH_XINERAMA
=ON
154 FREERDP_DEPENDENCIES
+= xlib_libXinerama
156 FREERDP_CONF_OPTS
+= -DWITH_XINERAMA
=OFF
159 ifeq ($(BR2_PACKAGE_XLIB_LIBXKBFILE
),y
)
160 FREERDP_CONF_OPTS
+= -DWITH_XKBFILE
=ON
161 FREERDP_DEPENDENCIES
+= xlib_libxkbfile
163 FREERDP_CONF_OPTS
+= -DWITH_XKBFILE
=OFF
166 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR
),y
)
167 FREERDP_CONF_OPTS
+= -DWITH_XRANDR
=ON
168 FREERDP_DEPENDENCIES
+= xlib_libXrandr
170 FREERDP_CONF_OPTS
+= -DWITH_XRANDR
=OFF
173 ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER
),y
)
174 FREERDP_CONF_OPTS
+= -DWITH_XRENDER
=ON
175 FREERDP_DEPENDENCIES
+= xlib_libXrender
177 FREERDP_CONF_OPTS
+= -DWITH_XRENDER
=OFF
180 ifeq ($(BR2_PACKAGE_XLIB_LIBXTST
),y
)
181 FREERDP_CONF_OPTS
+= -DWITH_XTEST
=ON
182 FREERDP_DEPENDENCIES
+= xlib_libXtst
184 FREERDP_CONF_OPTS
+= -DWITH_XTEST
=OFF
187 ifeq ($(BR2_PACKAGE_XLIB_LIBXV
),y
)
188 FREERDP_CONF_OPTS
+= -DWITH_XV
=ON
189 FREERDP_DEPENDENCIES
+= xlib_libXv
191 FREERDP_CONF_OPTS
+= -DWITH_XV
=OFF
194 ifeq ($(BR2_PACKAGE_WAYLAND
),y
)
195 FREERDP_DEPENDENCIES
+= wayland
196 FREERDP_CONF_OPTS
+= -DWITH_WAYLAND
=ON
198 FREERDP_CONF_OPTS
+= -DWITH_WAYLAND
=OFF
201 #---------------------------------------
202 # Post-install hooks to cleanup and install missing stuff
204 # Shadow server is always installed, no matter what, so we manually
205 # remove it if the user does not want the server.
206 ifeq ($(BR2_PACKAGE_FREERDP_SERVER
),)
207 define FREERDP_RM_SHADOW_SERVER
208 rm -f
$(TARGET_DIR
)/usr
/bin
/freerdp-shadow
210 FREERDP_POST_INSTALL_TARGET_HOOKS
+= FREERDP_RM_SHADOW_SERVER
213 # X client is always built as soon as a client is enabled and the
214 # necessary libs are enabled (e.g. because of the server), so manually
215 # remove it if the user does not want it.
216 ifeq ($(BR2_PACKAGE_FREERDP_CLIENT_X11
),)
217 define FREERDP_RM_CLIENT_X11
218 rm -f
$(TARGET_DIR
)/usr
/bin
/xfreerdp
219 rm -f
$(TARGET_DIR
)/usr
/lib
/libxfreerdp-client
*
221 FREERDP_POST_INSTALL_TARGET_HOOKS
+= FREERDP_RM_CLIENT_X11
222 define FREERDP_RM_CLIENT_X11_LIB
223 rm -f
$(STAGING_DIR
)/usr
/lib
/libxfreerdp-client
*
225 FREERDP_POST_INSTALL_STAGING_HOOKS
+= FREERDP_RM_CLIENT_X11_LIB
228 # Wayland client is always built as soon as wayland is enabled, so
229 # manually remove it if the user does not want it.
230 ifeq ($(BR2_PACKAGE_FREERDP_CLIENT_WL
),)
231 define FREERDP_RM_CLIENT_WL
232 rm -f
$(TARGET_DIR
)/usr
/bin
/wlfreerdp
234 FREERDP_POST_INSTALL_TARGET_HOOKS
+= FREERDP_RM_CLIENT_WL
237 # Remove static libraries in unusual dir
238 define FREERDP_CLEANUP
239 rm -rf
$(TARGET_DIR
)/usr
/lib
/freerdp
241 FREERDP_POST_INSTALL_TARGET_HOOKS
+= FREERDP_CLEANUP
243 # Install the server key and certificate, so that a client can connect.
244 # A user can override them with its own in a post-build script, if needed.
245 # We install them even if the server is not enabled, since another server
246 # can be built and linked with libfreerdp (e.g. weston with the RDP
247 # backend). Key and cert are installed world-readable, so non-root users
248 # can start a server.
249 define FREERDP_INSTALL_KEYS
250 $(INSTALL
) -m
0644 -D
$(@D
)/server
/Sample
/server.key \
251 $(TARGET_DIR
)/etc
/freerdp
/keys
/server.key
252 $(INSTALL
) -m
0644 -D
$(@D
)/server
/Sample
/server.crt \
253 $(TARGET_DIR
)/etc
/freerdp
/keys
/server.crt
255 FREERDP_POST_INSTALL_TARGET_HOOKS
+= FREERDP_INSTALL_KEYS
257 $(eval
$(cmake-package
))