1ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# Mesa 3-D graphics library 2ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# 3ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> 4ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# Copyright (C) 2010-2011 LunarG Inc. 5ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# 6ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# Permission is hereby granted, free of charge, to any person obtaining a 7ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# copy of this software and associated documentation files (the "Software"), 8ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# to deal in the Software without restriction, including without limitation 9ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# the rights to use, copy, modify, merge, publish, distribute, sublicense, 10ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# and/or sell copies of the Software, and to permit persons to whom the 11ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# Software is furnished to do so, subject to the following conditions: 12ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# 13ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# The above copyright notice and this permission notice shall be included 14ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# in all copies or substantial portions of the Software. 15ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# 16ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# DEALINGS IN THE SOFTWARE. 23ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 24ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu# Android.mk for glapi 25ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 26ee41fc898d7c362d6f34489895f4daed745d7166Chia-I WuLOCAL_PATH := $(call my-dir) 27ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 28169ef48c857b69c07616acd0208550db41571f60Chia-I Wumapi_abi_headers := 29169ef48c857b69c07616acd0208550db41571f60Chia-I Wu 30169ef48c857b69c07616acd0208550db41571f60Chia-I Wu# --------------------------------------- 31169ef48c857b69c07616acd0208550db41571f60Chia-I Wu# Build libglapi 32169ef48c857b69c07616acd0208550db41571f60Chia-I Wu# --------------------------------------- 33169ef48c857b69c07616acd0208550db41571f60Chia-I Wu 34ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wuinclude $(CLEAR_VARS) 35ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 36169ef48c857b69c07616acd0208550db41571f60Chia-I Wuabi_header := shared-glapi/glapi_mapi_tmp.h 37169ef48c857b69c07616acd0208550db41571f60Chia-I Wu 385154b45217695e5daf24110bcff043fa1959d0a5Chad VersaceLOCAL_SRC_FILES := \ 395154b45217695e5daf24110bcff043fa1959d0a5Chad Versace mapi/entry.c \ 405154b45217695e5daf24110bcff043fa1959d0a5Chad Versace mapi/mapi_glapi.c \ 415154b45217695e5daf24110bcff043fa1959d0a5Chad Versace mapi/stub.c \ 425154b45217695e5daf24110bcff043fa1959d0a5Chad Versace mapi/table.c \ 435154b45217695e5daf24110bcff043fa1959d0a5Chad Versace mapi/u_current.c \ 445154b45217695e5daf24110bcff043fa1959d0a5Chad Versace mapi/u_execmem.c 45ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 46ee41fc898d7c362d6f34489895f4daed745d7166Chia-I WuLOCAL_CFLAGS := \ 47ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu -DMAPI_MODE_GLAPI \ 48169ef48c857b69c07616acd0208550db41571f60Chia-I Wu -DMAPI_ABI_HEADER=\"$(abi_header)\" 49ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 50ee41fc898d7c362d6f34489895f4daed745d7166Chia-I WuLOCAL_C_INCLUDES := \ 51ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu $(MESA_TOP)/src/mapi 52ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 53ee41fc898d7c362d6f34489895f4daed745d7166Chia-I WuLOCAL_MODULE := libglapi 54ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 55ee41fc898d7c362d6f34489895f4daed745d7166Chia-I WuLOCAL_MODULE_CLASS := SHARED_LIBRARIES 56ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wuintermediates := $(call local-intermediates-dir) 57169ef48c857b69c07616acd0208550db41571f60Chia-I Wuabi_header := $(intermediates)/$(abi_header) 58169ef48c857b69c07616acd0208550db41571f60Chia-I WuLOCAL_GENERATED_SOURCES := $(abi_header) 59169ef48c857b69c07616acd0208550db41571f60Chia-I Wu 60169ef48c857b69c07616acd0208550db41571f60Chia-I Wu$(abi_header): PRIVATE_PRINTER := shared-glapi 61169ef48c857b69c07616acd0208550db41571f60Chia-I Wu 62169ef48c857b69c07616acd0208550db41571f60Chia-I Wumapi_abi_headers += $(abi_header) 63169ef48c857b69c07616acd0208550db41571f60Chia-I Wu 64169ef48c857b69c07616acd0208550db41571f60Chia-I Wuinclude $(MESA_COMMON_MK) 65169ef48c857b69c07616acd0208550db41571f60Chia-I Wuinclude $(BUILD_SHARED_LIBRARY) 66169ef48c857b69c07616acd0208550db41571f60Chia-I Wu 67ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 68ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wumapi_abi_deps := \ 69ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu $(wildcard $(LOCAL_PATH)/glapi/gen/*.py) \ 70ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu $(wildcard $(LOCAL_PATH)/glapi/gen/*.xml) \ 71ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu $(LOCAL_PATH)/mapi/mapi_abi.py 72ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu 73169ef48c857b69c07616acd0208550db41571f60Chia-I Wu$(mapi_abi_headers): PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/mapi/mapi_abi.py 74169ef48c857b69c07616acd0208550db41571f60Chia-I Wu$(mapi_abi_headers): PRIVATE_APIXML := $(LOCAL_PATH)/glapi/gen/gl_and_es_API.xml 75169ef48c857b69c07616acd0208550db41571f60Chia-I Wu$(mapi_abi_headers): $(mapi_abi_deps) 76ee41fc898d7c362d6f34489895f4daed745d7166Chia-I Wu @mkdir -p $(dir $@) 77169ef48c857b69c07616acd0208550db41571f60Chia-I Wu @echo "target $(PRIVATE_PRINTER): $(PRIVATE_MODULE) <= $(PRIVATE_APIXML)" 78169ef48c857b69c07616acd0208550db41571f60Chia-I Wu $(hide) $(PRIVATE_SCRIPT) --printer $(PRIVATE_PRINTER) --mode lib $(PRIVATE_APIXML) > $@ 79