• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2006 The Android Open Source Project
2
3ifneq ($(TARGET_SIMULATOR),true)
4
5LOCAL_PATH := $(my-dir)
6include $(CLEAR_VARS)
7
8# From autoconf-generated Makefile
9strace_SOURCES = strace.c syscall.c util.c desc.c file.c \
10                 io.c ioctl.c mem.c net.c process.c bjm.c \
11                 resource.c signal.c sock.c system.c term.c time.c \
12                 proc.c stream.c
13
14#excluded_sources = ipc.c
15
16LOCAL_SRC_FILES:= $(strace_SOURCES)
17
18LOCAL_SHARED_LIBRARIES :=
19
20# Hack for ARM devices. This version of strace does not support ARM, and the
21# patch that was used to add ARM support actually adds the ARM syscalls to
22# linux/sh/ (Sega Megadrive/Dreamcast/...) instead of linux/arm/ . The proper
23# way to fix this would be to upgrade to a version of strace that does support
24# ARM (e.g. 4.5.1.8), but that would mean having to reapply all Android-specific
25# changes. Sigh.
26ifeq ($(TARGET_ARCH),arm)
27	STRACE_ARM_HEADERS := $(LOCAL_PATH)/strace/linux/sh
28endif
29
30LOCAL_C_INCLUDES := \
31	$(STRACE_ARM_HEADERS) \
32	$(KERNEL_HEADERS) \
33	$(LOCAL_PATH)/linux \
34	$(LOCAL_PATH)/android/arch/$(TARGET_ARCH)
35
36LOCAL_CFLAGS := -DHAVE_CONFIG_H -Dd_fileno=d_ino -D_LFS64_LARGEFILE=1
37
38ifeq ($(TARGET_ARCH),x86)
39LOCAL_CFLAGS += -Ulinux
40endif
41
42LOCAL_MODULE := strace
43
44LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
45
46LOCAL_MODULE_TAGS := debug
47
48include $(BUILD_EXECUTABLE)
49
50endif  # TARGET_SIMULATOR != true
51