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 \
69 toys/other/fallocate.c \
71 toys/other/freeramdisk.c \
72 toys/other/fsfreeze.c \
74 toys/other/ifconfig.c \
75 toys/other/inotifyd.c \
77 toys/other/losetup.c \
82 toys/other/makedevs.c \
84 toys/other/modinfo.c \
85 toys/other/mountpoint.c \
86 toys/other/nbd_client.c \
88 toys/other/partprobe.c \
89 toys/other/pivot_root.c \
91 toys/other/printenv.c \
93 toys/other/readlink.c \
94 toys/other/realpath.c \
100 toys/other/swapoff.c \
101 toys/other/swapon.c \
102 toys/other/switch_root.c \
103 toys/other/sysctl.c \
105 toys/other/taskset.c \
106 toys/other/timeout.c \
107 toys/other/truncate.c \
108 toys/other/unshare.c \
109 toys/other/usleep.c \
110 toys/other/vconfig.c \
111 toys/other/vmstat.c \
114 toys/pending/chcon.c \
116 toys/pending/getenforce.c \
117 toys/pending/hwclock.c \
118 toys/pending/more.c \
120 toys/pending/netstat.c \
121 toys/pending/route.c \
122 toys/pending/setenforce.c \
125 toys/pending/traceroute.c \
126 toys/posix/basename.c \
139 toys/posix/dirname.c \
143 toys/posix/expand.c \
153 toys/posix/mkfifo.c \
161 toys/posix/renice.c \
168 toys/posix/strings.c \
182 -Wno-char-subscripts \
185 -Wno-unused-parameter \
187 -ffunction-sections -fdata-sections \
188 -fno-asynchronous-unwind-tables \
190 LOCAL_SHARED_LIBRARIES := libselinux
192 LOCAL_MODULE := toybox
194 # dupes: df du ls mount nc netcat renice touch umount
195 # useless?: chvt freeramdisk fsfreeze install makedevs mkfifo mktemp nbd-client
196 # partprobe pivot_root pwdx rev rfkill switch_root tty unshare vconfig
197 # prefer efs2progs instead?: blkid chattr lsattr
304 # Install the symlinks.
305 LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf toybox $(TARGET_OUT)/bin/$(t);)
307 include $(BUILD_EXECUTABLE)