Android.mk revision ed9483ac353bf127889707abf2656acc04483952
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_ARCH_HEADERS := $(LOCAL_PATH)/strace/linux/sh
28else
29	STRACE_ARCH_HEADERS := $(LOCAL_PATH)/strace/linux/$(TARGET_ARCH)
30endif
31
32LOCAL_C_INCLUDES := \
33	$(STRACE_ARCH_HEADERS) \
34	$(KERNEL_HEADERS) \
35	$(LOCAL_PATH)/linux \
36	$(LOCAL_PATH)/android/arch/$(TARGET_ARCH)
37
38LOCAL_CFLAGS := -DHAVE_CONFIG_H -Dd_fileno=d_ino -D_LFS64_LARGEFILE=1
39
40ifeq ($(TARGET_ARCH),x86)
41LOCAL_CFLAGS += -Ulinux
42endif
43
44LOCAL_MODULE := strace
45
46LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
47
48LOCAL_MODULE_TAGS := debug
49
50include $(BUILD_EXECUTABLE)
51
52endif  # TARGET_SIMULATOR != true
53