Home | History | Annotate | Download | only in core
      1 # Copyright (C) 2009 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 # this file is included repeatedly from build/core/main.mk
     17 # and is used to prepare for app-specific build rules.
     18 #
     19 
     20 $(call assert-defined,_app)
     21 
     22 _map := GDK_APP.$(_app)
     23 
     24 # ok, let's parse all Android.mk source files in order to build
     25 # the modules for this app.
     26 #
     27 
     28 # Restore the APP_XXX variables just for this pass as GDK_APP_XXX
     29 #
     30 GDK_APP_NAME           := $(_app)
     31 GDK_APP_APPLICATION_MK := $(call get,$(_map),Application.mk)
     32 
     33 $(foreach __name,$(GDK_APP_VARS),\
     34   $(eval GDK_$(__name) := $(call get,$(_map),$(__name)))\
     35 )
     36 
     37 # make the application depend on the modules it requires
     38 .PHONY: gdk-app-$(_app)
     39 gdk-app-$(_app): $(GDK_APP_MODULES)
     40 all: gdk-app-$(_app)
     41 
     42 TARGET_PLATFORM := android-portable
     43 
     44 APP_ABI := $(strip $(GDK_APP_ABI))
     45 APP_ABI := llvm
     46 
     47 
     48 # Clear all installed binaries for this application
     49 # This ensures that if the build fails, you're not going to mistakenly
     50 # package an obsolete version of it. Or if you change the ABIs you're targetting,
     51 # you're not going to leave a stale shared library for the old one.
     52 #
     53 clean-installed-binaries::
     54 	$(hide) rm -f $(GDK_APP_PROJECT_PATH)/res/raw/lib*.bc
     55 
     56 $(foreach _abi,$(APP_ABI),\
     57     $(eval TARGET_ARCH_ABI := $(_abi))\
     58     $(eval include $(BUILD_SYSTEM)/setup-abi.mk) \
     59 )
     60