SlangData.mk revision e30566bd86997e046ab12d0a21b891abc76fc158
1# Copyright (C) 2008 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15#
16# Common definitions used for building RS header files.
17#
18# Prior to including this file, the following variables should be
19# set for each variant:
20#
21#			LOCAL_MODULE -- set (as usual) to name the module being built
22#			input_data_file -- the path of the prebuilt data file to use
23#			slangdata_output_var_name -- name of the symbol that needs to be defined
24#												 					 in the data file
25#
26SLANG_DATA := frameworks/compile/slang/slangdata.py
27
28LOCAL_MODULE_CLASS := STATIC_LIBRARIES
29
30intermediates := $(call local-intermediates-dir)
31
32asm_file := $(intermediates)/$(slangdata_output_var_name).S
33LOCAL_GENERATED_SOURCES += $(asm_file)
34
35$(asm_file): PRIVATE_OUTPUT_VAR_NAME = $(basename $(notdir $@))
36$(asm_file): PRIVATE_CUSTOM_TOOL = python $(SLANG_DATA) $(PRIVATE_OUTPUT_VAR_NAME) < $< > $@
37$(asm_file): $(SLANG_DATA)
38$(asm_file): $(input_data_file)
39	$(transform-generated-source)
40
41LOCAL_CFLAGS  += -D_REENTRANT -DPIC -fPIC
42LOCAL_CFLAGS  += -O3 -nodefaultlibs -nostdlib
43
44# force 32 bit code for sim build
45ifeq ($(TARGET_SIMULATOR),true)
46LOCAL_CFLAGS += -m32
47LOCAL_LDFLAGS += -m32
48endif
49