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 28intermediates := $(call local-intermediates-dir) 29 30asm_file := $(intermediates)/$(slangdata_output_var_name).S 31LOCAL_GENERATED_SOURCES += $(asm_file) 32 33$(asm_file): PRIVATE_OUTPUT_VAR_NAME = $(basename $(notdir $@)) 34$(asm_file): PRIVATE_CUSTOM_TOOL = python $(SLANG_DATA) $(PRIVATE_OUTPUT_VAR_NAME) < $< > $@ 35$(asm_file): $(SLANG_DATA) 36$(asm_file): $(input_data_file) 37 $(transform-generated-source) 38 39LOCAL_CFLAGS += -D_REENTRANT -DPIC -fPIC 40LOCAL_CFLAGS += -O3 -nodefaultlibs -nostdlib 41