OSDN Git Service

am a53c8ff7: Switch to toybox ionice, iorenice, and renice.
[android-x86/external-toybox.git] / Android.mk
index f81250f..15962d6 100644 (file)
@@ -20,7 +20,7 @@ LOCAL_PATH := $(call my-dir)
 # To update:
 #
 
-#  git remote add toybox https://github.com/gfto/toybox.git
+#  git remote add toybox https://github.com/landley/toybox.git
 #  git fetch toybox
 #  git merge toybox/master
 #  mm -j32
@@ -51,6 +51,7 @@ LOCAL_SRC_FILES := \
     lib/dirtree.c \
     lib/getmountlist.c \
     lib/help.c \
+    lib/interestingtimes.c \
     lib/lib.c \
     lib/llist.c \
     lib/net.c \
@@ -58,9 +59,12 @@ LOCAL_SRC_FILES := \
     lib/xwrap.c \
     main.c \
     toys/android/getenforce.c \
+    toys/android/getprop.c \
     toys/android/load_policy.c \
+    toys/android/restorecon.c \
     toys/android/runcon.c \
     toys/android/setenforce.c \
+    toys/android/setprop.c \
     toys/lsb/dmesg.c \
     toys/lsb/hostname.c \
     toys/lsb/killall.c \
@@ -79,7 +83,6 @@ LOCAL_SRC_FILES := \
     toys/other/bzcat.c \
     toys/other/chcon.c \
     toys/other/chroot.c \
-    toys/other/chvt.c \
     toys/other/clear.c \
     toys/other/dos2unix.c \
     toys/other/fallocate.c \
@@ -87,13 +90,14 @@ LOCAL_SRC_FILES := \
     toys/other/freeramdisk.c \
     toys/other/fsfreeze.c \
     toys/other/help.c \
+    toys/other/hwclock.c \
     toys/other/ifconfig.c \
     toys/other/inotifyd.c \
     toys/other/insmod.c \
+    toys/other/ionice.c \
     toys/other/losetup.c \
     toys/other/lsattr.c \
     toys/other/lsmod.c \
-    toys/other/lspci.c \
     toys/other/lsusb.c \
     toys/other/makedevs.c \
     toys/other/mkswap.c \
@@ -125,13 +129,12 @@ LOCAL_SRC_FILES := \
     toys/other/vconfig.c \
     toys/other/vmstat.c \
     toys/other/which.c \
+    toys/other/xxd.c \
     toys/other/yes.c \
     toys/pending/dd.c \
     toys/pending/expr.c \
-    toys/pending/hwclock.c \
     toys/pending/more.c \
     toys/pending/pgrep.c \
-    toys/pending/ps.c \
     toys/pending/netstat.c \
     toys/pending/route.c \
     toys/pending/tar.c \
@@ -194,6 +197,7 @@ LOCAL_SRC_FILES := \
     toys/posix/xargs.c \
 
 LOCAL_CFLAGS += \
+    -std=c99 \
     -Os \
     -Wno-char-subscripts \
     -Wno-sign-compare \
@@ -204,12 +208,21 @@ LOCAL_CFLAGS += \
     -ffunction-sections -fdata-sections \
     -fno-asynchronous-unwind-tables \
 
-LOCAL_SHARED_LIBRARIES := libselinux
+toybox_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
+LOCAL_CFLAGS += -DTOYBOX_VERSION='"$(toybox_version)"'
+
+LOCAL_CLANG := true
+
+LOCAL_SHARED_LIBRARIES := libcutils libselinux
+
+# This doesn't actually prevent us from dragging in libc++ at runtime
+# because libnetd_client.so is C++.
+LOCAL_CXX_STL := none
 
 LOCAL_MODULE := toybox
 
-# dupes: dd df du ls mount renice umount
-# useless?: chvt freeramdisk fsfreeze install makedevs mkfifo nbd-client
+# dupes: dd df du ls
+# useless?: freeramdisk fsfreeze install makedevs mkfifo nbd-client
 #           partprobe pivot_root pwdx rev rfkill switch_root tty vconfig
 # prefer BSD netcat instead?: nc netcat
 # prefer efs2progs instead?: blkid chattr lsattr
@@ -246,6 +259,7 @@ ALL_TOOLS := \
     find \
     free \
     getenforce \
+    getprop \
     groups \
     head \
     hostname \
@@ -254,14 +268,14 @@ ALL_TOOLS := \
     ifconfig \
     inotifyd \
     insmod \
+    ionice \
+    iorenice \
     kill \
-    killall \
     load_policy \
     ln \
     logname \
     losetup \
     lsmod \
-    lspci \
     lsusb \
     md5sum \
     mkdir \
@@ -270,6 +284,7 @@ ALL_TOOLS := \
     mktemp \
     modinfo \
     more \
+    mount \
     mountpoint \
     mv \
     netstat \
@@ -288,6 +303,8 @@ ALL_TOOLS := \
     pwd \
     readlink \
     realpath \
+    renice \
+    restorecon \
     rm \
     rmdir \
     rmmod \
@@ -296,6 +313,7 @@ ALL_TOOLS := \
     sed \
     seq \
     setenforce \
+    setprop \
     setsid \
     sha1sum \
     sleep \
@@ -318,6 +336,8 @@ ALL_TOOLS := \
     tr \
     true \
     truncate \
+    tty \
+    umount \
     uname \
     uniq \
     unix2dos \
@@ -327,6 +347,7 @@ ALL_TOOLS := \
     which \
     whoami \
     xargs \
+    xxd \
     yes \
 
 # Install the symlinks.