2 # Copyright (C) 2014 The Android Open Source Project
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 LOCAL_PATH := $(call my-dir)
23 # git remote add toybox https://github.com/gfto/toybox.git
25 # git merge toybox/master
27 # # (Make any necessary Android.mk changes and test the new toybox.)
28 # git push aosp HEAD:master # Push directly, avoiding gerrit.
29 # git push aosp HEAD:refs/for/master # Push to gerrit.
31 # # Now commit any necessary Android.mk changes like normal:
32 # repo start post-sync .
63 toys/other/blockdev.c \
68 toys/other/dos2unix.c \
70 toys/other/fallocate.c \
72 toys/other/freeramdisk.c \
73 toys/other/fsfreeze.c \
75 toys/other/ifconfig.c \
76 toys/other/inotifyd.c \
78 toys/other/losetup.c \
83 toys/other/makedevs.c \
85 toys/other/modinfo.c \
86 toys/other/mountpoint.c \
87 toys/other/nbd_client.c \
89 toys/other/partprobe.c \
90 toys/other/pivot_root.c \
92 toys/other/printenv.c \
94 toys/other/readahead.c \
95 toys/other/readlink.c \
96 toys/other/realpath.c \
100 toys/other/setsid.c \
102 toys/other/swapoff.c \
103 toys/other/swapon.c \
104 toys/other/switch_root.c \
105 toys/other/sysctl.c \
107 toys/other/taskset.c \
108 toys/other/timeout.c \
109 toys/other/truncate.c \
110 toys/other/unshare.c \
111 toys/other/usleep.c \
112 toys/other/vconfig.c \
113 toys/other/vmstat.c \
116 toys/pending/chcon.c \
118 toys/pending/getenforce.c \
119 toys/pending/more.c \
121 toys/pending/netstat.c \
122 toys/pending/route.c \
123 toys/pending/setenforce.c \
125 toys/pending/traceroute.c \
126 toys/posix/basename.c \
138 toys/posix/dirname.c \
142 toys/posix/expand.c \
152 toys/posix/mkfifo.c \
160 toys/posix/renice.c \
166 toys/posix/strings.c \
180 -Wno-char-subscripts \
183 -Wno-unused-parameter \
184 -funsigned-char -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables \
186 LOCAL_SHARED_LIBRARIES := libselinux
188 LOCAL_MODULE := toybox
190 # dupes: cat chown cmp date df du grep id ifconfig ls
191 # mount nc netcat notify(inotifyd) renice
193 # useless?: chvt freeramdisk fsfreeze install makedevs mkfifo mktemp nbd-client
194 # partprobe pivot_root pwdx rev rfkill switch_root tty unshare vconfig
195 # prefer efs2progs instead?: blkid chattr lsattr
293 # Install the symlinks.
294 LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf toybox $(TARGET_OUT)/bin/$(t);)
296 include $(BUILD_EXECUTABLE)