• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2006 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
15LOCAL_PATH := $(call my-dir)
16
17subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
18		libdex \
19		vm \
20		dalvikvm \
21		dexgen \
22		dexlist \
23		dexopt \
24		dexdump \
25		dvz \
26		dx \
27		libnativehelper \
28		tools \
29		unit-tests \
30	))
31
32include $(subdirs)
33
34
35.PHONY: dex dex-debug
36ifeq ($(DONT_INSTALL_DEX_FILES),true)
37dex:
38	@echo "Forcing a remake with DONT_INSTALL_DEX_FILES=false"
39	$(hide) $(MAKE) DONT_INSTALL_DEX_FILES=false
40else
41# DONT_INSTALL_DEX_FILES is already false, so a normal make takes care of it.
42dex: $(DEFAULT_GOAL)
43endif
44
45d :=
46ifneq ($(GENERATE_DEX_DEBUG),)
47d := debug
48endif
49ifneq ($(DONT_INSTALL_DEX_FILES),true)
50d := $(d)-install
51endif
52ifneq ($(d),debug-install)
53# generate the debug .dex files, with a copy in ./dalvik/DEBUG-FILES.
54# We need to rebuild the .dex files for the debug output to be generated.
55# The "touch -c $(DX)" is a hack that we know will force
56# a rebuild of the .dex files.  If $(DX) doesn't exist yet,
57# we won't touch it (-c) and the normal build will create
58# the .dex files naturally.
59dex-debug:
60	@echo "Forcing an app rebuild with GENERATE_DEX_DEBUG=true"
61	@touch -c $(DX)
62	$(hide) $(MAKE) DONT_INSTALL_DEX_FILES=false GENERATE_DEX_DEBUG=true
63else
64# GENERATE_DEX_DEBUG and DONT_INSTALL_DEX_FILES are already set properly,
65# so a normal make takes care of it.
66dex-debug: $(DEFAULT_GOAL)
67endif
68