glx: remove dl_can_open() logic from supports_api()
[mesa-waffle.git] / Android.mk
blobabfe4ffe1e1eb0c0c2dcd640e77c9969fb03fce4
1 LOCAL_PATH := $(call my-dir)
2 include $(CLEAR_VARS)
4 waffle_top := $(LOCAL_PATH)
7 # !!! The version must be updated in tandem with the CMakeLists !!!
9 waffle_major_version := 1
10 waffle_minor_version := 5
11 waffle_patch_version := 90
12 waffle_api_version := 0x0106
14 waffle_android_major_version := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
15 waffle_android_minor_version := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
16 waffle_android_version := $(waffle_android_major_version).$(waffle_android_minor_version)
18 $(waffle_top)/include/waffle/waffle_version.h: \
19 $(waffle_top)/Android.mk \
20 $(waffle_top)/include/waffle/waffle_version.h.in
21 @echo "target Gen: libwaffle <= $(waffle_top)/include/waffle/waffle_version.h"
22 @sed -e 's/@waffle_major_version@/$(waffle_major_version)/' \
23 -e 's/@waffle_minor_version@/$(waffle_minor_version)/' \
24 -e 's/@waffle_patch_version@/$(waffle_patch_version)/' \
25 $(waffle_top)/include/waffle/waffle_version.h.in \
26 > $(waffle_top)/include/waffle/waffle_version.h
28 LOCAL_MODULE_TAGS := eng
29 LOCAL_MODULE := libwaffle-$(waffle_major_version)
31 LOCAL_CFLAGS := \
32 -DANDROID_STUB \
33 -DWAFFLE_API_VERSION=$(waffle_api_version) \
34 -DWAFFLE_API_EXPERIMENTAL \
35 -DWAFFLE_HAS_ANDROID \
36 -DWAFFLE_ANDROID_MAJOR_VERSION=$(waffle_android_major_version) \
37 -DWAFFLE_ANDROID_MINOR_VERSION=$(waffle_android_minor_version) \
38 -Wno-pointer-arith
40 ifeq ($(shell echo "$(waffle_android_version) >= 4.4" | bc),1)
41 LOCAL_CONLYFLAGS := -std=c99
42 else
43 LOCAL_CFLAGS += -std=c99
44 endif
46 LOCAL_CFLAGS += -fvisibility=hidden
48 LOCAL_C_INCLUDES := \
49 $(LOCAL_PATH)/include \
50 $(LOCAL_PATH)/include/waffle \
51 $(LOCAL_PATH)/src/ \
52 $(LOCAL_PATH)/src/waffle/api/ \
53 $(LOCAL_PATH)/src/waffle/core/ \
54 $(LOCAL_PATH)/src/waffle/egl/ \
55 $(LOCAL_PATH)/src/waffle/linux/ \
56 $(LOCAL_PATH)/src/waffle/droid/ \
57 $(LOCAL_PATH)/third_party/khronos/ \
58 $(LOCAL_PATH)/third_party/threads/
60 LOCAL_SRC_FILES := \
61 src/waffle/core/wcore_tinfo.c \
62 src/waffle/core/wcore_config_attrs.c \
63 src/waffle/core/wcore_error.c \
64 src/waffle/core/wcore_util.c \
65 src/waffle/core/wcore_display.c \
66 src/waffle/core/wcore_attrib_list.c \
67 src/waffle/api/api_priv.c \
68 src/waffle/api/waffle_attrib_list.c \
69 src/waffle/api/waffle_config.c \
70 src/waffle/api/waffle_context.c \
71 src/waffle/api/waffle_display.c \
72 src/waffle/api/waffle_enum.c \
73 src/waffle/api/waffle_error.c \
74 src/waffle/api/waffle_gl_misc.c \
75 src/waffle/api/waffle_init.c \
76 src/waffle/api/waffle_window.c \
77 src/waffle/api/waffle_dl.c \
78 src/waffle/linux/linux_dl.c \
79 src/waffle/linux/linux_platform.c \
80 src/waffle/egl/wegl_config.c \
81 src/waffle/egl/wegl_context.c \
82 src/waffle/egl/wegl_display.c \
83 src/waffle/egl/wegl_platform.c \
84 src/waffle/egl/wegl_util.c \
85 src/waffle/egl/wegl_window.c \
86 src/waffle/android/droid_platform.c \
87 src/waffle/android/droid_display.c \
88 src/waffle/android/droid_window.c \
89 src/waffle/android/droid_surfaceflingerlink.cpp \
90 third_party/threads/threads_posix.c
92 LOCAL_SHARED_LIBRARIES := \
93 libdl \
94 libutils \
95 libgui
97 LOCAL_GENERATED_SOURCES := \
98 $(LOCAL_PATH)/include/waffle/waffle_version.h
100 LOCAL_COPY_HEADERS := \
101 include/waffle/waffle.h \
102 include/waffle/waffle_gbm.h \
103 include/waffle/waffle_glx.h \
104 include/waffle/waffle_version.h \
105 include/waffle/waffle_wayland.h \
106 include/waffle/waffle_x11_egl.h
108 LOCAL_COPY_HEADERS_TO := waffle-$(waffle_major_version)
110 include $(BUILD_SHARED_LIBRARY)
112 SUBDIRS := \
113 examples \
114 src/utils
116 mkfiles := $(patsubst %,$(waffle_top)/%/Android.mk,$(SUBDIRS))
117 include $(mkfiles)