blob: 2f96d598ca09fd3532ad7a00809ae02f29b7a346 [file] [log] [blame]
The Android Open Source Project2ad60cf2008-10-21 07:00:00 -07001# 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# Makefile for the Dalvik modular 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 need the exact architecture.
The Android Open Source Project89c1feb2008-12-17 18:03:55 -080023# The base assumption for an ARM platform is ARMv5TE, but we may want to
24# support older ARMv4 devices, or use special features from ARMv6 or VFP.
25# The simulator build is "desktop".
The Android Open Source Project2ad60cf2008-10-21 07:00:00 -070026#
27# To generate sources for all targets:
The Android Open Source Project89c1feb2008-12-17 18:03:55 -080028# for arch in desktop armv5te; do TARGET_ARCH_EXT=$arch make -f Makefile-mterp; done
The Android Open Source Project2ad60cf2008-10-21 07:00:00 -070029#
The Android Open Source Project89c1feb2008-12-17 18:03:55 -080030#TARGET_ARCH_EXT := armv5te
The Android Open Source Project2ad60cf2008-10-21 07:00:00 -070031
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 := \
Johnnie Birch22d404a2009-04-06 15:26:13 -070038 $(shell find . -path ./$(OUTPUT_DIR) -prune -o -type f -print) \
39 ../Android.mk ../../Android.mk
The Android Open Source Project2ad60cf2008-10-21 07:00:00 -070040
41# Source files generated by the script. There's always one C and one
42# assembly file, though in practice one or the other could be empty.
43GEN_SOURCES := \
44 $(OUTPUT_DIR)/InterpC-$(TARGET_ARCH_EXT).c \
45 $(OUTPUT_DIR)/InterpAsm-$(TARGET_ARCH_EXT).S
46
47target: $(GEN_SOURCES)
48
49$(GEN_SOURCES): $(SOURCE_DEPS)
50 @mkdir -p out
51 ./gen-mterp.py $(TARGET_ARCH_EXT) $(OUTPUT_DIR)