Home | History | Annotate | Download | only in libportable
      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 
     17 LOCAL_PATH := $(call my-dir)
     18 
     19 #=====================================================================
     20 # Device Shared Library libportable
     21 #=====================================================================
     22 
     23 include $(CLEAR_VARS)
     24 
     25 LOCAL_MODULE := libportable
     26 LOCAL_MODULE_TAGS := optional
     27 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     28 
     29 LOCAL_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 
     34 ifeq ($(TARGET_ARCH),mips)
     35 libportable_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 			arch-mips/md_swap.c
     62 
     63 libportable_arch_src_files += \
     64 			arch-mips/_setjmp.S \
     65 			arch-mips/setjmp.S \
     66 			arch-mips/sigsetjmp.S
     67 
     68 endif
     69 
     70 ifeq ($(TARGET_ARCH),arm)
     71 libportable_arch_src_files += \
     72 			arch-arm/unwind.c \
     73 			arch-arm/fenv.c \
     74 			arch-arm/md_swap.c
     75 endif
     76 
     77 ifeq ($(TARGET_ARCH),x86)
     78 libportable_arch_src_files += \
     79 			arch-x86/epoll.c \
     80 			arch-x86/fcntl.c \
     81 			arch-x86/ioctl.c \
     82 			arch-x86/open.c \
     83 			arch-x86/stat.c \
     84 			arch-x86/fenv.c \
     85 			arch-x86/md_swap.c
     86 endif
     87 
     88 LOCAL_SRC_FILES := \
     89         $(libportable_common_src_files) \
     90         $(libportable_arch_src_files)
     91 
     92 LOCAL_WHOLE_STATIC_LIBRARIES += cpufeatures
     93 
     94 LOCAL_SHARED_LIBRARIES += liblog
     95 
     96 include $(BUILD_SHARED_LIBRARY)
     97