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
|
|
|
|
2006-11-01 19:26:25 -08:00
|
|
|
all: toybox
|
|
|
|
|
2008-05-04 14:20:15 -07:00
|
|
|
toybox toybox_unstripped: .config *.[ch] lib/*.[ch] toys/*.[ch] scripts/*.sh
|
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 \
|
2008-03-29 15:25:28 -07:00
|
|
|
uinstall uninstall_flat test tests help scripts/test
|
2006-11-01 19:26:25 -08:00
|
|
|
|
2008-01-19 15:08:39 -08:00
|
|
|
include kconfig/Makefile
|
2007-01-31 11:37:01 -08:00
|
|
|
|
2008-01-19 15:08:39 -08:00
|
|
|
$(KCONFIG_TOP): generated/Config.in
|
2012-02-03 21:16:28 -08: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
|
|
|
|
2008-01-19 15:08:39 -08:00
|
|
|
HOSTCC:=cc
|
2006-11-01 19:26:25 -08:00
|
|
|
|
2006-11-26 15:47:14 -08:00
|
|
|
# Development targets
|
|
|
|
baseline: toybox_unstripped
|
|
|
|
@cp toybox_unstripped toybox_old
|
|
|
|
|
|
|
|
bloatcheck: toybox_old toybox_unstripped
|
|
|
|
@scripts/bloat-o-meter toybox_old toybox_unstripped
|
|
|
|
|
2007-01-31 11:18:05 -08:00
|
|
|
instlist: toybox
|
2007-05-29 13:26:47 -07:00
|
|
|
$(HOSTCC) $(CCFLAGS) -I . scripts/install.c -o instlist
|
2007-01-31 11:18:05 -08:00
|
|
|
|
|
|
|
install_flat: instlist
|
2008-03-27 22:09:31 -07:00
|
|
|
scripts/install.sh --symlink --force
|
|
|
|
|
|
|
|
install:
|
|
|
|
scripts/install.sh --long --symlink --force
|
2007-01-31 11:18:05 -08:00
|
|
|
|
2008-03-27 22:40:57 -07:00
|
|
|
uninstall_flat: instlist
|
|
|
|
scripts/install.sh --uninstall
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
scripts/install.sh --long --uninstall
|
|
|
|
|
2006-11-01 19:26:25 -08:00
|
|
|
clean::
|
2008-02-23 13:02:11 -08:00
|
|
|
rm -rf toybox toybox_unstripped generated/config.h generated/Config.in \
|
|
|
|
generated/newtoys.h generated/globals.h instlist testdir
|
2006-11-01 19:26:25 -08:00
|
|
|
|
|
|
|
distclean: clean
|
2008-01-10 12:40:13 -08:00
|
|
|
rm -f toybox_old .config* generated/help.h
|
2006-11-26 15:47:14 -08:00
|
|
|
|
2007-06-17 22:09:00 -07:00
|
|
|
test: tests
|
|
|
|
|
|
|
|
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::
|
2008-01-19 15:08:39 -08:00
|
|
|
@echo ' toybox - Build toybox.'
|
2006-11-26 15:47:14 -08:00
|
|
|
@echo ' baseline - Create busybox_old for use by bloatcheck.'
|
|
|
|
@echo ' bloatcheck - Report size differences between old and current versions'
|
2008-01-19 15:08:39 -08:00
|
|
|
@echo ' test - Run test suite against compiled commands.'
|
|
|
|
@echo ' clean - Delete temporary files.'
|
2011-12-28 14:17:13 -08:00
|
|
|
@echo " distclean - Delete everything that isn't shipped."
|
|
|
|
@echo ' install_flat - Install toybox into $$PREFIX directory.'
|
|
|
|
@echo ' install - Install toybox into subdirectories of $$PREFIX.'
|
|
|
|
@echo ' uninstall_flat - Remove toybox from $$PREFIX directory.'
|
|
|
|
@echo ' uninstall - Remove toybox from subdirectories of $$PREFIX.'
|
2012-02-04 10:20:39 -08:00
|
|
|
@echo ''
|
|
|
|
@echo 'example: CFLAGS="--static" CROSS_COMPILE=armv5l- make defconfig toybox install'
|
|
|
|
@echo ''
|