Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | include $(CLEAR_VARS) |
| 19 | |
Carl Shapiro | 0e6d197 | 2011-07-06 19:17:39 -0700 | [diff] [blame] | 20 | build_path := $(LOCAL_PATH)/build |
Brian Carlstrom | cdc8de4 | 2011-07-19 14:23:17 -0700 | [diff] [blame] | 21 | include $(build_path)/Android.common.mk |
| 22 | |
Carl Shapiro | 0e6d197 | 2011-07-06 19:17:39 -0700 | [diff] [blame] | 23 | include $(build_path)/Android.libart.mk |
| 24 | include $(build_path)/Android.test.mk |
| 25 | include $(build_path)/Android.aexec.mk |
Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 26 | |
| 27 | ifeq ($(WITH_HOST_DALVIK),true) |
Carl Shapiro | 0e6d197 | 2011-07-06 19:17:39 -0700 | [diff] [blame] | 28 | include $(build_path)/Android.libart.host.mk |
| 29 | include $(build_path)/Android.test.host.mk |
| 30 | include $(build_path)/Android.aexec.host.mk |
Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 31 | endif |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 32 | |
| 33 | |
| 34 | # "m build-art" for quick minimal build |
| 35 | .PHONY: build-art |
| 36 | build-art: \ |
| 37 | $(TARGET_OUT_EXECUTABLES)/aexec \ |
Carl Shapiro | 6547ace | 2011-07-22 22:44:59 -0700 | [diff] [blame] | 38 | $(foreach file,$(TEST_TARGET_SRC_FILES),$(TARGET_OUT_EXECUTABLES)/$(notdir $(basename $(file:%.arm=%)))) \ |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 39 | $(HOST_OUT_EXECUTABLES)/aexec \ |
Carl Shapiro | 6547ace | 2011-07-22 22:44:59 -0700 | [diff] [blame] | 40 | $(foreach file,$(TEST_HOST_SRC_FILES),$(HOST_OUT_EXECUTABLES)/$(notdir $(basename $(file:%.arm=%)))) \ |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 41 | # |
| 42 | |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame^] | 43 | # "mm test-art" to build and run all tests on host and device |
| 44 | .PHONY: test-art |
| 45 | test-art: test-art-host test-art-target |
| 46 | |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 47 | # "mm test-art-host" to build and run all host tests |
| 48 | .PHONY: test-art-host |
Carl Shapiro | 6547ace | 2011-07-22 22:44:59 -0700 | [diff] [blame] | 49 | test-art-host: $(foreach file,$(TEST_HOST_SRC_FILES),$(HOST_OUT_EXECUTABLES)/$(notdir $(basename $(file:%.arm=%)))) |
| 50 | $(foreach file,$(TEST_HOST_SRC_FILES),$(HOST_OUT_EXECUTABLES)/$(notdir $(basename $(file:%.arm=%))) &&) true |
Brian Carlstrom | 59848da | 2011-07-23 20:35:19 -0700 | [diff] [blame] | 51 | |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame^] | 52 | # "mm test-art-device" to build and run all target tests |
| 53 | .PHONY: test-art-target |
| 54 | test-art-target: $(foreach file,$(TEST_TARGET_SRC_FILES),$(TARGET_OUT_EXECUTABLES)/$(notdir $(basename $(file:%.arm=%)))) |
| 55 | adb remount |
| 56 | adb sync |
| 57 | adb shell touch /sdcard/test-art-target |
| 58 | adb shell rm /sdcard/test-art-target |
| 59 | adb shell sh -c "$(foreach file,$(TEST_TARGET_SRC_FILES), /system/bin/$(notdir $(basename $(file:%.arm=%))) &&) touch /sdcard/test-art-target" |
| 60 | adb pull /sdcard/test-art-target /tmp/ |
| 61 | rm /tmp/test-art-target |
| 62 | |
| 63 | |
Brian Carlstrom | 59848da | 2011-07-23 20:35:19 -0700 | [diff] [blame] | 64 | # "mm cpplint-art" to style check art source files |
| 65 | .PHONY: cpplint-art |
| 66 | cpplint-art: |
| 67 | $(LOCAL_PATH)/tools/cpplint.py $(LOCAL_PATH)/src/*.h $(LOCAL_PATH)/src/*.cc |