1 # Copyright (C) 2014 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 16 LOCAL_PATH:= $(call my-dir) 17 18 include $(CLEAR_VARS) 19 20 # b/31559947, work around clang-tidy bug, disable clang-analyzer checks. 21 LOCAL_TIDY_CHECKS := -clang-analyzer* 22 23 LOCAL_CFLAGS_32 += -DBITS_PER_LONG=32 -DCONFIG_64BIT 24 LOCAL_CFLAGS_64 += -DBITS_PER_LONG=64 -DCONFIG_32BIT 25 26 main_src_files := gettime.c fio.c ioengines.c init.c stat.c log.c time.c \ 27 filesetup.c eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \ 28 smalloc.c filehash.c helpers.c profile.c debug.c backend.c \ 29 cconv.c client.c filelock.c flow.c gettime-thread.c idletime.c io_u_queue.c \ 30 iolog.c json.c libfio.c memalign.c profiles/act.c profiles/tiobench.c server.c \ 31 td_error.c diskutil.c blktrace.c trim.c fifo.c cgroup.c 32 33 lib_src_files := lib/rbtree.c lib/flist_sort.c lib/getrusage.c lib/hweight.c lib/ieee754.c lib/lfsr.c \ 34 lib/num2str.c lib/prio_tree.c lib/rand.c lib/zipf.c lib/inet_aton.c lib/axmap.c \ 35 lib/bloom.c lib/linux-dev-lookup.c lib/tp.c 36 37 crc_src_files := crc/crc7.c crc/crc16.c crc/crc32.c crc/crc64.c crc/crc32c.c crc/crc32c-intel.c \ 38 crc/sha1.c crc/sha256.c crc/sha512.c crc/md5.c crc/test.c crc/xxhash.c \ 39 crc/fnv.c crc/murmur3.c 40 41 engines_src_files := engines/cpu.c engines/mmap.c engines/null.c engines/net.c \ 42 engines/sg.c engines/sync.c 43 44 engines_src_files_64 := engines/splice.c 45 46 LOCAL_SRC_FILES := $(main_src_files) \ 47 $(lib_src_files) \ 48 $(crc_src_files) \ 49 $(engines_src_files) \ 50 51 LOCAL_SRC_FILES_64 += $(engines_src_files_64) 52 53 LOCAL_MODULE := fio 54 LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) 55 LOCAL_MODULE_TAGS := debug 56 57 LOCAL_SHARED_LIBRARIES := libdl 58 LOCAL_STATIC_LIBRARIES := libcutils libz 59 60 LOCAL_CFLAGS += -DFIO_VERSION="\"fio-2.2.6\"" \ 61 -DCONFIG_3ARG_AFFINITY \ 62 -DCONFIG_CLOCK_GETTIME \ 63 -DCONFIG_CLOCK_MONOTONIC \ 64 -DCONFIG_FDATASYNC \ 65 -DCONFIG_GETOPT_LONG_ONLY \ 66 -DCONFIG_GETTIMEOFDAY \ 67 -DCONFIG_IPV6 \ 68 -DCONFIG_LINUX_FALLOCATE \ 69 -DCONFIG_LITTLE_ENDIAN \ 70 -DCONFIG_RLIMIT_MEMLOCK \ 71 -DCONFIG_RUSAGE_THREAD \ 72 -DCONFIG_SCHED_IDLE \ 73 -DCONFIG_SETVBUF \ 74 -DCONFIG_SFAA \ 75 -DCONFIG_SOCKLEN_T \ 76 -DCONFIG_STRCASESTR \ 77 -DCONFIG_STRSEP \ 78 -DCONFIG_TCP_NODELAY \ 79 -DCONFIG_TLS_THREAD \ 80 -DCONFIG_ZLIB \ 81 -DFIO_HAVE_CGROUPS \ 82 -DFIO_INC_DEBUG \ 83 -DFIO_INTERNAL \ 84 -DNO_GETMNTENT_R \ 85 -DNO_INET_NETWORK \ 86 -D_FILE_OFFSET_BITS=64 \ 87 -D_FORTIFY_SOURCE=2 \ 88 -D_GNU_SOURCE \ 89 -D_LARGEFILE_SOURCE \ 90 -D__ANDROID__ \ 91 -O3 \ 92 -Wall \ 93 -Wdeclaration-after-statement \ 94 -Wwrite-strings \ 95 -ffast-math \ 96 -fno-omit-frame-pointer \ 97 -g \ 98 -std=gnu99 \ 99 -Wno-pointer-arith \ 100 -Wno-sign-compare \ 101 -Wno-unused-parameter \ 102 -Wno-unused-variable \ 103 104 LOCAL_LDFLAGS += \ 105 -rdynamic \ 106 107 LOCAL_CFLAGS_64 += \ 108 -DCONFIG_LINUX_SPLICE \ 109 110 include $(BUILD_EXECUTABLE) 111