diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2011-08-05 14:01:19 +0900 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2011-08-05 15:30:17 +0900 |
commit | 90f8f6dc2fa3e121a9e5921fac106d2b058e08cc (patch) | |
tree | 16bdb51727c60ab8e4bfb698990328883a537ed9 | |
parent | 7b8a5b84dd8534172d777de86e3d28342748d965 (diff) |
android: add Android.mk's
This commit allows Mesa to be integrated with the Android source tree.
Just "git clone" Mesa under external/ of the Android source tree. To
successfully build Mesa, one also needs drm and drm_gralloc.
To specify the GPU drivers, one needs to define BOARD_GPU_DRIVERS in the
board configs. The valid values are any combination of i915g, r300g,
r600g, nouveau, and vmwgfx.
29 files changed, 2097 insertions, 0 deletions
diff --git a/Android.common.mk b/Android.common.mk new file mode 100644 index 0000000000..ec84bfcc82 --- /dev/null +++ b/Android.common.mk @@ -0,0 +1,18 @@ +LOCAL_C_INCLUDES += \ + $(MESA_TOP)/include + +LOCAL_CFLAGS += \ + -DPTHREADS \ + -fvisibility=hidden \ + -Wno-sign-compare + +LOCAL_CFLAGS += \ + -DUSE_X86_ASM + +LOCAL_CPPFLAGS := \ + -Wno-error=non-virtual-dtor \ + -Wno-non-virtual-dtor + +#LOCAL_STRIP_MODULE := false + +LOCAL_MODULE_TAGS := optional diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000000..1a163640c2 --- /dev/null +++ b/Android.mk @@ -0,0 +1,82 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# BOARD_GPU_DRIVERS should be defined. The valid values are +# +# classic drivers: TODO +# gallium drivers: i915g, r300g, r600g, nouveau, vmwgfx +# +# The main target is libGLES_mesa. There is no classic drivers yet. +# +# Gallium drivers depend on +# +# libmesa_egl +# libmesa_st_egl +# libmesa_st_mesa +# libmesa_glsl +# libmesa_glsl_utils +# libmesa_pipe_<DRIVER> +# libmesa_winsys_<DRIVER> +# libmesa_gallium +# +# The rules can be found in src/gallium/targets/Android.mk. + +LOCAL_PATH := $(call my-dir) + +MESA_TOP := $(LOCAL_PATH) +DRM_TOP := external/drm +DRM_GRALLOC_TOP := hardware/drm_gralloc + +MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk + +SUBDIRS := \ + $(LOCAL_PATH)/src/mapi/Android.mk \ + $(LOCAL_PATH)/src/glsl/Android.mk \ + $(LOCAL_PATH)/src/mesa/Android.mk \ + $(LOCAL_PATH)/src/egl/Android.mk \ + $(LOCAL_PATH)/src/gallium/Android.mk + +MESA_GPU_DRIVERS := $(BOARD_GPU_DRIVERS) + +classic_drivers := +gallium_drivers := i915g r300g r600g nouveau vmwgfx + +# warn about invalid drivers +invalid_drivers := $(filter-out \ + $(classic_drivers) $(gallium_drivers), $(MESA_GPU_DRIVERS)) +ifneq ($(invalid_drivers),) +$(warning invalid GPU drivers: $(invalid_drivers)) +# tidy up +MESA_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(MESA_GPU_DRIVERS)) +endif + +ifneq ($(filter $(gallium_drivers), $(MESA_GPU_DRIVERS)),) +MESA_BUILD_GALLIUM := true +else +MESA_BUILD_GALLIUM := false +endif + +ifneq ($(strip $(MESA_GPU_DRIVERS)),) +include $(SUBDIRS) +endif diff --git a/src/egl/Android.mk b/src/egl/Android.mk new file mode 100644 index 0000000000..8ad8a44ff2 --- /dev/null +++ b/src/egl/Android.mk @@ -0,0 +1,66 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Android.mk for EGL + +LOCAL_PATH := $(call my-dir) + +# from main/Makefile +SOURCES = \ + eglapi.c \ + eglarray.c \ + eglconfig.c \ + eglcontext.c \ + eglcurrent.c \ + egldisplay.c \ + egldriver.c \ + eglfallbacks.c \ + eglglobals.c \ + eglimage.c \ + egllog.c \ + eglmisc.c \ + eglmode.c \ + eglscreen.c \ + eglstring.c \ + eglsurface.c \ + eglsync.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(addprefix main/, $(SOURCES)) + +LOCAL_CFLAGS := \ + -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_ANDROID \ + -D_EGL_DRIVER_SEARCH_DIR=\"/system/lib/egl\" \ + -D_EGL_OS_UNIX=1 + +ifeq ($(strip $(MESA_BUILD_GALLIUM)),true) +LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GALLIUM +endif + +LOCAL_MODULE := libmesa_egl + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/Android.mk b/src/gallium/Android.mk new file mode 100644 index 0000000000..aa5eeec8f3 --- /dev/null +++ b/src/gallium/Android.mk @@ -0,0 +1,65 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# src/gallium/Android.mk + +LOCAL_PATH := $(call my-dir) + +GALLIUM_TOP := $(LOCAL_PATH) + +GALLIUM_TEMPLATE := $(LOCAL_PATH)/Android.template.mk + +# TODO +#GALLIUM_LLVM_TEMPLATE := external/llvm/Android.template.mk +#GALLIUM_LLVM_VERSION := 0x0207 + +SUBDIRS := targets + +ifeq ($(strip $(MESA_BUILD_GALLIUM)),true) +SUBDIRS += state_trackers auxiliary +# swrast +SUBDIRS += winsys/sw drivers/softpipe +ifneq ($(strip $(GALLIUM_LLVM_VERSION)),) +SUBDIRS += drivers/llvmpipe +endif +endif # MESA_BUILD_GALLIUM + +ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),) +SUBDIRS += winsys/i915 drivers/i915 +endif +ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),) +SUBDIRS += winsys/radeon drivers/r300 +endif +ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),) +SUBDIRS += winsys/r600 drivers/r600 +endif +ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),) +SUBDIRS += winsys/nouveau drivers/nouveau drivers/nvfx drivers/nv50 drivers/nvc0 +endif +ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),) +SUBDIRS += winsys/svga drivers/svga +endif + +mkfiles := $(patsubst %,$(LOCAL_PATH)/%/Android.mk,$(SUBDIRS)) +include $(mkfiles) diff --git a/src/gallium/Android.template.mk b/src/gallium/Android.template.mk new file mode 100644 index 0000000000..07eca024d4 --- /dev/null +++ b/src/gallium/Android.template.mk @@ -0,0 +1,13 @@ +# src/gallium/Android.template.mk + +ifneq ($(strip $(GALLIUM_LLVM_VERSION)),) +LOCAL_CFLAGS += -DHAVE_LLVM=$(GALLIUM_LLVM_VERSION) +endif + +LOCAL_C_INCLUDES += \ + $(GALLIUM_TOP)/include \ + $(GALLIUM_TOP)/auxiliary \ + $(GALLIUM_TOP)/winsys \ + $(GALLIUM_TOP)/drivers + +include $(MESA_COMMON_MK) diff --git a/src/gallium/auxiliary/Android.mk b/src/gallium/auxiliary/Android.mk new file mode 100644 index 0000000000..c758e3fdae --- /dev/null +++ b/src/gallium/auxiliary/Android.mk @@ -0,0 +1,258 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + cso_cache/cso_cache.c \ + cso_cache/cso_context.c \ + cso_cache/cso_hash.c \ + draw/draw_context.c \ + draw/draw_fs.c \ + draw/draw_gs.c \ + draw/draw_pipe.c \ + draw/draw_pipe_aaline.c \ + draw/draw_pipe_aapoint.c \ + draw/draw_pipe_clip.c \ + draw/draw_pipe_cull.c \ + draw/draw_pipe_flatshade.c \ + draw/draw_pipe_offset.c \ + draw/draw_pipe_pstipple.c \ + draw/draw_pipe_stipple.c \ + draw/draw_pipe_twoside.c \ + draw/draw_pipe_unfilled.c \ + draw/draw_pipe_util.c \ + draw/draw_pipe_validate.c \ + draw/draw_pipe_vbuf.c \ + draw/draw_pipe_wide_line.c \ + draw/draw_pipe_wide_point.c \ + draw/draw_pt.c \ + draw/draw_pt_emit.c \ + draw/draw_pt_fetch.c \ + draw/draw_pt_fetch_emit.c \ + draw/draw_pt_fetch_shade_emit.c \ + draw/draw_pt_fetch_shade_pipeline.c \ + draw/draw_pt_post_vs.c \ + draw/draw_pt_so_emit.c \ + draw/draw_pt_util.c \ + draw/draw_pt_vsplit.c \ + draw/draw_vertex.c \ + draw/draw_vs.c \ + draw/draw_vs_aos.c \ + draw/draw_vs_aos_io.c \ + draw/draw_vs_aos_machine.c \ + draw/draw_vs_exec.c \ + draw/draw_vs_ppc.c \ + draw/draw_vs_sse.c \ + draw/draw_vs_variant.c \ + indices/u_indices_gen.c \ + indices/u_unfilled_gen.c \ + os/os_misc.c \ + os/os_stream.c \ + os/os_stream_log.c \ + os/os_stream_null.c \ + os/os_stream_stdc.c \ + os/os_stream_str.c \ + os/os_time.c \ + pipebuffer/pb_buffer_fenced.c \ + pipebuffer/pb_buffer_malloc.c \ + pipebuffer/pb_bufmgr_alt.c \ + pipebuffer/pb_bufmgr_cache.c \ + pipebuffer/pb_bufmgr_debug.c \ + pipebuffer/pb_bufmgr_mm.c \ + pipebuffer/pb_bufmgr_ondemand.c \ + pipebuffer/pb_bufmgr_pool.c \ + pipebuffer/pb_bufmgr_slab.c \ + pipebuffer/pb_validate.c \ + rbug/rbug_connection.c \ + rbug/rbug_context.c \ + rbug/rbug_core.c \ + rbug/rbug_demarshal.c \ + rbug/rbug_texture.c \ + rbug/rbug_shader.c \ + rtasm/rtasm_cpu.c \ + rtasm/rtasm_execmem.c \ + rtasm/rtasm_ppc.c \ + rtasm/rtasm_ppc_spe.c \ + rtasm/rtasm_x86sse.c \ + tgsi/tgsi_build.c \ + tgsi/tgsi_dump.c \ + tgsi/tgsi_exec.c \ + tgsi/tgsi_info.c \ + tgsi/tgsi_iterate.c \ + tgsi/tgsi_parse.c \ + tgsi/tgsi_ppc.c \ + tgsi/tgsi_sanity.c \ + tgsi/tgsi_scan.c \ + tgsi/tgsi_sse2.c \ + tgsi/tgsi_text.c \ + tgsi/tgsi_transform.c \ + tgsi/tgsi_ureg.c \ + tgsi/tgsi_util.c \ + translate/translate.c \ + translate/translate_cache.c \ + translate/translate_generic.c \ + translate/translate_sse.c \ + util/u_debug.c \ + util/u_debug_describe.c \ + util/u_debug_refcnt.c \ + util/u_debug_stack.c \ + util/u_debug_symbol.c \ + util/u_dump_defines.c \ + util/u_dump_state.c \ + util/u_bitmask.c \ + util/u_blit.c \ + util/u_blitter.c \ + util/u_cache.c \ + util/u_caps.c \ + util/u_cpu_detect.c \ + util/u_dl.c \ + util/u_draw.c \ + util/u_draw_quad.c \ + util/u_format.c \ + util/u_format_other.c \ + util/u_format_latc.c \ + util/u_format_s3tc.c \ + util/u_format_rgtc.c \ + util/u_format_srgb.c \ + util/u_format_table.c \ + util/u_format_tests.c \ + util/u_format_yuv.c \ + util/u_format_zs.c \ + util/u_framebuffer.c \ + util/u_gen_mipmap.c \ + util/u_half.c \ + util/u_handle_table.c \ + util/u_hash.c \ + util/u_hash_table.c \ + util/u_index_modify.c \ + util/u_keymap.c \ + util/u_linear.c \ + util/u_linkage.c \ + util/u_network.c \ + util/u_math.c \ + util/u_mm.c \ + util/u_pstipple.c \ + util/u_rect.c \ + util/u_ringbuffer.c \ + util/u_sampler.c \ + util/u_simple_shaders.c \ + util/u_slab.c \ + util/u_snprintf.c \ + util/u_staging.c \ + util/u_surface.c \ + util/u_surfaces.c \ + util/u_texture.c \ + util/u_tile.c \ + util/u_transfer.c \ + util/u_resource.c \ + util/u_upload_mgr.c \ + util/u_vbuf_mgr.c \ + vl/vl_csc.c \ + vl/vl_compositor.c \ + vl/vl_decoder.c \ + vl/vl_mpeg12_decoder.c \ + vl/vl_mpeg12_bitstream.c \ + vl/vl_zscan.c \ + vl/vl_idct.c \ + vl/vl_mc.c \ + vl/vl_vertex_buffers.c \ + vl/vl_video_buffer.c + +GALLIVM_SOURCES = \ + gallivm/lp_bld_arit.c \ + gallivm/lp_bld_assert.c \ + gallivm/lp_bld_bitarit.c \ + gallivm/lp_bld_const.c \ + gallivm/lp_bld_conv.c \ + gallivm/lp_bld_flow.c \ + gallivm/lp_bld_format_aos.c \ + gallivm/lp_bld_format_soa.c \ + gallivm/lp_bld_format_yuv.c \ + gallivm/lp_bld_gather.c \ + gallivm/lp_bld_init.c \ + gallivm/lp_bld_intr.c \ + gallivm/lp_bld_logic.c \ + gallivm/lp_bld_pack.c \ + gallivm/lp_bld_printf.c \ + gallivm/lp_bld_quad.c \ + gallivm/lp_bld_sample.c \ + gallivm/lp_bld_sample_aos.c \ + gallivm/lp_bld_sample_soa.c \ + gallivm/lp_bld_struct.c \ + gallivm/lp_bld_swizzle.c \ + gallivm/lp_bld_tgsi_aos.c \ + gallivm/lp_bld_tgsi_info.c \ + gallivm/lp_bld_tgsi_soa.c \ + gallivm/lp_bld_type.c \ + draw/draw_llvm.c \ + draw/draw_llvm_sample.c \ + draw/draw_llvm_translate.c \ + draw/draw_vs_llvm.c \ + draw/draw_pt_fetch_shade_pipeline_llvm.c + +GALLIVM_CPP_SOURCES = \ + gallivm/lp_bld_debug.cpp \ + gallivm/lp_bld_misc.cpp + +GENERATED_SOURCES = \ + indices/u_indices_gen.c \ + indices/u_unfilled_gen.c \ + util/u_format_srgb.c \ + util/u_format_table.c \ + util/u_half.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(filter-out $(GENERATED_SOURCES), $(C_SOURCES)) + +LOCAL_C_INCLUDES := $(GALLIUM_TOP)/auxiliary/util + +LOCAL_MODULE := libmesa_gallium + +# generate sources +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +intermediates := $(call local-intermediates-dir) +LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES)) + +$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = python $^ > $@ + +$(intermediates)/indices/u_indices_gen.c \ +$(intermediates)/indices/u_unfilled_gen.c \ +$(intermediates)/util/u_format_srgb.c \ +$(intermediates)/util/u_half.c: $(intermediates)/%.c: $(LOCAL_PATH)/%.py + $(transform-generated-source) + +$(intermediates)/util/u_format_table.c: $(intermediates)/%.c: $(LOCAL_PATH)/%.py $(LOCAL_PATH)/util/u_format.csv + $(transform-generated-source) + +# LLVM +ifneq ($(strip $(GALLIUM_LLVM_VERSION)),) +LOCAL_SRC_FILES += $(GALLIVM_SOURCES) $(GALLIVM_CPP_SOURCES) +include $(GALLIUM_LLVM_TEMPLATE) +endif + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/i915/Android.mk b/src/gallium/drivers/i915/Android.mk new file mode 100644 index 0000000000..ba050384da --- /dev/null +++ b/src/gallium/drivers/i915/Android.mk @@ -0,0 +1,64 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + i915_blit.c \ + i915_clear.c \ + i915_flush.c \ + i915_context.c \ + i915_debug.c \ + i915_debug_fp.c \ + i915_state.c \ + i915_state_immediate.c \ + i915_state_dynamic.c \ + i915_state_derived.c \ + i915_state_emit.c \ + i915_state_fpc.c \ + i915_state_sampler.c \ + i915_state_static.c \ + i915_screen.c \ + i915_prim_emit.c \ + i915_prim_vbuf.c \ + i915_query.c \ + i915_resource.c \ + i915_resource_texture.c \ + i915_resource_buffer.c \ + i915_fpc_emit.c \ + i915_fpc_translate.c \ + i915_surface.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(C_SOURCES) + +LOCAL_CFLAGS := -std=c99 + +LOCAL_MODULE := libmesa_pipe_i915 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/llvmpipe/Android.mk b/src/gallium/drivers/llvmpipe/Android.mk new file mode 100644 index 0000000000..5bab1e6e5b --- /dev/null +++ b/src/gallium/drivers/llvmpipe/Android.mk @@ -0,0 +1,91 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + lp_bld_alpha.c \ + lp_bld_blend_aos.c \ + lp_bld_blend_logicop.c \ + lp_bld_blend_soa.c \ + lp_bld_depth.c \ + lp_bld_interp.c \ + lp_clear.c \ + lp_context.c \ + lp_draw_arrays.c \ + lp_fence.c \ + lp_flush.c \ + lp_jit.c \ + lp_memory.c \ + lp_perf.c \ + lp_query.c \ + lp_rast.c \ + lp_rast_debug.c \ + lp_rast_tri.c \ + lp_scene.c \ + lp_scene_queue.c \ + lp_screen.c \ + lp_setup.c \ + lp_setup_line.c \ + lp_setup_point.c \ + lp_setup_tri.c \ + lp_setup_vbuf.c \ + lp_state_blend.c \ + lp_state_clip.c \ + lp_state_derived.c \ + lp_state_fs.c \ + lp_state_setup.c \ + lp_state_gs.c \ + lp_state_rasterizer.c \ + lp_state_sampler.c \ + lp_state_so.c \ + lp_state_surface.c \ + lp_state_vertex.c \ + lp_state_vs.c \ + lp_surface.c \ + lp_tex_sample.c \ + lp_texture.c \ + lp_tile_image.c \ + lp_tile_soa.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(filter-out lp_tile_soa.c, $(C_SOURCES)) + +LOCAL_MODULE := libmesa_pipe_llvmpipe + +# generate lp_tile_soa.c +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +intermediates := $(call local-intermediates-dir) +LOCAL_GENERATED_SOURCES := $(intermediates)/lp_tile_soa.c + +$(intermediates)/lp_tile_soa.c: PRIVATE_CUSTOM_TOOL = python $^ > $@ +$(intermediates)/lp_tile_soa.c: $(LOCAL_PATH)/lp_tile_soa.py $(GALLIUM_TOP)/auxiliary/util/u_format.csv + $(transform-generated-source) + +include $(GALLIUM_LLVM_TEMPLATE) +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/nouveau/Android.mk b/src/gallium/drivers/nouveau/Android.mk new file mode 100644 index 0000000000..e1969610ac --- /dev/null +++ b/src/gallium/drivers/nouveau/Android.mk @@ -0,0 +1,41 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = nouveau_screen.c \ + nouveau_fence.c \ + nouveau_mm.c \ + nouveau_buffer.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(C_SOURCES) +LOCAL_C_INCLUDES := $(DRM_TOP) + +LOCAL_MODULE := libmesa_pipe_nouveau + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/nv50/Android.mk b/src/gallium/drivers/nv50/Android.mk new file mode 100644 index 0000000000..e95673d9c4 --- /dev/null +++ b/src/gallium/drivers/nv50/Android.mk @@ -0,0 +1,60 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + nv50_context.c \ + nv50_draw.c \ + nv50_formats.c \ + nv50_miptree.c \ + nv50_resource.c \ + nv50_screen.c \ + nv50_state.c \ + nv50_state_validate.c \ + nv50_surface.c \ + nv50_tex.c \ + nv50_transfer.c \ + nv50_vbo.c \ + nv50_program.c \ + nv50_shader_state.c \ + nv50_pc.c \ + nv50_pc_print.c \ + nv50_pc_emit.c \ + nv50_tgsi_to_nc.c \ + nv50_pc_optimize.c \ + nv50_pc_regalloc.c \ + nv50_push.c \ + nv50_query.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(C_SOURCES) +LOCAL_C_INCLUDES := $(DRM_TOP) + +LOCAL_MODULE := libmesa_pipe_nv50 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/nvc0/Android.mk b/src/gallium/drivers/nvc0/Android.mk new file mode 100644 index 0000000000..e0bfb985c7 --- /dev/null +++ b/src/gallium/drivers/nvc0/Android.mk @@ -0,0 +1,61 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + nvc0_context.c \ + nvc0_draw.c \ + nvc0_formats.c \ + nvc0_miptree.c \ + nvc0_resource.c \ + nvc0_screen.c \ + nvc0_state.c \ + nvc0_state_validate.c \ + nvc0_surface.c \ + nvc0_tex.c \ + nvc0_transfer.c \ + nvc0_vbo.c \ + nvc0_program.c \ + nvc0_shader_state.c \ + nvc0_pc.c \ + nvc0_pc_print.c \ + nvc0_pc_emit.c \ + nvc0_tgsi_to_nc.c \ + nvc0_pc_optimize.c \ + nvc0_pc_regalloc.c \ + nvc0_push.c \ + nvc0_push2.c \ + nvc0_query.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(C_SOURCES) +LOCAL_C_INCLUDES := $(DRM_TOP) + +LOCAL_MODULE := libmesa_pipe_nvc0 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/nvfx/Android.mk b/src/gallium/drivers/nvfx/Android.mk new file mode 100644 index 0000000000..78c83c9b74 --- /dev/null +++ b/src/gallium/drivers/nvfx/Android.mk @@ -0,0 +1,60 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + nv04_2d.c \ + nvfx_buffer.c \ + nvfx_context.c \ + nvfx_clear.c \ + nvfx_draw.c \ + nvfx_fragprog.c \ + nvfx_fragtex.c \ + nv30_fragtex.c \ + nv40_fragtex.c \ + nvfx_miptree.c \ + nvfx_push.c \ + nvfx_query.c \ + nvfx_resource.c \ + nvfx_screen.c \ + nvfx_state.c \ + nvfx_state_emit.c \ + nvfx_state_fb.c \ + nvfx_surface.c \ + nvfx_transfer.c \ + nvfx_vbo.c \ + nvfx_vertprog.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(C_SOURCES) +LOCAL_CFLAGS := -std=c99 +LOCAL_C_INCLUDES := $(DRM_TOP) + +LOCAL_MODULE := libmesa_pipe_nvfx + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/r300/Android.mk b/src/gallium/drivers/r300/Android.mk new file mode 100644 index 0000000000..be1b120426 --- /dev/null +++ b/src/gallium/drivers/r300/Android.mk @@ -0,0 +1,103 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile, omitting the last two files +C_SOURCES = \ + r300_blit.c \ + r300_chipset.c \ + r300_context.c \ + r300_debug.c \ + r300_emit.c \ + r300_flush.c \ + r300_fs.c \ + r300_hyperz.c \ + r300_query.c \ + r300_render.c \ + r300_render_stencilref.c \ + r300_render_translate.c \ + r300_resource.c \ + r300_screen.c \ + r300_screen_buffer.c \ + r300_state.c \ + r300_state_derived.c \ + r300_vs.c \ + r300_vs_draw.c \ + r300_texture.c \ + r300_texture_desc.c \ + r300_tgsi_to_rc.c \ + r300_transfer.c \ + \ + compiler/radeon_code.c \ + compiler/radeon_compiler.c \ + compiler/radeon_compiler_util.c \ + compiler/radeon_emulate_branches.c \ + compiler/radeon_emulate_loops.c \ + compiler/radeon_program.c \ + compiler/radeon_program_print.c \ + compiler/radeon_opcodes.c \ + compiler/radeon_program_alu.c \ + compiler/radeon_program_pair.c \ + compiler/radeon_program_tex.c \ + compiler/radeon_pair_translate.c \ + compiler/radeon_pair_schedule.c \ + compiler/radeon_pair_regalloc.c \ + compiler/radeon_pair_dead_sources.c \ + compiler/radeon_dataflow.c \ + compiler/radeon_dataflow_deadcode.c \ + compiler/radeon_dataflow_swizzles.c \ + compiler/radeon_list.c \ + compiler/radeon_optimize.c \ + compiler/radeon_remove_constants.c \ + compiler/radeon_rename_regs.c \ + compiler/radeon_variable.c \ + compiler/r3xx_fragprog.c \ + compiler/r300_fragprog.c \ + compiler/r300_fragprog_swizzle.c \ + compiler/r300_fragprog_emit.c \ + compiler/r500_fragprog.c \ + compiler/r500_fragprog_emit.c \ + compiler/r3xx_vertprog.c \ + compiler/r3xx_vertprog_dump.c \ + compiler/memory_pool.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(C_SOURCES) + +LOCAL_CFLAGS := -std=c99 + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/glsl \ + $(MESA_TOP)/src/mesa \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm + +LOCAL_MODULE := libmesa_pipe_r300 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk new file mode 100644 index 0000000000..61442b879c --- /dev/null +++ b/src/gallium/drivers/r600/Android.mk @@ -0,0 +1,58 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + r600_asm.c \ + r600_blit.c \ + r600_buffer.c \ + r600_pipe.c \ + r600_query.c \ + r600_resource.c \ + r600_shader.c \ + r600_state.c \ + r600_texture.c \ + r700_asm.c \ + evergreen_state.c \ + eg_asm.c \ + r600_translate.c \ + r600_state_common.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(C_SOURCES) + +LOCAL_CFLAGS := -std=c99 + +LOCAL_C_INCLUDES := \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm + +LOCAL_MODULE := libmesa_pipe_r600 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/softpipe/Android.mk b/src/gallium/drivers/softpipe/Android.mk new file mode 100644 index 0000000000..b61bb6db1a --- /dev/null +++ b/src/gallium/drivers/softpipe/Android.mk @@ -0,0 +1,72 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + sp_fs_exec.c \ + sp_fs_sse.c \ + sp_clear.c \ + sp_fence.c \ + sp_flush.c \ + sp_query.c \ + sp_context.c \ + sp_draw_arrays.c \ + sp_prim_vbuf.c \ + sp_quad_pipe.c \ + sp_quad_stipple.c \ + sp_quad_depth_test.c \ + sp_quad_fs.c \ + sp_quad_blend.c \ + sp_screen.c \ + sp_setup.c \ + sp_state_blend.c \ + sp_state_clip.c \ + sp_state_derived.c \ + sp_state_sampler.c \ + sp_state_shader.c \ + sp_state_so.c \ + sp_state_rasterizer.c \ + sp_state_surface.c \ + sp_state_vertex.c \ + sp_texture.c \ + sp_tex_sample.c \ + sp_tex_tile_cache.c \ + sp_tile_cache.c \ + sp_surface.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(C_SOURCES) + +LOCAL_MODULE := libmesa_pipe_softpipe + +ifneq ($(strip $(GALLIUM_LLVM_VERSION)),) +include $(GALLIUM_LLVM_TEMPLATE) +endif + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/drivers/svga/Android.mk b/src/gallium/drivers/svga/Android.mk new file mode 100644 index 0000000000..da3b30998c --- /dev/null +++ b/src/gallium/drivers/svga/Android.mk @@ -0,0 +1,87 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from Makefile +C_SOURCES = \ + svgadump/svga_shader_dump.c \ + svgadump/svga_shader_op.c \ + svgadump/svga_dump.c \ + svga_cmd.c \ + svga_context.c \ + svga_draw.c \ + svga_draw_arrays.c \ + svga_draw_elements.c \ + svga_pipe_blend.c \ + svga_pipe_blit.c \ + svga_pipe_clear.c \ + svga_pipe_constants.c \ + svga_pipe_depthstencil.c \ + svga_pipe_draw.c \ + svga_pipe_flush.c \ + svga_pipe_fs.c \ + svga_pipe_misc.c \ + svga_pipe_query.c \ + svga_pipe_rasterizer.c \ + svga_pipe_sampler.c \ + svga_pipe_vertex.c \ + svga_pipe_vs.c \ + svga_screen.c \ + svga_screen_cache.c \ + svga_state.c \ + svga_state_need_swtnl.c \ + svga_state_constants.c \ + svga_state_framebuffer.c \ + svga_state_rss.c \ + svga_state_tss.c \ + svga_state_vdecl.c \ + svga_state_fs.c \ + svga_state_vs.c \ + svga_swtnl_backend.c \ + svga_swtnl_draw.c \ + svga_swtnl_state.c \ + svga_tgsi.c \ + svga_tgsi_decl_sm20.c \ + svga_tgsi_decl_sm30.c \ + svga_tgsi_insn.c \ + svga_sampler_view.c \ + svga_surface.c \ + svga_resource.c \ + svga_resource_texture.c \ + svga_resource_buffer.c \ + svga_resource_buffer_upload.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(C_SOURCES) + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/include + +LOCAL_MODULE := libmesa_pipe_svga + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/state_trackers/Android.mk b/src/gallium/state_trackers/Android.mk new file mode 100644 index 0000000000..c53bff53b9 --- /dev/null +++ b/src/gallium/state_trackers/Android.mk @@ -0,0 +1,57 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +common_SOURCES := \ + egl/common/egl_g3d.c \ + egl/common/egl_g3d_api.c \ + egl/common/egl_g3d_image.c \ + egl/common/egl_g3d_st.c \ + egl/common/egl_g3d_sync.c \ + egl/common/native_helper.c + +android_SOURCES := \ + egl/android/native_android.cpp + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(common_SOURCES) \ + $(android_SOURCES) + +LOCAL_CFLAGS := -DHAVE_ANDROID_BACKEND + +LOCAL_C_INCLUDES := \ + $(GALLIUM_TOP)/state_trackers/egl \ + $(GALLIUM_TOP)/winsys/sw \ + $(MESA_TOP)/src/egl/main \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm \ + $(DRM_GRALLOC_TOP) + +LOCAL_MODULE := libmesa_st_egl + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/targets/Android.mk b/src/gallium/targets/Android.mk new file mode 100644 index 0000000000..f44aa567f4 --- /dev/null +++ b/src/gallium/targets/Android.mk @@ -0,0 +1,148 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Android.mk for Gallium EGL + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := +LOCAL_CFLAGS := +LOCAL_C_INCLUDES := + +LOCAL_STATIC_LIBRARIES := +LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_egl + +LOCAL_SHARED_LIBRARIES := \ + libglapi \ + libdl \ + libhardware \ + liblog \ + libcutils + +ifeq ($(strip $(MESA_BUILD_GALLIUM)),true) + +LOCAL_SRC_FILES += \ + egl-static/egl.c \ + egl-static/egl_pipe.c \ + egl-static/egl_st.c + +LOCAL_CFLAGS += \ + -DFEATURE_ES1=1 \ + -DFEATURE_ES2=1 \ + -D_EGL_MAIN=_eglBuiltInDriverGALLIUM + +LOCAL_C_INCLUDES += \ + $(GALLIUM_TOP)/state_trackers/vega \ + $(GALLIUM_TOP)/state_trackers/egl \ + $(MESA_TOP)/src/egl/main \ + $(MESA_TOP)/src/mesa \ + $(DRM_TOP)/include/drm \ + $(DRM_TOP) + +LOCAL_STATIC_LIBRARIES += libmesa_gallium + +gallium_DRIVERS := + +ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_i915 libmesa_winsys_i915 +LOCAL_CFLAGS += -D_EGL_PIPE_I915=1 +LOCAL_SHARED_LIBRARIES += libdrm libdrm_intel +endif + +ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_r300 libmesa_winsys_r300 +LOCAL_CFLAGS += -D_EGL_PIPE_R300=1 +LOCAL_SHARED_LIBRARIES += libdrm +endif + +ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_r600 libmesa_winsys_r600 +LOCAL_CFLAGS += -D_EGL_PIPE_R600=1 +LOCAL_SHARED_LIBRARIES += libdrm +endif + +ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += \ + libmesa_winsys_nouveau \ + libmesa_pipe_nvfx \ + libmesa_pipe_nv50 \ + libmesa_pipe_nvc0 \ + libmesa_pipe_nouveau +LOCAL_CFLAGS += -D_EGL_PIPE_NOUVEAU=1 +LOCAL_SHARED_LIBRARIES += libdrm libdrm_nouveau +endif + +ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_svga libmesa_winsys_svga +LOCAL_CFLAGS += -D_EGL_PIPE_VMWGFX=1 +LOCAL_SHARED_LIBRARIES += libdrm +endif + +# swrast +gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw +LOCAL_CFLAGS += -DGALLIUM_SOFTPIPE +ifneq ($(strip $(GALLIUM_LLVM_VERSION)),) +gallium_DRIVERS += libmesa_pipe_llvmpipe +LOCAL_CFLAGS += -DGALLIUM_LLVMPIPE +LOCAL_SHARED_LIBRARIES += libstlport +LOCAL_STATIC_LIBRARIES += \ + libLLVMLinker libLLVMipo libLLVMInterpreter libLLVMInstrumentation \ + libLLVMJIT libLLVMExecutionEngine libLLVMBitWriter +LOCAL_STATIC_LIBRARIES += \ + libLLVMX86Disassembler libLLVMX86AsmParser libLLVMX86AsmPrinter \ + libLLVMX86CodeGen libLLVMX86Info +LOCAL_STATIC_LIBRARIES += \ + libLLVMAsmParser libLLVMMCParser libLLVMArchive libLLVMBitReader \ + libLLVMSelectionDAG libLLVMAsmPrinter libLLVMCodeGen \ + libLLVMScalarOpts libLLVMInstCombine libLLVMTransformUtils \ + libLLVMipa libLLVMAnalysis libLLVMTarget libLLVMMC \ + libLLVMCore libLLVMSupport libLLVMSystem +endif # GALLIUM_LLVM_VERSION + +# +# Notes about the order here: +# +# * libmesa_st_egl depends on libmesa_winsys_sw in $(gallium_DRIVERS) +# * libmesa_pipe_r300 in $(gallium_DRIVERS) depends on libmesa_st_mesa and +# libmesa_glsl +# * libmesa_st_mesa depends on libmesa_glsl +# * libmesa_glsl depends on libmesa_glsl_utils +# +LOCAL_STATIC_LIBRARIES := \ + libmesa_st_egl \ + $(gallium_DRIVERS) \ + libmesa_st_mesa \ + libmesa_glsl \ + libmesa_glsl_utils \ + $(LOCAL_STATIC_LIBRARIES) + +endif # MESA_BUILD_GALLIUM + +LOCAL_MODULE := libGLES_mesa +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl + +include $(GALLIUM_TEMPLATE) +include $(BUILD_SHARED_LIBRARY) diff --git a/src/gallium/winsys/i915/Android.mk b/src/gallium/winsys/i915/Android.mk new file mode 100644 index 0000000000..e2d7d56ac1 --- /dev/null +++ b/src/gallium/winsys/i915/Android.mk @@ -0,0 +1,47 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from drm/Makefile +C_SOURCES = \ + i915_drm_batchbuffer.c \ + i915_drm_buffer.c \ + i915_drm_fence.c \ + i915_drm_winsys.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(addprefix drm/, $(C_SOURCES)) + +LOCAL_C_INCLUDES := \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm \ + $(DRM_TOP)/intel + +LOCAL_MODULE := libmesa_winsys_i915 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/winsys/nouveau/Android.mk b/src/gallium/winsys/nouveau/Android.mk new file mode 100644 index 0000000000..6c7dce70f4 --- /dev/null +++ b/src/gallium/winsys/nouveau/Android.mk @@ -0,0 +1,43 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from drm/Makefile +C_SOURCES = nouveau_drm_winsys.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(addprefix drm/, $(C_SOURCES)) + +LOCAL_C_INCLUDES := \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm \ + $(DRM_TOP)/nouveau + +LOCAL_MODULE := libmesa_winsys_nouveau + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/winsys/r600/Android.mk b/src/gallium/winsys/r600/Android.mk new file mode 100644 index 0000000000..9a2f82ef57 --- /dev/null +++ b/src/gallium/winsys/r600/Android.mk @@ -0,0 +1,53 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from drm/Makefile +C_SOURCES = \ + bof.c \ + evergreen_hw_context.c \ + radeon_bo.c \ + radeon_pciid.c \ + r600_bo.c \ + r600_drm.c \ + r600_hw_context.c \ + r600_bomgr.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(addprefix drm/, $(C_SOURCES)) + +LOCAL_CFLAGS := -std=c99 + +LOCAL_C_INCLUDES := \ + $(GALLIUM_TOP)/drivers/r600 \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm + +LOCAL_MODULE := libmesa_winsys_r600 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/winsys/radeon/Android.mk b/src/gallium/winsys/radeon/Android.mk new file mode 100644 index 0000000000..39824d5069 --- /dev/null +++ b/src/gallium/winsys/radeon/Android.mk @@ -0,0 +1,45 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from drm/Makefile +C_SOURCES = \ + radeon_drm_bo.c \ + radeon_drm_cs.c \ + radeon_drm_winsys.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(addprefix drm/, $(C_SOURCES)) + +LOCAL_C_INCLUDES := \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm + +LOCAL_MODULE := libmesa_winsys_r300 + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/winsys/svga/Android.mk b/src/gallium/winsys/svga/Android.mk new file mode 100644 index 0000000000..88286bcfd8 --- /dev/null +++ b/src/gallium/winsys/svga/Android.mk @@ -0,0 +1,53 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +# from drm/Makefile +C_SOURCES = \ + vmw_buffer.c \ + vmw_context.c \ + vmw_fence.c \ + vmw_screen.c \ + vmw_screen_dri.c \ + vmw_screen_ioctl.c \ + vmw_screen_pools.c \ + vmw_screen_svga.c \ + vmw_surface.c + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(addprefix drm/, $(C_SOURCES)) + +LOCAL_C_INCLUDES := \ + $(GALLIUM_TOP)/drivers/svga \ + $(GALLIUM_TOP)/drivers/svga/include \ + $(DRM_TOP) \ + $(DRM_TOP)/include/drm + +LOCAL_MODULE := libmesa_winsys_svga + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/gallium/winsys/sw/Android.mk b/src/gallium/winsys/sw/Android.mk new file mode 100644 index 0000000000..83aad45da1 --- /dev/null +++ b/src/gallium/winsys/sw/Android.mk @@ -0,0 +1,35 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + android/android_sw_winsys.cpp + +LOCAL_MODULE := libmesa_winsys_sw + +include $(GALLIUM_TEMPLATE) +include $(BUILD_STATIC_LIBRARY) diff --git a/src/glsl/Android.gen.mk b/src/glsl/Android.gen.mk new file mode 100644 index 0000000000..39c4dc22c3 --- /dev/null +++ b/src/glsl/Android.gen.mk @@ -0,0 +1,65 @@ +ifeq ($(LOCAL_MODULE_CLASS),) +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +endif + +intermediates := $(call local-intermediates-dir) + +sources := \ + glsl_lexer.cpp \ + glsl_parser.cpp \ + glcpp/glcpp-lex.c \ + glcpp/glcpp-parse.c + +ifneq ($(LOCAL_IS_HOST_MODULE),true) +sources += builtin_function.cpp +endif + +LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES)) + +LOCAL_C_INCLUDES += $(intermediates) $(intermediates)/glcpp $(MESA_TOP)/src/glsl/glcpp + +sources := $(addprefix $(intermediates)/, $(sources)) +LOCAL_GENERATED_SOURCES += $(sources) + +define local-l-or-ll-to-c-or-cpp + @mkdir -p $(dir $@) + @echo "Mesa Lex: $(PRIVATE_MODULE) <= $<" + $(hide) $(LEX) --nounistd -o$@ $< +endef + +define local-y-to-c-and-h + @mkdir -p $(dir $@) + @echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<" + $(hide) $(YACC) -o $@ $< +endef + +define local-yy-to-cpp-and-h + @mkdir -p $(dir $@) + @echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<" + $(hide) $(YACC) -p "_mesa_glsl_" -o $@ $< + touch $(@:$1=$(YACC_HEADER_SUFFIX)) + echo '#ifndef '$(@F:$1=_h) > $(@:$1=.h) + echo '#define '$(@F:$1=_h) >> $(@:$1=.h) + cat $(@:$1=$(YACC_HEADER_SUFFIX)) >> $(@:$1=.h) + echo '#endif' >> $(@:$1=.h) + rm -f $(@:$1=$(YACC_HEADER_SUFFIX)) +endef + +$(intermediates)/glsl_lexer.cpp: $(LOCAL_PATH)/glsl_lexer.ll + $(call local-l-or-ll-to-c-or-cpp) + +$(intermediates)/glsl_parser.cpp: $(LOCAL_PATH)/glsl_parser.yy + $(call local-yy-to-cpp-and-h,.cpp) + +$(intermediates)/glcpp/glcpp-lex.c: $(LOCAL_PATH)/glcpp/glcpp-lex.l + $(call local-l-or-ll-to-c-or-cpp) + +$(intermediates)/glcpp/glcpp-parse.c: $(LOCAL_PATH)/glcpp/glcpp-parse.y + $(call local-y-to-c-and-h) + +BUILTIN_COMPILER := $(BUILD_OUT_EXECUTABLES)/builtin_compiler$(BUILD_EXECUTABLE_SUFFIX) + +$(intermediates)/builtin_function.cpp: $(LOCAL_PATH)/builtins/tools/generate_builtins.py $(LOCAL_PATH)/builtins/tools/texture_builtins.py $(BUILTIN_COMPILER) $(LOCAL_PATH)/builtins/profiles/* $(LOCAL_PATH)/builtins/ir/* + @mkdir -p $(dir $@) + @echo "GLSL: $(PRIVATE_MODULE) <= $<" + $(hide) python $< $(BUILTIN_COMPILER) > $@ || rm -f $@ diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk new file mode 100644 index 0000000000..791875d844 --- /dev/null +++ b/src/glsl/Android.mk @@ -0,0 +1,160 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Android.mk for glsl + +LOCAL_PATH := $(call my-dir) + +# from Makefile +LIBGLCPP_SOURCES = \ + glcpp/glcpp-lex.c \ + glcpp/glcpp-parse.c \ + glcpp/pp.c + +C_SOURCES = \ + strtod.c \ + ralloc.c \ + $(LIBGLCPP_SOURCES) + +CXX_SOURCES = \ + ast_expr.cpp \ + ast_function.cpp \ + ast_to_hir.cpp \ + ast_type.cpp \ + glsl_lexer.cpp \ + glsl_parser.cpp \ + glsl_parser_extras.cpp \ + glsl_types.cpp \ + glsl_symbol_table.cpp \ + hir_field_selection.cpp \ + ir_basic_block.cpp \ + ir_clone.cpp \ + ir_constant_expression.cpp \ + ir.cpp \ + ir_expression_flattening.cpp \ + ir_function_can_inline.cpp \ + ir_function_detect_recursion.cpp \ + ir_function.cpp \ + ir_hierarchical_visitor.cpp \ + ir_hv_accept.cpp \ + ir_import_prototypes.cpp \ + ir_print_visitor.cpp \ + ir_reader.cpp \ + ir_rvalue_visitor.cpp \ + ir_set_program_inouts.cpp \ + ir_validate.cpp \ + ir_variable.cpp \ + ir_variable_refcount.cpp \ + linker.cpp \ + link_functions.cpp \ + loop_analysis.cpp \ + loop_controls.cpp \ + loop_unroll.cpp \ + lower_discard.cpp \ + lower_if_to_cond_assign.cpp \ + lower_instructions.cpp \ + lower_jumps.cpp \ + lower_mat_op_to_vec.cpp \ + lower_noise.cpp \ + lower_texture_projection.cpp \ + lower_variable_index_to_cond_assign.cpp \ + lower_vec_index_to_cond_assign.cpp \ + lower_vec_index_to_swizzle.cpp \ + lower_vector.cpp \ + opt_algebraic.cpp \ + opt_constant_folding.cpp \ + opt_constant_propagation.cpp \ + opt_constant_variable.cpp \ + opt_copy_propagation.cpp \ + opt_copy_propagation_elements.cpp \ + opt_dead_code.cpp \ + opt_dead_code_local.cpp \ + opt_dead_functions.cpp \ + opt_discard_simplification.cpp \ + opt_function_inlining.cpp \ + opt_if_simplification.cpp \ + opt_noop_swizzle.cpp \ + opt_redundant_jumps.cpp \ + opt_structure_splitting.cpp \ + opt_swizzle_swizzle.cpp \ + opt_tree_grafting.cpp \ + s_expression.cpp + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(C_SOURCES) \ + $(CXX_SOURCES) \ + builtin_function.cpp + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa + +LOCAL_MODULE := libmesa_glsl + +include $(LOCAL_PATH)/Android.gen.mk +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(C_SOURCES) \ + $(CXX_SOURCES) \ + builtin_stubs.cpp \ + main.cpp \ + standalone_scaffolding.cpp + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa + +LOCAL_STATIC_LIBRARIES := libmesa_glsl_utils + +LOCAL_MODULE := builtin_compiler + +LOCAL_MODULE_CLASS := EXECUTABLES +LOCAL_IS_HOST_MODULE := true +include $(LOCAL_PATH)/Android.gen.mk +include $(MESA_COMMON_MK) +include $(BUILD_HOST_EXECUTABLE) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + builtin_stubs.cpp \ + main.cpp \ + standalone_scaffolding.cpp + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa + +LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils + +LOCAL_MODULE := glsl_compiler + +include $(MESA_COMMON_MK) +include $(BUILD_EXECUTABLE) diff --git a/src/mapi/Android.mk b/src/mapi/Android.mk new file mode 100644 index 0000000000..cf5670aed1 --- /dev/null +++ b/src/mapi/Android.mk @@ -0,0 +1,44 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Android.mk for glapi + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +include $(LOCAL_PATH)/mapi/sources.mak +LOCAL_SRC_FILES := $(addprefix mapi/, $(MAPI_GLAPI_SOURCES)) + +LOCAL_CFLAGS := \ + -DMAPI_MODE_GLAPI \ + -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\" + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/mapi + +LOCAL_MODULE := libglapi + +include $(MESA_COMMON_MK) +include $(BUILD_SHARED_LIBRARY) diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk new file mode 100644 index 0000000000..c29c3c27ac --- /dev/null +++ b/src/mesa/Android.gen.mk @@ -0,0 +1,65 @@ +ifeq ($(LOCAL_MODULE_CLASS),) +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +endif + +intermediates := $(call local-intermediates-dir) + +sources := \ + main/api_exec_es1.c \ + main/api_exec_es2.c \ + program/lex.yy.c \ + program/program_parse.tab.c + +LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES)) + +sources += main/git_sha1.h + +sources := $(addprefix $(intermediates)/, $(sources)) +LOCAL_GENERATED_SOURCES += $(sources) + +LOCAL_C_INCLUDES += $(intermediates)/main + +es_gen_DEPS := \ + $(LOCAL_PATH)/main/es_generator.py \ + $(LOCAL_PATH)/main/APIspec.xml \ + $(LOCAL_PATH)/main/APIspecutil.py \ + $(LOCAL_PATH)/main/APIspec.py +define es-gen + @mkdir -p $(dir $@) + @echo "ES: $(PRIVATE_MODULE) <= $(notdir $(@))" + $(hide) python $(word 1,$(es_gen_DEPS)) -S $(word 2,$(es_gen_DEPS)) -V$(1) > $@ +endef + +define local-l-to-c + @mkdir -p $(dir $@) + @echo "Mesa Lex: $(PRIVATE_MODULE) <= $<" + $(hide) $(LEX) -o$@ $< +endef + +define local-y-to-c-and-h + @mkdir -p $(dir $@) + @echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<" + $(hide) $(YACC) -o $@ $< +endef + +$(intermediates)/main/api_exec_es1.c: $(es_gen_DEPS) + $(call es-gen,GLES1.1) + +$(intermediates)/main/api_exec_es2.c: $(es_gen_DEPS) + $(call es-gen,GLES2.0) + +$(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program/program_parse.y + $(local-y-to-c-and-h) + +$(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program/program_lexer.l + $(local-l-to-c) + +$(intermediates)/main/git_sha1.h: + @mkdir -p $(dir $@) + @echo "GIT-SHA1: $(PRIVATE_MODULE) <= git" + $(hide) touch $@ + $(hide) if which git > /dev/null; then \ + git --git-dir $(PRIVATE_PATH)/../../.git log -n 1 --oneline | \ + sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ + > $@; \ + fi diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk new file mode 100644 index 0000000000..ef276aa77f --- /dev/null +++ b/src/mesa/Android.mk @@ -0,0 +1,83 @@ +# Mesa 3-D graphics library +# Version: 7.11 +# +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> +# Copyright (C) 2010-2011 LunarG Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Android.mk for core mesa + +LOCAL_PATH := $(call my-dir) + +include $(LOCAL_PATH)/sources.mak + +common_CFLAGS := \ + -DFEATURE_ES1=1 \ + -DFEATURE_ES2=1 + +common_C_INCLUDES := \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/glsl + +ifeq ($(strip $(MESA_BUILD_GALLIUM)),true) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + $(MESA_GALLIUM_SOURCES) \ + $(MESA_GALLIUM_CXX_SOURCES) \ + $(X86_SOURCES) + +LOCAL_CFLAGS := $(common_CFLAGS) + +LOCAL_C_INCLUDES := \ + $(common_C_INCLUDES) \ + $(MESA_TOP)/src/gallium/include \ + $(MESA_TOP)/src/gallium/auxiliary + +LOCAL_MODULE := libmesa_st_mesa + +include $(LOCAL_PATH)/Android.gen.mk +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) +endif # MESA_BUILD_GALLIUM + +# avoid circular dependency between mesa core and glsl +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + program/hash_table.c \ + program/symbol_table.c + +LOCAL_MODULE := libmesa_glsl_utils + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# need the host library to generate sources +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + program/hash_table.c \ + program/symbol_table.c + +LOCAL_MODULE := libmesa_glsl_utils + +include $(MESA_COMMON_MK) +include $(BUILD_HOST_STATIC_LIBRARY) |