Home | History | Annotate | Download | only in bzip2
      1 # Copyright (C) 2008 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 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 bzip_cflags := \
     18     -O3 \
     19     -DUSE_MMAP \
     20     -Wno-unused-parameter \
     21 
     22 bzlib_files := \
     23     blocksort.c \
     24     bzlib.c \
     25     compress.c \
     26     crctable.c \
     27     decompress.c \
     28     huffman.c \
     29     randtable.c \
     30 
     31 include $(CLEAR_VARS)
     32 # measurements show that the ARM version of ZLib is about x1.17 faster
     33 # than the thumb one...
     34 LOCAL_ARM_MODE := arm
     35 LOCAL_MODULE := libbz
     36 LOCAL_CFLAGS += $(bzip_cflags)
     37 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
     38 ifeq ($(TARGET_ARCH),arm)
     39   LOCAL_SDK_VERSION := 9
     40 endif
     41 LOCAL_SRC_FILES := $(bzlib_files)
     42 include $(BUILD_STATIC_LIBRARY)
     43 
     44 include $(CLEAR_VARS)
     45 LOCAL_CFLAGS += $(bzip_cflags)
     46 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
     47 LOCAL_MODULE := libbz
     48 LOCAL_SRC_FILES := $(bzlib_files)
     49 include $(BUILD_HOST_STATIC_LIBRARY)
     50