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