• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Mesa 3-D graphics library
2#
3# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
4# Copyright (C) 2010-2011 LunarG Inc.
5#
6# Permission is hereby granted, free of charge, to any person obtaining a
7# copy of this software and associated documentation files (the "Software"),
8# to deal in the Software without restriction, including without limitation
9# the rights to use, copy, modify, merge, publish, distribute, sublicense,
10# and/or sell copies of the Software, and to permit persons to whom the
11# Software is furnished to do so, subject to the following conditions:
12#
13# The above copyright notice and this permission notice shall be included
14# in all copies or substantial portions of the Software.
15#
16# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22# DEALINGS IN THE SOFTWARE.
23
24# included by core mesa Android.mk for source generation
25
26ifeq ($(LOCAL_MODULE_CLASS),)
27LOCAL_MODULE_CLASS := STATIC_LIBRARIES
28endif
29
30intermediates := $(call local-generated-sources-dir)
31prebuilt_intermediates := $(MESA_TOP)/prebuilt-intermediates
32
33# This is the list of auto-generated files: sources and headers
34sources := \
35	main/enums.c \
36	main/api_exec.c \
37	main/dispatch.h \
38	main/format_fallback.c \
39	main/format_pack.c \
40	main/format_unpack.c \
41	main/format_info.h \
42	main/remap_helper.h \
43	main/get_hash.h \
44	main/marshal_generated.c \
45	main/marshal_generated.h
46
47LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES))
48
49LOCAL_C_INCLUDES += $(intermediates)/main
50
51ifeq ($(strip $(MESA_ENABLE_ASM)),true)
52ifeq ($(TARGET_ARCH),x86)
53sources += x86/matypes.h
54LOCAL_C_INCLUDES += $(intermediates)/x86
55matypes_deps := \
56	$(BUILD_OUT_EXECUTABLES)/mesa_gen_matypes$(BUILD_EXECUTABLE_SUFFIX) \
57	$(LOCAL_PATH)/main/mtypes.h \
58	$(LOCAL_PATH)/tnl/t_context.h
59$(intermediates)/x86/matypes.h: $(matypes_deps)
60	@mkdir -p $(dir $@)
61	@echo "MATYPES: $(PRIVATE_MODULE) <= $(notdir $@)"
62	$(hide) $< > $@
63endif
64endif
65
66sources := $(addprefix $(intermediates)/, $(sources))
67
68LOCAL_GENERATED_SOURCES += $(sources)
69
70$(intermediates)/main/dispatch.h: $(prebuilt_intermediates)/main/dispatch.h
71	@mkdir -p $(dir $@)
72	@cp -f $< $@
73
74$(intermediates)/main/remap_helper.h: $(prebuilt_intermediates)/main/remap_helper.h
75	@mkdir -p $(dir $@)
76	@cp -f $< $@
77
78$(intermediates)/main/enums.c: $(prebuilt_intermediates)/main/enums.c
79	@mkdir -p $(dir $@)
80	@cp -f $< $@
81
82$(intermediates)/main/api_exec.c: $(prebuilt_intermediates)/main/api_exec.c
83	@mkdir -p $(dir $@)
84	@cp -f $< $@
85
86$(intermediates)/main/marshal_generated.c: $(prebuilt_intermediates)/main/marshal_generated.c
87	@mkdir -p $(dir $@)
88	@cp -f $< $@
89
90$(intermediates)/main/marshal_generated.h: $(prebuilt_intermediates)/main/marshal_generated.h
91	@mkdir -p $(dir $@)
92	@cp -f $< $@
93
94$(intermediates)/main/get_hash.h: $(prebuilt_intermediates)/main/get_hash.h
95	@mkdir -p $(dir $@)
96	@cp -f $< $@
97
98$(intermediates)/main/format_fallback.c: $(prebuilt_intermediates)/main/format_fallback.c
99	@mkdir -p $(dir $@)
100	@cp -f $< $@
101
102$(intermediates)/main/format_info.h: $(prebuilt_intermediates)/main/format_info.h
103	@mkdir -p $(dir $@)
104	@cp -f $< $@
105
106$(intermediates)/main/format_pack.c: $(prebuilt_intermediates)/main/format_pack.c
107	@mkdir -p $(dir $@)
108	@cp -f $< $@
109
110$(intermediates)/main/format_unpack.c: $(prebuilt_intermediates)/main/format_unpack.c
111	@mkdir -p $(dir $@)
112	@cp -f $< $@
113