blob: f0c30ad56c031daebbc4b3fdc4362cfdb9b9af95 [file] [log] [blame]
buzbee1452bee2015-03-06 14:43:04 -08001# Copyright (C) 2016 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# Makefile for the Art fast interpreter. This is not currently
17# integrated into the build system.
18#
19
20SHELL := /bin/sh
21
22# Build system has TARGET_ARCH=arm, but we can support the exact architecture
23# if it is worthwhile.
24#
25# To generate sources:
26# for arch in arm arm64 x86 x86_64 mips mips64
27# do
28# TARGET_ARCH_EXT=$arch make -f Makefile-mterp
29# done
30#
31
32OUTPUT_DIR := out
33
34# Accumulate all possible dependencies for the generated files in a very
35# conservative fashion. If it's not one of the generated files in "out",
36# assume it's a dependency.
37SOURCE_DEPS := \
38 $(shell find . -path ./$(OUTPUT_DIR) -prune -o -type f -print) \
39
40# Source files generated by the script. There's always one C and one
41# assembly file, though in practice one or the other could be empty.
42GEN_SOURCES := \
43 $(OUTPUT_DIR)/interp_asm_$(TARGET_ARCH_EXT).S
44
45target: $(GEN_SOURCES)
46
47$(GEN_SOURCES): $(SOURCE_DEPS)
48 @mkdir -p out
49 ./gen_mterp.py $(TARGET_ARCH_EXT) $(OUTPUT_DIR)