• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2012 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH := $(call my-dir)
18
19#=====================================================================
20# Device Shared Library libportable
21#=====================================================================
22
23include $(CLEAR_VARS)
24
25LOCAL_MODULE := libportable
26LOCAL_MODULE_TAGS := optional
27LOCAL_MODULE_CLASS := SHARED_LIBRARIES
28
29LOCAL_C_INCLUDES := $(LOCAL_PATH)/common/include
30
31# Uncomment the next line to easily enable Lib-Portable logging during development.
32# LOCAL_CFLAGS += -DLOG_NDEBUG=0
33
34ifeq ($(TARGET_ARCH),mips)
35libportable_arch_src_files += \
36			arch-mips/clone.c \
37			arch-mips/epoll.c \
38			arch-mips/errno.c \
39			arch-mips/eventfd.c \
40			arch-mips/fcntl.c \
41			arch-mips/filefd.c \
42			arch-mips/flags.c \
43			arch-mips/inotify.c \
44			arch-mips/ioctl.c \
45			arch-mips/mmap.c \
46			arch-mips/open.c \
47			arch-mips/poll.c \
48			arch-mips/pipe.c \
49			arch-mips/pthread.c \
50			arch-mips/resource.c \
51			arch-mips/signal.c \
52			arch-mips/socket.c \
53			arch-mips/sockopt.c \
54			arch-mips/stat.c \
55			arch-mips/statfs.c \
56			arch-mips/syscall.c \
57			arch-mips/timer.c \
58			arch-mips/timerfd.c \
59			arch-mips/waitpid.c \
60			arch-mips/fenv.c
61
62libportable_arch_src_files += \
63			arch-mips/_setjmp.S \
64			arch-mips/setjmp.S \
65			arch-mips/sigsetjmp.S
66
67endif
68
69ifeq ($(TARGET_ARCH),arm)
70libportable_arch_src_files += \
71			arch-arm/unwind.c \
72			arch-arm/fenv.c
73endif
74
75ifeq ($(TARGET_ARCH),x86)
76libportable_arch_src_files += \
77			arch-x86/epoll.c \
78			arch-x86/fcntl.c \
79			arch-x86/ioctl.c \
80			arch-x86/open.c \
81			arch-x86/stat.c \
82			arch-x86/fenv.c
83endif
84
85LOCAL_SRC_FILES := \
86        $(libportable_common_src_files) \
87        $(libportable_arch_src_files)
88
89LOCAL_WHOLE_STATIC_LIBRARIES += cpufeatures
90
91LOCAL_SHARED_LIBRARIES += liblog
92
93include $(BUILD_SHARED_LIBRARY)
94