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