1f711a8315a316974abe54ebe5fc350019007c29
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / efl / libecore / libecore.mk
1 ################################################################################
2 #
3 # libecore
4 #
5 ################################################################################
6
7 LIBECORE_VERSION = $(EFL_VERSION)
8 LIBECORE_SOURCE = ecore-$(LIBECORE_VERSION).tar.bz2
9 LIBECORE_SITE = http://download.enlightenment.org/releases
10 LIBECORE_LICENSE = BSD-2c
11 LIBECORE_LICENSE_FILES = COPYING
12
13 LIBECORE_INSTALL_STAGING = YES
14
15 LIBECORE_DEPENDENCIES = host-pkgconf libeina
16
17 HOST_LIBECORE_DEPENDENCIES = host-pkgconf host-libeina host-libevas
18 HOST_LIBECORE_CONF_OPTS +=              \
19         --enable-ecore-evas             \
20         --disable-simple-x11            \
21         --disable-ecore-directfb        \
22         --disable-ecore-x               \
23         --disable-ecore-x-xcb           \
24         --disable-ecore-imf-xim
25
26 # default options
27 LIBECORE_CONF_OPTS = --disable-simple-x11
28
29 ifeq ($(BR2_PACKAGE_TSLIB),y)
30 LIBECORE_DEPENDENCIES += tslib
31 endif
32
33 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
34 LIBECORE_DEPENDENCIES += libglib2
35 endif
36
37 ifeq ($(BR2_PACKAGE_OPENSSL),y)
38 LIBECORE_DEPENDENCIES += openssl
39 LIBECORE_CONF_OPTS += --enable-openssl
40 else
41 LIBECORE_CONF_OPTS += --disable-openssl
42 endif
43
44 ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy)
45 LIBECORE_DEPENDENCIES += gnutls libgcrypt
46 LIBECORE_CONF_OPTS += --enable-gnutls --with-libgcrypt-prefix=$(STAGING_DIR)/usr
47 else
48 LIBECORE_CONF_OPTS += --disable-gnutls
49 endif
50
51 ifeq ($(BR2_PACKAGE_LIBCURL),y)
52 LIBECORE_DEPENDENCIES += libcurl
53 endif
54
55 # libecore
56 ifeq ($(BR2_PACKAGE_LIBECORE_DIRECTFB),y)
57 LIBECORE_CONF_OPTS += --enable-ecore-directfb
58 LIBECORE_DEPENDENCIES += directfb
59 else
60 LIBECORE_CONF_OPTS += --disable-ecore-directfb
61 endif
62
63 ifeq ($(BR2_PACKAGE_LIBECORE_FB),y)
64 LIBECORE_CONF_OPTS += --enable-ecore-fb
65 else
66 LIBECORE_CONF_OPTS += --disable-ecore-fb
67 endif
68
69 ifeq ($(BR2_PACKAGE_LIBECORE_SDL),y)
70 LIBECORE_CONF_OPTS += --enable-ecore-sdl
71 LIBECORE_DEPENDENCIES += sdl
72 else
73 LIBECORE_CONF_OPTS += --disable-ecore-sdl
74 endif
75
76 ifeq ($(BR2_PACKAGE_LIBECORE_X),y)
77 LIBECORE_CONF_OPTS += --enable-ecore-x \
78         --with-x=$(STAGING_DIR) \
79         --x-includes=$(STAGING_DIR)/usr/include \
80         --x-libraries=$(STAGING_DIR)/usr/lib
81 LIBECORE_DEPENDENCIES += xlib_libXext xlib_libX11
82 else
83 LIBECORE_CONF_OPTS += --disable-ecore-x --disable-ecore-imf-xim
84 endif
85
86 ifeq ($(BR2_PACKAGE_LIBECORE_X_XCB),y)
87 LIBECORE_CONF_OPTS += --enable-ecore-x-xcb
88 LIBECORE_DEPENDENCIES += libxcb xlib_libX11 xcb-util pixman
89
90 # src/util/makekeys is executed at build time to generate
91 # ecore_xcb_keysym_table.h, so it should get compiled for the host.
92 # The ecore makefile unfortunately doesn't know about cross
93 # compilation so this doesn't work.  Long term, we should probably
94 # teach it about CC_FOR_BUILD, but for now simply build makekeys by
95 # hand in advance
96 define LIBECORE_BUILD_MAKEKEYS_FOR_HOST
97         $(HOST_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/src/util makekeys.o makekeys
98 endef
99
100 LIBECORE_POST_EXTRACT_HOOKS += LIBECORE_BUILD_MAKEKEYS_FOR_HOST
101 else
102 LIBECORE_CONF_OPTS += --disable-ecore-x-xcb
103 endif
104
105 # libecore-evas
106 ifeq ($(BR2_PACKAGE_LIBECORE_EVAS),y)
107 LIBECORE_CONF_OPTS += --enable-ecore-evas
108 LIBECORE_DEPENDENCIES += libevas
109 else
110 LIBECORE_CONF_OPTS += --disable-ecore-evas
111 endif
112
113 $(eval $(autotools-package))
114 $(eval $(host-autotools-package))