blob: a3f92cb788c86066efe29080476d234b8e8ef537 [file] [log] [blame]
Mathias Agopian83c64e62012-02-20 16:58:20 -08001# Copyright (C) 2010 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
17# libandroidfw is partially built for the host (used by build time keymap validation tool)
18# These files are common to host and target builds.
19
20# formerly in libutils
21commonUtilsSources:= \
22 Asset.cpp \
23 AssetDir.cpp \
24 AssetManager.cpp \
25 ObbFile.cpp \
26 ResourceTypes.cpp \
Colin Crossa982dc02012-03-22 18:43:07 -070027 StreamingZipInflater.cpp
Mathias Agopian83c64e62012-02-20 16:58:20 -080028
29# formerly in libui
30commonUiSources:= \
31 Input.cpp \
32 Keyboard.cpp \
33 KeyCharacterMap.cpp \
34 KeyLayoutMap.cpp \
35 VirtualKeyMap.cpp
36
37commonSources:= \
38 $(commonUtilsSources) \
39 $(commonUiSources)
40
41# For the host
42# =====================================================
43
44include $(CLEAR_VARS)
45
46LOCAL_SRC_FILES:= $(commonSources)
47
48LOCAL_MODULE:= libandroidfw
49
50LOCAL_MODULE_TAGS := optional
51
Mathias Agopian027692b2012-02-21 16:55:25 -080052LOCAL_C_INCLUDES := \
53 external/zlib
54
Mathias Agopian83c64e62012-02-20 16:58:20 -080055include $(BUILD_HOST_STATIC_LIBRARY)
56
57
58# For the device
59# =====================================================
60
61include $(CLEAR_VARS)
62
63LOCAL_SRC_FILES:= \
64 $(commonSources) \
65 BackupData.cpp \
66 BackupHelpers.cpp \
Mathias Agopian49d2b182012-02-27 18:11:20 -080067 CursorWindow.cpp \
Mathias Agopian83c64e62012-02-20 16:58:20 -080068 InputTransport.cpp
69
70LOCAL_SHARED_LIBRARIES := \
71 liblog \
72 libcutils \
73 libutils \
74 libbinder \
75 libskia \
76 libz
77
78LOCAL_C_INCLUDES := \
79 external/skia/include/core \
80 external/icu4c/common \
81 external/zlib
82
83LOCAL_MODULE:= libandroidfw
84
85LOCAL_MODULE_TAGS := optional
86
87include $(BUILD_SHARED_LIBRARY)
88
89
90ifeq ($(TARGET_OS),linux)
91include $(CLEAR_VARS)
92LOCAL_C_INCLUDES += \
93 external/skia/include/core \
94 external/zlib \
95 external/icu4c/common \
96 bionic/libc/private
Mathias Agopiancbc69712012-02-21 14:34:47 -080097LOCAL_LDLIBS := -lrt -ldl -lpthread
Mathias Agopian30c46ad2012-02-21 13:27:59 -080098LOCAL_MODULE := libandroidfw
Mathias Agopian83c64e62012-02-20 16:58:20 -080099LOCAL_SRC_FILES := $(commonUtilsSources) BackupData.cpp BackupHelpers.cpp
100include $(BUILD_STATIC_LIBRARY)
101endif
102
103
104# Include subdirectory makefiles
105# ============================================================
106
107# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
108# team really wants is to build the stuff defined by this makefile.
109ifeq (,$(ONE_SHOT_MAKEFILE))
110include $(call first-makefiles-under,$(LOCAL_PATH))
111endif