-
Notifications
You must be signed in to change notification settings - Fork 205
/
Android.mk
70 lines (60 loc) · 2 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
testdisk_TOP := $(abspath $(LOCAL_PATH))/..
NDK_PROJECT_PATH = $(testdisk_TOP)
CONFIGURE_CC := $(TARGET_CC)
CONFIGURE_INCLUDES := -I$(TOPMOST)/include
CONFIGURE_LDFLAGS := -lc -ldl
CONFIGURE_CFLAGS := \
-nostdlib -Bdynamic \
-Wl,-dynamic-linker,/system/bin/linker \
-Wl,--gc-sections \
-Wl,-z,nocopyreloc \
$(call host-path,\
$(TARGET_CRTBEGIN_DYNAMIC_O) \
$(PRIVATE_OBJECTS)) \
$(call link-whole-archives,$(PRIVATE_WHOLE_STATIC_LIBRARIES))\
$(call host-path,\
$(PRIVATE_STATIC_LIBRARIES) \
$(TARGET_LIBGCC) \
$(PRIVATE_SHARED_LIBRARIES)) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_LDLIBS) \
$(call host-path,\
$(TARGET_CRTEND_O)) \
$(CONFIGURE_INCLUDES)
CONFIGURE_LDFLAGS += -L$(SYSROOT)/usr/lib -L$(TARGET_OUT)
CONFIGURE_INCLUDES += -I$(SYSROOT)/usr/include
CONFIGURE_CPP := $(TOOLCHAIN_PREFIX)cpp
LIB := $(SYSROOT)/usr/lib
CONFIGURE_CPPFLAGS := \
$(CONFIGURE_INCLUDES)
CONFIGURE := configure
TD_BUILT_MAKEFILES := $(testdisk_TOP)/src/Android.mk
.PHONY: testdisk-configure testdisk-configure-real
testdisk-configure-real:
echo $(TD_BUILT_MAKEFILES)
cd $(testdisk_TOP) ; \
CC="$(CONFIGURE_CC)" \
CFLAGS="$(CONFIGURE_CFLAGS)" \
LD=$(TARGET_LD) \
LDFLAGS="$(CONFIGURE_LDFLAGS)" \
CPP=$(CONFIGURE_CPP) \
CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \
PKG_CONFIG_TOP_BUILD_DIR=/ \
$(abspath $(testdisk_TOP))/configure --host=arm-linux-androideabi \
--prefix=/system \
--libexec /system/bin \
--datarootdir /system/usr/share \
--without-ncurses --without-ext2fs --without-jpeg \
--without-ntfs --without-ntfs3g --without-ewf \
--enable-missing-uuid-ok
rm -f $(TD_BUILT_MAKEFILES)
for file in $(TD_BUILT_MAKEFILES); do \
echo "make -C $$(dirname $$file) $$(basename $$file)" ; \
make -C $$(dirname $$file) $$(basename $$file) ; \
done
testdisk-configure: testdisk-configure-real
CONFIGURE_TARGETS += testdisk-configure
-include $(TD_BUILT_MAKEFILES)