2006-11-01 19:26:25 -08:00
|
|
|
# Makefile for toybox.
|
|
|
|
# Copyright 2006 Rob Landley <rob@landley.net>
|
2006-09-28 14:18:51 -07:00
|
|
|
|
2015-10-04 06:44:17 -07:00
|
|
|
# If people set these on the make command line, use 'em
|
|
|
|
# Note that CC defaults to "cc" so the one in configure doesn't get
|
|
|
|
# used when scripts/make.sh and care called through "make".
|
2015-10-05 18:47:49 -07:00
|
|
|
|
|
|
|
HOSTCC?=cc
|
|
|
|
|
2015-10-04 06:44:17 -07:00
|
|
|
export CROSS_COMPILE CFLAGS OPTIMIZE LDOPTIMIZE CC HOSTCC V
|
|
|
|
|
2006-11-01 19:26:25 -08:00
|
|
|
all: toybox
|
|
|
|
|
2013-08-29 23:53:31 -07:00
|
|
|
KCONFIG_CONFIG ?= .config
|
2014-11-28 14:49:46 -08:00
|
|
|
|
|
|
|
toybox_stuff: $(KCONFIG_CONFIG) *.[ch] lib/*.[ch] toys/*.h toys/*/*.c scripts/*.sh
|
|
|
|
|
2016-03-23 01:25:37 -07:00
|
|
|
toybox generated/unstripped/toybox: toybox_stuff
|
2008-01-19 15:08:39 -08:00
|
|
|
scripts/make.sh
|
2006-11-01 19:26:25 -08:00
|
|
|
|
2008-03-27 22:40:57 -07:00
|
|
|
.PHONY: clean distclean baseline bloatcheck install install_flat \
|
2016-03-23 01:25:37 -07:00
|
|
|
uinstall uninstall_flat tests help toybox_stuff change \
|
2016-02-14 12:04:21 -08:00
|
|
|
list list_working list_pending
|
2006-11-01 19:26:25 -08:00
|
|
|
|
2008-01-19 15:08:39 -08:00
|
|
|
include kconfig/Makefile
|
2016-02-07 16:15:53 -08:00
|
|
|
-include .singlemake
|
2007-01-31 11:37:01 -08:00
|
|
|
|
2014-11-28 14:49:46 -08:00
|
|
|
$(KCONFIG_CONFIG): $(KCONFIG_TOP)
|
2008-01-19 15:08:39 -08:00
|
|
|
$(KCONFIG_TOP): generated/Config.in
|
2012-08-25 12:25:22 -07:00
|
|
|
generated/Config.in: toys/*/*.c scripts/genconfig.sh
|
2008-01-19 15:08:39 -08:00
|
|
|
scripts/genconfig.sh
|
2006-11-02 16:50:02 -08:00
|
|
|
|
2006-11-26 15:47:14 -08:00
|
|
|
# Development targets
|
2016-03-23 01:25:37 -07:00
|
|
|
baseline: generated/unstripped/toybox
|
|
|
|
@cp generated/unstripped/toybox generated/unstripped/toybox_old
|
2006-11-26 15:47:14 -08:00
|
|
|
|
2017-12-19 14:16:31 -08:00
|
|
|
bloatcheck: generated/unstripped/toybox_old generated/unstripped/toybox
|
2016-03-23 01:25:37 -07:00
|
|
|
@scripts/bloatcheck generated/unstripped/toybox_old generated/unstripped/toybox
|
2006-11-26 15:47:14 -08:00
|
|
|
|
2016-02-03 20:33:04 -08:00
|
|
|
install_flat:
|
2008-03-27 22:09:31 -07:00
|
|
|
scripts/install.sh --symlink --force
|
|
|
|
|
2016-10-02 20:41:55 -07:00
|
|
|
install_airlock:
|
|
|
|
scripts/install.sh --symlink --force --airlock
|
|
|
|
|
2008-03-27 22:09:31 -07:00
|
|
|
install:
|
|
|
|
scripts/install.sh --long --symlink --force
|
2007-01-31 11:18:05 -08:00
|
|
|
|
2016-02-10 21:27:55 -08:00
|
|
|
uninstall_flat:
|
2008-03-27 22:40:57 -07:00
|
|
|
scripts/install.sh --uninstall
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
scripts/install.sh --long --uninstall
|
|
|
|
|
2015-02-07 15:19:38 -08:00
|
|
|
change:
|
2015-02-13 23:08:15 -08:00
|
|
|
scripts/change.sh
|
2014-11-28 14:49:46 -08:00
|
|
|
|
2006-11-01 19:26:25 -08:00
|
|
|
clean::
|
2016-03-23 01:25:37 -07:00
|
|
|
rm -rf toybox generated change .singleconfig*
|
2006-11-01 19:26:25 -08:00
|
|
|
|
2016-09-04 16:07:12 -07:00
|
|
|
# If singlemake was in generated/ "make clean; make test_ls" wouldn't work.
|
2006-11-01 19:26:25 -08:00
|
|
|
distclean: clean
|
2016-02-07 16:15:53 -08:00
|
|
|
rm -f toybox_old .config* .singlemake
|
2006-11-26 15:47:14 -08:00
|
|
|
|
2007-06-17 22:09:00 -07:00
|
|
|
tests:
|
2008-03-27 22:44:44 -07:00
|
|
|
scripts/test.sh
|
2007-06-17 22:09:00 -07:00
|
|
|
|
2006-11-26 15:47:14 -08:00
|
|
|
help::
|
2018-01-10 08:54:11 -08:00
|
|
|
@cat scripts/help.txt
|