/* not need continue to loop all paths once the driver is found */
if (dri2_dpy->driver != NULL)
break;
-
-#ifdef ANDROID
- snprintf(path, sizeof path, "%.*s/gallium_dri.so", len, p);
- dri2_dpy->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
- if (dri2_dpy->driver == NULL)
- _eglLog(_EGL_DEBUG, "failed to open %s: %s\n", path, dlerror());
- else
- break;
-#endif
}
if (dri2_dpy->driver == NULL) {
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_FREEDRENO),)
+GALLIUM_TARGET_DRIVERS += msm
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_freedreno)
$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_I915),)
+GALLIUM_TARGET_DRIVERS += i915
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_i915)
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_NOUVEAU),)
+GALLIUM_TARGET_DRIVERS += nouveau
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_nouveau)
$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_PL111),)
+GALLIUM_TARGET_DRIVERS += pl111
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_pl111)
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_R300),)
+GALLIUM_TARGET_DRIVERS += r300
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_radeon)
$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_R600),)
+GALLIUM_TARGET_DRIVERS += r600
$(eval GALLIUM_LIBS += \
$(LOCAL_MODULE) \
libmesa_winsys_radeon)
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_RADEONSI),)
+GALLIUM_TARGET_DRIVERS += radeonsi
$(eval GALLIUM_LIBS += \
$(LOCAL_MODULE) \
$(LOCAL_STATIC_LIBRARIES) \
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_SOFTPIPE),)
+GALLIUM_TARGET_DRIVERS += swrast
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_sw_dri)
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_VMWGFX),)
+GALLIUM_TARGET_DRIVERS := vmwgfx
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_svga)
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_VC4),)
+GALLIUM_TARGET_DRIVERS += vc4
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_vc4)
endif
include $(BUILD_STATIC_LIBRARY)
ifneq ($(HAVE_GALLIUM_VIRGL),)
+GALLIUM_TARGET_DRIVERS += virtio_gpu
$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_virgl libmesa_winsys_virgl_vtest)
endif
# sort GALLIUM_SHARED_LIBS to remove any duplicates
LOCAL_SHARED_LIBRARIES += $(sort $(GALLIUM_SHARED_LIBS))
+ifneq ($(filter 5 6 7, $(MESA_ANDROID_MAJOR_VERSION)),)
+LOCAL_POST_INSTALL_CMD := \
+ $(foreach l, lib lib64, \
+ mkdir -p $(TARGET_OUT_SHARED_LIBRARIES)/$(l)/$(MESA_DRI_MODULE_REL_PATH); \
+ $(foreach d, $(GALLIUM_TARGET_DRIVERS), ln -sf gallium_dri.so $(TARGET_OUT)/$(l)/$(MESA_DRI_MODULE_REL_PATH)/$(d)_dri.so;) \
+ )
+else
+LOCAL_MODULE_SYMLINKS := $(foreach d, $(GALLIUM_TARGET_DRIVERS), $(d)_dri.so)
+endif
+
include $(GALLIUM_COMMON_MK)
include $(BUILD_SHARED_LIBRARY)
/* not need continue to loop all paths once the driver is found */
if (dri->driver != NULL)
break;
-
-#ifdef ANDROID
- snprintf(path, sizeof path, "%.*s/gallium_dri.so", len, p);
- dri->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
- if (dri->driver == NULL)
- sprintf("failed to open %s: %s\n", path, dlerror());
- else
- break;
-#endif
}
if (dri->driver == NULL) {