blob: 3e0b5ab4409762399bd306ccc49636b8a204e77e [file] [log] [blame]
Mohamad Ayyash3c77c132014-05-14 12:13:31 -07001# 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
16LOCAL_PATH:= $(call my-dir)
17
18include $(CLEAR_VARS)
Mohamad Ayyasha64f0e12015-03-06 19:54:27 -080019ifeq ($(TARGET_ARCH),arm)
20# b/17167262, Cannot link gettime.c, undefined __aeabi_read_tp, when compiled with -fpie.
21LOCAL_CLANG := false
22endif
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070023
24LOCAL_CFLAGS_32 += -DBITS_PER_LONG=32 -DCONFIG_64BIT
25LOCAL_CFLAGS_64 += -DBITS_PER_LONG=64 -DCONFIG_32BIT
26
27main_src_files := gettime.c fio.c ioengines.c init.c stat.c log.c time.c \
28 filesetup.c eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \
29 smalloc.c filehash.c helpers.c profile.c debug.c backend.c \
30 cconv.c client.c filelock.c flow.c gettime-thread.c idletime.c io_u_queue.c \
31 iolog.c json.c libfio.c memalign.c profiles/act.c profiles/tiobench.c server.c \
Mohamad Ayyash77d97882015-03-05 13:34:54 -080032 td_error.c diskutil.c blktrace.c trim.c fifo.c cgroup.c
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070033
34lib_src_files := lib/rbtree.c lib/flist_sort.c lib/getrusage.c lib/hweight.c lib/ieee754.c lib/lfsr.c \
35 lib/num2str.c lib/prio_tree.c lib/rand.c lib/zipf.c lib/inet_aton.c lib/axmap.c \
Mohamad Ayyash77d97882015-03-05 13:34:54 -080036 lib/bloom.c lib/linux-dev-lookup.c lib/tp.c
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070037
38crc_src_files := crc/crc7.c crc/crc16.c crc/crc32.c crc/crc64.c crc/crc32c.c crc/crc32c-intel.c \
39 crc/sha1.c crc/sha256.c crc/sha512.c crc/md5.c crc/test.c crc/xxhash.c \
Mohamad Ayyash77d97882015-03-05 13:34:54 -080040 crc/fnv.c crc/murmur3.c
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070041
Mohamad Ayyash77d97882015-03-05 13:34:54 -080042engines_src_files := engines/cpu.c engines/mmap.c engines/null.c engines/net.c \
43 engines/sg.c engines/sync.c engines/gfapi.h
Elliott Hughes6f4e8052014-06-24 16:55:57 -070044
45engines_src_files_64 := engines/splice.c
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070046
47LOCAL_SRC_FILES := $(main_src_files) \
48 $(lib_src_files) \
49 $(crc_src_files) \
Elliott Hughes6f4e8052014-06-24 16:55:57 -070050 $(engines_src_files) \
51
52LOCAL_SRC_FILES_64 += $(engines_src_files_64)
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070053
54LOCAL_MODULE := fio
55LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
56LOCAL_MODULE_TAGS := debug
57
58LOCAL_SHARED_LIBRARIES := libdl
59LOCAL_STATIC_LIBRARIES := libcutils libz
60
Mohamad Ayyash77d97882015-03-05 13:34:54 -080061LOCAL_CFLAGS += -DFIO_VERSION="\"fio-2.2.6\"" \
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070062 -DCONFIG_3ARG_AFFINITY \
63 -DCONFIG_CLOCK_GETTIME \
64 -DCONFIG_CLOCK_MONOTONIC \
65 -DCONFIG_FDATASYNC \
66 -DCONFIG_GETOPT_LONG_ONLY \
67 -DCONFIG_GETTIMEOFDAY \
68 -DCONFIG_IPV6 \
69 -DCONFIG_LINUX_FALLOCATE \
70 -DCONFIG_LITTLE_ENDIAN \
Mohamad Ayyash3c77c132014-05-14 12:13:31 -070071 -DCONFIG_RLIMIT_MEMLOCK \
72 -DCONFIG_RUSAGE_THREAD \
73 -DCONFIG_SCHED_IDLE \
74 -DCONFIG_SETVBUF \
75 -DCONFIG_SFAA \
76 -DCONFIG_SOCKLEN_T \
77 -DCONFIG_STRCASESTR \
78 -DCONFIG_STRSEP \
79 -DCONFIG_TCP_NODELAY \
80 -DCONFIG_TLS_THREAD \
81 -DCONFIG_ZLIB \
82 -DFIO_HAVE_CGROUPS \
83 -DFIO_INC_DEBUG \
84 -DFIO_INTERNAL \
85 -DNO_GETMNTENT_R \
86 -DNO_INET_NETWORK \
87 -D_FILE_OFFSET_BITS=64 \
88 -D_FORTIFY_SOURCE=2 \
89 -D_GNU_SOURCE \
90 -D_LARGEFILE_SOURCE \
91 -D__ANDROID__ \
92 -O3 \
93 -Wall \
94 -Wdeclaration-after-statement \
95 -Wwrite-strings \
96 -ffast-math \
97 -fno-omit-frame-pointer \
98 -g \
99 -rdynamic \
100 -std=gnu99 \
Elliott Hughesb287c322014-09-19 20:54:57 -0700101 -Wno-pointer-arith \
102 -Wno-sign-compare \
Mohamad Ayyash3c77c132014-05-14 12:13:31 -0700103
Colin Cross90531c42015-02-06 16:21:09 -0800104LOCAL_CFLAGS_64 += \
Elliott Hughes6f4e8052014-06-24 16:55:57 -0700105 -DCONFIG_LINUX_SPLICE \
106
Elliott Hughesb287c322014-09-19 20:54:57 -0700107LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
108
Mohamad Ayyash3c77c132014-05-14 12:13:31 -0700109include $(BUILD_EXECUTABLE)