-
Notifications
You must be signed in to change notification settings - Fork 80
/
Android.mk
59 lines (52 loc) · 1.79 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
LOCAL_PATH:= $(call my-dir)
# ========================================================
# bash
# ========================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
shell.c eval.c y.tab.c general.c make_cmd.c print_cmd.c \
dispose_cmd.c execute_cmd.c variables.c copy_cmd.c error.c \
expr.c flags.c jobs.c subst.c hashcmd.c hashlib.c mailcheck.c \
trap.c input.c unwind_prot.c pathexp.c sig.c test.c version.c \
alias.c array.c arrayfunc.c assoc.c braces.c bracecomp.c \
bashhist.c bashline.c list.c stringlib.c locale.c findcmd.c \
redir.c pcomplete.c pcomplib.c syntax.c xmalloc.c
LOCAL_C_INCLUDES += \
$(LOCAL_PATH) \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/lib
LOCAL_CFLAGS += \
-DHAVE_CONFIG_H \
-DPROGRAM=\"bash\" \
-DPACKAGE=\"bash\" \
-DCONF_HOSTTYPE=\"arm\" \
-DCONF_OSTYPE=\"android-eabi\" \
-DCONF_MACHTYPE=\"arm-android-eabi\" \
-DCONF_VENDOR=\"unknown\" \
-DLOCALEDIR=\"/data/locale\" \
-DSHELL
LOCAL_SHARED_LIBRARIES += \
libncurses
LOCAL_STATIC_LIBRARIES += \
libbuiltins \
libglob \
libsh \
libtilde \
libhistory \
libreadline \
libclearsilverregex
LOCAL_MODULE := bash
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
include $(BUILD_EXECUTABLE)
# ========================================================
# bash configs
# ========================================================
etc_files := $(shell ls -1 $(LOCAL_PATH)/etc/)
copy_to := $(addprefix $(TARGET_OUT)/etc/$(LOCAL_MODULE)/,$(etc_files))
copy_from := $(addprefix $(LOCAL_PATH)/etc/,$(etc_files))
$(copy_to) : PRIVATE_MODULE := system_etcdir
$(copy_to) : $(TARGET_OUT)/etc/$(LOCAL_MODULE)/% : $(LOCAL_PATH)/etc/% | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(copy_to)
# ========================================================
include $(call all-makefiles-under,$(LOCAL_PATH))