• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2006 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
17LOCAL_PATH := $(call my-dir)
18
19ifneq ($(strip $(TARGET_ARCH)),mips)
20
21include $(CLEAR_VARS)
22
23LOCAL_SRC_FILES := \
24    access.c \
25    affinity.c \
26    aio.c \
27    bjm.c \
28    block.c \
29    bpf.c \
30    btrfs.c \
31    cacheflush.c \
32    capability.c \
33    chdir.c \
34    chmod.c \
35    clone.c \
36    copy_file_range.c \
37    count.c \
38    desc.c \
39    dirent.c \
40    dirent64.c \
41    dm.c \
42    dyxlat.c \
43    epoll.c \
44    evdev.c \
45    eventfd.c \
46    execve.c \
47    fadvise.c \
48    fallocate.c \
49    fanotify.c \
50    fchownat.c \
51    fcntl.c \
52    fetch_seccomp_fprog.c \
53    fetch_struct_flock.c \
54    fetch_struct_mmsghdr.c \
55    fetch_struct_msghdr.c \
56    fetch_struct_stat.c \
57    fetch_struct_stat64.c \
58    fetch_struct_statfs.c \
59    file_handle.c \
60    file_ioctl.c \
61    flock.c \
62    fstatfs.c \
63    fstatfs64.c \
64    fs_x_ioctl.c \
65    futex.c \
66    getcpu.c \
67    getcwd.c \
68    getrandom.c \
69    get_robust_list.c \
70    hdio.c \
71    hostname.c \
72    inotify.c \
73    io.c \
74    ioctl.c \
75    ioperm.c \
76    iopl.c \
77    ioprio.c \
78    ipc.c \
79    ipc_msg.c \
80    ipc_msgctl.c \
81    ipc_sem.c \
82    ipc_shm.c \
83    ipc_shmctl.c \
84    kcmp.c \
85    kexec.c \
86    keyctl.c \
87    ldt.c \
88    link.c \
89    lookup_dcookie.c \
90    loop.c \
91    lseek.c \
92    mem.c \
93    membarrier.c \
94    memfd_create.c \
95    mknod.c \
96    mmsghdr.c \
97    mount.c \
98    mq.c \
99    msghdr.c \
100    mtd.c \
101    net.c \
102    netlink.c \
103    netlink_sock_diag.c \
104    nlattr.c \
105    nsfs.c \
106    numa.c \
107    oldstat.c \
108    open.c \
109    pathtrace.c \
110    perf.c \
111    personality.c \
112    pkeys.c \
113    poll.c \
114    prctl.c \
115    print_dev_t.c \
116    print_mq_attr.c \
117    print_msgbuf.c \
118    print_sigevent.c \
119    print_sg_req_info.c \
120    print_statfs.c \
121    print_struct_stat.c \
122    print_time.c \
123    print_timespec.c \
124    print_timeval.c \
125    print_timex.c \
126    printmode.c \
127    printrusage.c \
128    printsiginfo.c \
129    process.c \
130    process_vm.c \
131    ptp.c \
132    qualify.c \
133    quota.c \
134    readahead.c \
135    readlink.c \
136    reboot.c \
137    renameat.c \
138    resource.c \
139    rtc.c \
140    rt_sigframe.c \
141    rt_sigreturn.c \
142    sched.c \
143    scsi.c \
144    seccomp.c \
145    sendfile.c \
146    sg_io_v3.c \
147    sg_io_v4.c \
148    sigaltstack.c \
149    signal.c \
150    signalfd.c \
151    sigreturn.c \
152    sock.c \
153    sockaddr.c \
154    socketcall.c \
155    socketutils.c \
156    sram_alloc.c \
157    stat.c \
158    stat64.c \
159    statfs.c \
160    statfs64.c \
161    statx.c \
162    strace.c \
163    swapon.c \
164    sync_file_range.c \
165    sync_file_range2.c \
166    syscall.c \
167    sysctl.c \
168    sysinfo.c \
169    syslog.c \
170    sysmips.c \
171    term.c \
172    time.c \
173    times.c \
174    truncate.c \
175    ubi.c \
176    uid16.c \
177    uid.c \
178    umask.c \
179    umount.c \
180    uname.c \
181    upeek.c \
182    upoke.c \
183    userfaultfd.c \
184    ustat.c \
185    util.c \
186    utime.c \
187    utimes.c \
188    v4l2.c \
189    wait.c \
190    xattr.c \
191    xlat.c \
192    xmalloc.c \
193
194# We have "config.h", but since we're using one file for both LP32 and LP64,
195# we need to set the hard-coded size #defines here instead.
196LOCAL_CFLAGS := -DHAVE_CONFIG_H
197LOCAL_CFLAGS_32 += -DSIZEOF_LONG_LONG=8 -DSIZEOF_LONG=4 -DSIZEOF_RLIM_T=4 -DHAVE_STRUCT_STAT64=1
198LOCAL_CFLAGS_64 += -DSIZEOF_LONG_LONG=8 -DSIZEOF_LONG=8 -DSIZEOF_RLIM_T=8
199LOCAL_CFLAGS += -DSIZEOF_KERNEL_LONG_T=SIZEOF_LONG -DSIZEOF_OFF_T=SIZEOF_LONG
200
201LOCAL_CFLAGS_arm += -DARM=1
202LOCAL_CFLAGS_arm += -DHAVE_STRUCT___OLD_KERNEL_STAT=1
203
204LOCAL_CFLAGS_arm64 += -DAARCH64=1
205
206LOCAL_CFLAGS_mips += -DMIPS=1 -DLINUX_MIPSO32=1
207LOCAL_CFLAGS_mips += -DHAVE_ASM_SYSMIPS_H=1
208
209LOCAL_CFLAGS_mips64 += -DMIPS=1 -DLINUX_MIPSN64=1
210LOCAL_CFLAGS_mips64 += -DHAVE_ASM_SYSMIPS_H=1
211
212LOCAL_CFLAGS_x86 += -DI386=1
213LOCAL_CFLAGS_x86 += -DHAVE_STRUCT___OLD_KERNEL_STAT=1
214
215LOCAL_CFLAGS_x86_64 += -DX86_64=1
216
217LOCAL_CFLAGS += \
218    -Wall \
219    -Werror \
220    -Wno-missing-field-initializers \
221    -Wno-pointer-arith \
222    -Wno-unused-parameter \
223    -Wno-sign-compare \
224    -fno-strict-aliasing \
225
226LOCAL_C_INCLUDES_arm := $(LOCAL_PATH)/linux/arm $(LOCAL_PATH)/linux
227LOCAL_C_INCLUDES_arm64 := $(LOCAL_PATH)/linux/aarch64 $(LOCAL_PATH)/linux
228LOCAL_C_INCLUDES_mips := $(LOCAL_PATH)/linux/mips $(LOCAL_PATH)/linux
229LOCAL_C_INCLUDES_mips64 := $(LOCAL_PATH)/linux/mips $(LOCAL_PATH)/linux
230LOCAL_C_INCLUDES_x86 := $(LOCAL_PATH)/linux/i386 $(LOCAL_PATH)/linux
231LOCAL_C_INCLUDES_x86_64 := $(LOCAL_PATH)/linux/x86_64 $(LOCAL_PATH)/linux
232
233LOCAL_MODULE := strace
234
235LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
236
237LOCAL_MODULE_TAGS := debug
238
239include $(BUILD_EXECUTABLE)
240
241endif
242