1# Copyright 2006 The Android Open Source Project 2 3LOCAL_PATH := $(my-dir) 4include $(CLEAR_VARS) 5 6# From autoconf-generated Makefile 7strace_SOURCES = strace.c syscall.c util.c desc.c file.c \ 8 io.c ioctl.c mem.c net.c process.c bjm.c \ 9 resource.c signal.c sock.c system.c term.c time.c \ 10 proc.c stream.c 11 12#excluded_sources = ipc.c 13 14LOCAL_SRC_FILES:= $(strace_SOURCES) 15 16LOCAL_SHARED_LIBRARIES := 17 18# Hack for ARM devices. This version of strace does not support ARM, and the 19# patch that was used to add ARM support actually adds the ARM syscalls to 20# linux/sh/ (Sega Megadrive/Dreamcast/...) instead of linux/arm/ . The proper 21# way to fix this would be to upgrade to a version of strace that does support 22# ARM (e.g. 4.5.1.8), but that would mean having to reapply all Android-specific 23# changes. Sigh. 24ifeq ($(TARGET_ARCH),arm) 25 STRACE_ARCH_HEADERS := $(LOCAL_PATH)/strace/linux/sh 26else 27 STRACE_ARCH_HEADERS := $(LOCAL_PATH)/strace/linux/$(TARGET_ARCH) 28endif 29 30LOCAL_C_INCLUDES := \ 31 $(STRACE_ARCH_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