blob: 32d5e347c89ba3397f746698612b8ca8f282b124 [file] [log] [blame]
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08001# 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 dexlist \
22 dexopt \
23 dexdump \
24 dvz \
25 dx \
26 libcore \
27 libnativehelper \
28 tools \
29 ))
30
31include $(subdirs)
32
33
34.PHONY: dex dex-debug
35ifeq ($(DONT_INSTALL_DEX_FILES),true)
36dex:
37 @echo "Forcing a remake with DONT_INSTALL_DEX_FILES=false"
38 $(hide) $(MAKE) DONT_INSTALL_DEX_FILES=false
39else
40# DONT_INSTALL_DEX_FILES is already false, so a normal make takes care of it.
41dex: $(DEFAULT_GOAL)
42endif
43
44d :=
45ifneq ($(GENERATE_DEX_DEBUG),)
46d := debug
47endif
48ifneq ($(DONT_INSTALL_DEX_FILES),true)
49d := $(d)-install
50endif
51ifneq ($(d),debug-install)
52# generate the debug .dex files, with a copy in ./dalvik/DEBUG-FILES.
53# We need to rebuild the .dex files for the debug output to be generated.
54# The "touch -c $(DX)" is a hack that we know will force
55# a rebuild of the .dex files. If $(DX) doesn't exist yet,
56# we won't touch it (-c) and the normal build will create
57# the .dex files naturally.
58dex-debug:
59 @echo "Forcing an app rebuild with GENERATE_DEX_DEBUG=true"
60 @touch -c $(DX)
61 $(hide) $(MAKE) DONT_INSTALL_DEX_FILES=false GENERATE_DEX_DEBUG=true
62else
63# GENERATE_DEX_DEBUG and DONT_INSTALL_DEX_FILES are already set properly,
64# so a normal make takes care of it.
65dex-debug: $(DEFAULT_GOAL)
66endif