116c4d154dca43c662571129af31b27433b919a32Adam Lesinski# Copyright (C) 2010 The Android Open Source Project
216c4d154dca43c662571129af31b27433b919a32Adam Lesinski#
316c4d154dca43c662571129af31b27433b919a32Adam Lesinski# Licensed under the Apache License, Version 2.0 (the "License");
416c4d154dca43c662571129af31b27433b919a32Adam Lesinski# you may not use this file except in compliance with the License.
516c4d154dca43c662571129af31b27433b919a32Adam Lesinski# You may obtain a copy of the License at
616c4d154dca43c662571129af31b27433b919a32Adam Lesinski#
716c4d154dca43c662571129af31b27433b919a32Adam Lesinski#      http://www.apache.org/licenses/LICENSE-2.0
816c4d154dca43c662571129af31b27433b919a32Adam Lesinski#
916c4d154dca43c662571129af31b27433b919a32Adam Lesinski# Unless required by applicable law or agreed to in writing, software
1016c4d154dca43c662571129af31b27433b919a32Adam Lesinski# distributed under the License is distributed on an "AS IS" BASIS,
1116c4d154dca43c662571129af31b27433b919a32Adam Lesinski# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1216c4d154dca43c662571129af31b27433b919a32Adam Lesinski# See the License for the specific language governing permissions and
1316c4d154dca43c662571129af31b27433b919a32Adam Lesinski# limitations under the License.
1416c4d154dca43c662571129af31b27433b919a32Adam Lesinski
1516c4d154dca43c662571129af31b27433b919a32Adam LesinskiLOCAL_PATH:= $(call my-dir)
1616c4d154dca43c662571129af31b27433b919a32Adam Lesinski
174bf58108d442b37ab4adf5ce3a4ecd63472ce254Adam Lesinski# libandroidfw is partially built for the host (used by obbtool, aapt, and others)
1816c4d154dca43c662571129af31b27433b919a32Adam Lesinski# These files are common to host and target builds.
1916c4d154dca43c662571129af31b27433b919a32Adam Lesinski
2016c4d154dca43c662571129af31b27433b919a32Adam LesinskicommonSources := \
2116c4d154dca43c662571129af31b27433b919a32Adam Lesinski    Asset.cpp \
2216c4d154dca43c662571129af31b27433b919a32Adam Lesinski    AssetDir.cpp \
2316c4d154dca43c662571129af31b27433b919a32Adam Lesinski    AssetManager.cpp \
24b927c559e1ef8530b08712507f320502627db298Roozbeh Pournader    LocaleData.cpp \
2516c4d154dca43c662571129af31b27433b919a32Adam Lesinski    misc.cpp \
2616c4d154dca43c662571129af31b27433b919a32Adam Lesinski    ObbFile.cpp \
2716c4d154dca43c662571129af31b27433b919a32Adam Lesinski    ResourceTypes.cpp \
2816c4d154dca43c662571129af31b27433b919a32Adam Lesinski    StreamingZipInflater.cpp \
29f90f2f8dc36e7243b85e0b6a7fd5a590893c827eAdam Lesinski    TypeWrappers.cpp \
3016c4d154dca43c662571129af31b27433b919a32Adam Lesinski    ZipFileRO.cpp \
3116c4d154dca43c662571129af31b27433b919a32Adam Lesinski    ZipUtils.cpp
3216c4d154dca43c662571129af31b27433b919a32Adam Lesinski
3316c4d154dca43c662571129af31b27433b919a32Adam LesinskideviceSources := \
3416c4d154dca43c662571129af31b27433b919a32Adam Lesinski    $(commonSources) \
3516c4d154dca43c662571129af31b27433b919a32Adam Lesinski    BackupData.cpp \
3616c4d154dca43c662571129af31b27433b919a32Adam Lesinski    BackupHelpers.cpp \
373d3fe5026a6a3e951ef56ad16a100b8d5ae84574Michael Wright    CursorWindow.cpp \
383d3fe5026a6a3e951ef56ad16a100b8d5ae84574Michael Wright    DisplayEventDispatcher.cpp
3916c4d154dca43c662571129af31b27433b919a32Adam Lesinski
404bf58108d442b37ab4adf5ce3a4ecd63472ce254Adam LesinskihostSources := $(commonSources)
4116c4d154dca43c662571129af31b27433b919a32Adam Lesinski
4216c4d154dca43c662571129af31b27433b919a32Adam Lesinski# For the host
4316c4d154dca43c662571129af31b27433b919a32Adam Lesinski# =====================================================
4416c4d154dca43c662571129af31b27433b919a32Adam Lesinskiinclude $(CLEAR_VARS)
4516c4d154dca43c662571129af31b27433b919a32Adam Lesinski
4616c4d154dca43c662571129af31b27433b919a32Adam LesinskiLOCAL_MODULE:= libandroidfw
474aa679ff969c3ec2159088cd3740df1034c9ee24Dan WillemsenLOCAL_MODULE_HOST_OS := darwin linux windows
4816c4d154dca43c662571129af31b27433b919a32Adam LesinskiLOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
492204f0bf56af53b588a01701b8cf9cd05b1b3ff9Andreas GampeLOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
504bf58108d442b37ab4adf5ce3a4ecd63472ce254Adam LesinskiLOCAL_SRC_FILES:= $(hostSources)
514bf58108d442b37ab4adf5ce3a4ecd63472ce254Adam LesinskiLOCAL_C_INCLUDES := external/zlib
5216c4d154dca43c662571129af31b27433b919a32Adam Lesinski
5316c4d154dca43c662571129af31b27433b919a32Adam Lesinskiinclude $(BUILD_HOST_STATIC_LIBRARY)
5416c4d154dca43c662571129af31b27433b919a32Adam Lesinski
5516c4d154dca43c662571129af31b27433b919a32Adam Lesinski
5616c4d154dca43c662571129af31b27433b919a32Adam Lesinski# For the device
5716c4d154dca43c662571129af31b27433b919a32Adam Lesinski# =====================================================
5816c4d154dca43c662571129af31b27433b919a32Adam Lesinski
5916c4d154dca43c662571129af31b27433b919a32Adam Lesinskiinclude $(CLEAR_VARS)
6016c4d154dca43c662571129af31b27433b919a32Adam Lesinski
614bf58108d442b37ab4adf5ce3a4ecd63472ce254Adam LesinskiLOCAL_MODULE:= libandroidfw
6216c4d154dca43c662571129af31b27433b919a32Adam LesinskiLOCAL_SRC_FILES:= $(deviceSources)
634bf58108d442b37ab4adf5ce3a4ecd63472ce254Adam LesinskiLOCAL_C_INCLUDES := \
644bf58108d442b37ab4adf5ce3a4ecd63472ce254Adam Lesinski    system/core/include
659c8ba9666d2fad27baae11e56d63485a22812d17Narayan KamathLOCAL_STATIC_LIBRARIES := libziparchive libbase
6616c4d154dca43c662571129af31b27433b919a32Adam LesinskiLOCAL_SHARED_LIBRARIES := \
672204f0bf56af53b588a01701b8cf9cd05b1b3ff9Andreas Gampe    libbinder \
682204f0bf56af53b588a01701b8cf9cd05b1b3ff9Andreas Gampe    liblog \
692204f0bf56af53b588a01701b8cf9cd05b1b3ff9Andreas Gampe    libcutils \
703d3fe5026a6a3e951ef56ad16a100b8d5ae84574Michael Wright    libgui \
712204f0bf56af53b588a01701b8cf9cd05b1b3ff9Andreas Gampe    libutils \
722204f0bf56af53b588a01701b8cf9cd05b1b3ff9Andreas Gampe    libz
7383c64e6b624a876436d2ef5d2f173b10407e27b4Mathias Agopian
742204f0bf56af53b588a01701b8cf9cd05b1b3ff9Andreas GampeLOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
7516c4d154dca43c662571129af31b27433b919a32Adam Lesinski
7616c4d154dca43c662571129af31b27433b919a32Adam Lesinskiinclude $(BUILD_SHARED_LIBRARY)
7716c4d154dca43c662571129af31b27433b919a32Adam Lesinski
7816c4d154dca43c662571129af31b27433b919a32Adam Lesinski
7916c4d154dca43c662571129af31b27433b919a32Adam Lesinski# Include subdirectory makefiles
8016c4d154dca43c662571129af31b27433b919a32Adam Lesinski# ============================================================
8116c4d154dca43c662571129af31b27433b919a32Adam Lesinski
8216c4d154dca43c662571129af31b27433b919a32Adam Lesinski# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
8316c4d154dca43c662571129af31b27433b919a32Adam Lesinski# team really wants is to build the stuff defined by this makefile.
8416c4d154dca43c662571129af31b27433b919a32Adam Lesinskiifeq (,$(ONE_SHOT_MAKEFILE))
8516c4d154dca43c662571129af31b27433b919a32Adam Lesinskiinclude $(call first-makefiles-under,$(LOCAL_PATH))
8616c4d154dca43c662571129af31b27433b919a32Adam Lesinskiendif
87