OSDN Git Service

Stop building 'count' and 'oneit'.
[android-x86/external-toybox.git] / Android.mk
1 #
2 # Copyright (C) 2014 The Android Open Source Project
3 #
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
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16
17 LOCAL_PATH := $(call my-dir)
18
19 #
20 # To update:
21 #
22
23 #  git remote add toybox https://github.com/gfto/toybox.git
24 #  git fetch toybox
25 #  git merge toybox/master
26 #  mm -j32
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.
30 #
31 #  # Now commit any necessary Android.mk changes like normal:
32 #  repo start post-sync .
33 #  git commit -a
34
35
36 include $(CLEAR_VARS)
37
38 LOCAL_SRC_FILES := \
39     lib/args.c \
40     lib/dirtree.c \
41     lib/getmountlist.c \
42     lib/help.c \
43     lib/lib.c \
44     lib/llist.c \
45     lib/net.c \
46     lib/portability.c \
47     lib/xwrap.c \
48     main.c \
49     toys/lsb/dmesg.c \
50     toys/lsb/hostname.c \
51     toys/lsb/killall.c \
52     toys/lsb/md5sum.c \
53     toys/lsb/mknod.c \
54     toys/lsb/mktemp.c \
55     toys/lsb/mount.c \
56     toys/lsb/pidof.c \
57     toys/lsb/seq.c \
58     toys/lsb/sync.c \
59     toys/lsb/umount.c \
60     toys/other/acpi.c \
61     toys/other/blkid.c \
62     toys/other/blockdev.c \
63     toys/other/bzcat.c \
64     toys/other/catv.c \
65     toys/other/chroot.c \
66     toys/other/chvt.c \
67     toys/other/clear.c \
68     toys/other/dos2unix.c \
69     toys/other/factor.c \
70     toys/other/fallocate.c \
71     toys/other/free.c \
72     toys/other/freeramdisk.c \
73     toys/other/fsfreeze.c \
74     toys/other/help.c \
75     toys/other/ifconfig.c \
76     toys/other/inotifyd.c \
77     toys/other/insmod.c \
78     toys/other/losetup.c \
79     toys/other/lsattr.c \
80     toys/other/lsmod.c \
81     toys/other/lspci.c \
82     toys/other/lsusb.c \
83     toys/other/makedevs.c \
84     toys/other/mkswap.c \
85     toys/other/modinfo.c \
86     toys/other/mountpoint.c \
87     toys/other/nbd_client.c \
88     toys/other/netcat.c \
89     toys/other/partprobe.c \
90     toys/other/pivot_root.c \
91     toys/other/pmap.c \
92     toys/other/printenv.c \
93     toys/other/pwdx.c \
94     toys/other/readahead.c \
95     toys/other/readlink.c \
96     toys/other/realpath.c \
97     toys/other/rev.c \
98     toys/other/rfkill.c \
99     toys/other/rmmod.c \
100     toys/other/setsid.c \
101     toys/other/stat.c \
102     toys/other/swapoff.c \
103     toys/other/swapon.c \
104     toys/other/switch_root.c \
105     toys/other/sysctl.c \
106     toys/other/tac.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 \
114     toys/other/which.c \
115     toys/other/yes.c \
116     toys/pending/chcon.c \
117     toys/pending/dd.c \
118     toys/pending/more.c \
119     toys/pending/ps.c \
120     toys/pending/netstat.c \
121     toys/pending/route.c \
122     toys/pending/top.c \
123     toys/pending/traceroute.c \
124     toys/posix/basename.c \
125     toys/posix/cal.c \
126     toys/posix/cat.c \
127     toys/posix/chgrp.c \
128     toys/posix/chmod.c \
129     toys/posix/cksum.c \
130     toys/posix/cmp.c \
131     toys/posix/comm.c \
132     toys/posix/cp.c \
133     toys/posix/cut.c \
134     toys/posix/date.c \
135     toys/posix/df.c \
136     toys/posix/dirname.c \
137     toys/posix/du.c \
138     toys/posix/echo.c \
139     toys/posix/env.c \
140     toys/posix/expand.c \
141     toys/posix/false.c \
142     toys/posix/find.c \
143     toys/posix/grep.c \
144     toys/posix/head.c \
145     toys/posix/id.c \
146     toys/posix/kill.c \
147     toys/posix/ln.c \
148     toys/posix/ls.c \
149     toys/posix/mkdir.c \
150     toys/posix/mkfifo.c \
151     toys/posix/nice.c \
152     toys/posix/nl.c \
153     toys/posix/nohup.c \
154     toys/posix/od.c \
155     toys/posix/paste.c \
156     toys/posix/patch.c \
157     toys/posix/pwd.c \
158     toys/posix/renice.c \
159     toys/posix/rm.c \
160     toys/posix/rmdir.c \
161     toys/posix/sleep.c \
162     toys/posix/sort.c \
163     toys/posix/split.c \
164     toys/posix/strings.c \
165     toys/posix/tail.c \
166     toys/posix/tee.c \
167     toys/posix/time.c \
168     toys/posix/touch.c \
169     toys/posix/true.c \
170     toys/posix/tty.c \
171     toys/posix/uname.c \
172     toys/posix/uniq.c \
173     toys/posix/uudecode.c \
174     toys/posix/uuencode.c \
175     toys/posix/wc.c \
176     toys/posix/xargs.c \
177
178 LOCAL_CFLAGS += \
179     -Os \
180     -Wno-char-subscripts \
181     -Wno-sign-compare \
182     -Wno-uninitialized \
183     -Wno-unused-parameter \
184     -funsigned-char -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables \
185
186 LOCAL_SHARED_LIBRARIES := libselinux
187
188 LOCAL_MODULE := toybox
189
190 # dupes: cat chown cmp date df du grep id ifconfig ls
191 #        mount nc netcat notify(inotifyd) renice
192 #        touch umount
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
196 # unavoidable alias for blkid: fstype
197
198 ALL_TOOLS := \
199     acpi \
200     basename \
201     blockdev \
202     bzcat \
203     cal \
204     catv \
205     chcon \
206     chgrp \
207     chmod \
208     chroot \
209     cksum \
210     clear \
211     comm \
212     cp \
213     cut \
214     dirname \
215     dmesg \
216     dos2unix \
217     echo \
218     egrep \
219     env \
220     expand \
221     factor \
222     fallocate \
223     false \
224     fgrep \
225     find \
226     free \
227     groups \
228     head \
229     hostname \
230     insmod \
231     kill \
232     killall \
233     ln \
234     logname \
235     losetup \
236     lsmod \
237     lspci \
238     lsusb \
239     md5sum \
240     mkdir \
241     mknod \
242     mkswap \
243     modinfo \
244     more \
245     mountpoint \
246     mv \
247     nice \
248     nl \
249     nohup \
250     od \
251     paste \
252     patch \
253     pidof \
254     pmap \
255     printenv \
256     pwd \
257     readahead \
258     readlink \
259     realpath \
260     rm \
261     rmdir \
262     rmmod \
263     seq \
264     setsid \
265     sha1sum \
266     sleep \
267     sort \
268     split \
269     stat \
270     strings \
271     swapoff \
272     swapon \
273     sync \
274     sysctl \
275     tac \
276     tail \
277     taskset \
278     tee \
279     time \
280     timeout \
281     true \
282     truncate \
283     uname \
284     uniq \
285     unix2dos \
286     usleep \
287     uudecode \
288     uuencode \
289     vmstat \
290     wc \
291     which \
292     whoami \
293     xargs \
294     yes \
295
296 # Install the symlinks.
297 LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf toybox $(TARGET_OUT)/bin/$(t);)
298
299 include $(BUILD_EXECUTABLE)