blob: bb79f27f4ac146af7368820da329bd45faab30a5 [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 \
Mathias Agopian1f5762e2013-05-06 20:20:34 -070025 misc.cpp \
Mathias Agopian83c64e62012-02-20 16:58:20 -080026 ObbFile.cpp \
27 ResourceTypes.cpp \
Mathias Agopian1f5762e2013-05-06 20:20:34 -070028 StreamingZipInflater.cpp \
29 ZipFileCRO.cpp \
30 ZipFileRO.cpp \
31 ZipUtils.cpp
Mathias Agopian83c64e62012-02-20 16:58:20 -080032
33# formerly in libui
34commonUiSources:= \
35 Input.cpp \
Jeff Brown9f25b7f2012-04-10 14:30:49 -070036 InputDevice.cpp \
Mathias Agopian83c64e62012-02-20 16:58:20 -080037 Keyboard.cpp \
38 KeyCharacterMap.cpp \
39 KeyLayoutMap.cpp \
Jeff Brown8a90e6e2012-05-11 12:24:35 -070040 VelocityControl.cpp \
41 VelocityTracker.cpp \
Mathias Agopian83c64e62012-02-20 16:58:20 -080042 VirtualKeyMap.cpp
43
44commonSources:= \
45 $(commonUtilsSources) \
46 $(commonUiSources)
47
48# For the host
49# =====================================================
50
51include $(CLEAR_VARS)
52
53LOCAL_SRC_FILES:= $(commonSources)
54
55LOCAL_MODULE:= libandroidfw
56
57LOCAL_MODULE_TAGS := optional
58
Bjorn Bringertfb903a42013-03-18 21:17:26 +000059LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
60
Mathias Agopian027692b2012-02-21 16:55:25 -080061LOCAL_C_INCLUDES := \
62 external/zlib
63
Mathias Agopian83c64e62012-02-20 16:58:20 -080064include $(BUILD_HOST_STATIC_LIBRARY)
65
66
67# For the device
68# =====================================================
69
70include $(CLEAR_VARS)
71
72LOCAL_SRC_FILES:= \
73 $(commonSources) \
74 BackupData.cpp \
75 BackupHelpers.cpp \
Mathias Agopian49d2b182012-02-27 18:11:20 -080076 CursorWindow.cpp \
Mathias Agopian83c64e62012-02-20 16:58:20 -080077 InputTransport.cpp
78
79LOCAL_SHARED_LIBRARIES := \
80 liblog \
81 libcutils \
82 libutils \
83 libbinder \
84 libskia \
85 libz
86
87LOCAL_C_INCLUDES := \
88 external/skia/include/core \
89 external/icu4c/common \
90 external/zlib
91
92LOCAL_MODULE:= libandroidfw
93
94LOCAL_MODULE_TAGS := optional
95
96include $(BUILD_SHARED_LIBRARY)
97
98
99ifeq ($(TARGET_OS),linux)
100include $(CLEAR_VARS)
Bjorn Bringertfb903a42013-03-18 21:17:26 +0000101LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
Mathias Agopian83c64e62012-02-20 16:58:20 -0800102LOCAL_C_INCLUDES += \
103 external/skia/include/core \
104 external/zlib \
105 external/icu4c/common \
106 bionic/libc/private
Mathias Agopiancbc69712012-02-21 14:34:47 -0800107LOCAL_LDLIBS := -lrt -ldl -lpthread
Mathias Agopian30c46ad2012-02-21 13:27:59 -0800108LOCAL_MODULE := libandroidfw
Mathias Agopian83c64e62012-02-20 16:58:20 -0800109LOCAL_SRC_FILES := $(commonUtilsSources) BackupData.cpp BackupHelpers.cpp
110include $(BUILD_STATIC_LIBRARY)
111endif
112
113
114# Include subdirectory makefiles
115# ============================================================
116
117# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
118# team really wants is to build the stuff defined by this makefile.
119ifeq (,$(ONE_SHOT_MAKEFILE))
120include $(call first-makefiles-under,$(LOCAL_PATH))
121endif