1# 2# Copyright © 2011-2012 Intel Corporation 3# 4# Permission is hereby granted, free of charge, to any person obtaining a 5# copy of this software and associated documentation files (the "Software"), 6# to deal in the Software without restriction, including without limitation 7# the rights to use, copy, modify, merge, publish, distribute, sublicense, 8# and/or sell copies of the Software, and to permit persons to whom the 9# Software is furnished to do so, subject to the following conditions: 10# 11# The above copyright notice and this permission notice (including the next 12# paragraph) shall be included in all copies or substantial portions of the 13# Software. 14# 15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21# IN THE SOFTWARE. 22# 23 24# Two identical libs are defined here. 25# libdrm: for vendors. installed to /vendor/lib. libdrm_<vendor> uses this. 26# libdrm_platform: for platform modules (such as libminui). installed to /system/lib 27 28LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk 29 30LOCAL_PATH := $(call my-dir) 31 32# Import variables LIBDRM_{,H_,INCLUDE_H_,INCLUDE_VMWGFX_H_}FILES 33include $(LOCAL_PATH)/Makefile.sources 34 35common_CFLAGS := \ 36 -Wno-enum-conversion \ 37 -Wno-pointer-arith \ 38 -Wno-sign-compare \ 39 -Wno-tautological-compare 40 41# Static library for the device (recovery) 42include $(CLEAR_VARS) 43 44LOCAL_MODULE := libdrm_platform 45 46LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) 47LOCAL_EXPORT_C_INCLUDE_DIRS := \ 48 $(LOCAL_PATH) \ 49 $(LOCAL_PATH)/include/drm 50 51LOCAL_C_INCLUDES := \ 52 $(LOCAL_PATH)/include/drm 53 54LOCAL_CFLAGS := \ 55 $(common_CFLAGS) 56 57include $(LIBDRM_COMMON_MK) 58include $(BUILD_STATIC_LIBRARY) 59 60# Dynamic library for the device 61include $(CLEAR_VARS) 62 63LOCAL_MODULE := libdrm_platform 64 65LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) 66LOCAL_EXPORT_C_INCLUDE_DIRS := \ 67 $(LOCAL_PATH) \ 68 $(LOCAL_PATH)/include/drm 69 70LOCAL_C_INCLUDES := \ 71 $(LOCAL_PATH)/include/drm 72 73LOCAL_CFLAGS := \ 74 $(common_CFLAGS) 75 76include $(LIBDRM_COMMON_MK) 77include $(BUILD_SHARED_LIBRARY) 78 79 80ifneq ($(TARGET_USE_PRIVATE_LIBDRM),true) 81 82# Import variables LIBDRM_{,H_,INCLUDE_H_,INCLUDE_VMWGFX_H_}FILES 83include $(LOCAL_PATH)/Makefile.sources 84 85common_CFLAGS := \ 86 -Wno-enum-conversion \ 87 -Wno-pointer-arith \ 88 -Wno-sign-compare \ 89 -Wno-tautological-compare 90 91# Static library for the device (recovery) 92include $(CLEAR_VARS) 93 94LOCAL_MODULE := libdrm 95LOCAL_VENDOR_MODULE := true 96 97LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) 98LOCAL_EXPORT_C_INCLUDE_DIRS := \ 99 $(LOCAL_PATH) \ 100 $(LOCAL_PATH)/include/drm 101 102LOCAL_C_INCLUDES := \ 103 $(LOCAL_PATH)/include/drm 104 105LOCAL_CFLAGS := \ 106 $(common_CFLAGS) 107 108include $(LIBDRM_COMMON_MK) 109include $(BUILD_STATIC_LIBRARY) 110 111# Dynamic library for the device 112include $(CLEAR_VARS) 113 114LOCAL_MODULE := libdrm 115LOCAL_VENDOR_MODULE := true 116 117LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) 118LOCAL_EXPORT_C_INCLUDE_DIRS := \ 119 $(LOCAL_PATH) \ 120 $(LOCAL_PATH)/include/drm 121 122LOCAL_C_INCLUDES := \ 123 $(LOCAL_PATH)/include/drm 124 125LOCAL_CFLAGS := \ 126 $(common_CFLAGS) 127 128include $(LIBDRM_COMMON_MK) 129include $(BUILD_SHARED_LIBRARY) 130 131include $(call all-makefiles-under,$(LOCAL_PATH)) 132endif # if TARGET_USE_PRIVATE_LIBDRM is not true 133