Eric Andersen | c499601 | 1999-10-20 22:08:37 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
Erik Andersen | 9ffdaa6 | 2000-02-11 21:55:04 +0000 | [diff] [blame] | 4 | # |
Eric Andersen | c499601 | 1999-10-20 22:08:37 +0000 | [diff] [blame] | 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 2 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | # General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with this program; if not, write to the Free Software |
| 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | # |
| 19 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 20 | #-------------------------------------------------------------- |
| 21 | # You shouldn't need to mess with anything beyond this point... |
| 22 | #-------------------------------------------------------------- |
| 23 | noconfig_targets := menuconfig config oldconfig randconfig \ |
| 24 | defconfig allyesconfig allnoconfig clean distclean \ |
Eric Andersen | bcf2724 | 2005-02-13 22:15:59 +0000 | [diff] [blame] | 25 | release tags |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 26 | |
| 27 | ifndef TOPDIR |
| 28 | TOPDIR=$(CURDIR)/ |
| 29 | endif |
| 30 | ifndef top_srcdir |
| 31 | top_srcdir=$(CURDIR) |
| 32 | endif |
| 33 | ifndef top_builddir |
| 34 | top_builddir=$(CURDIR) |
| 35 | endif |
| 36 | |
| 37 | srctree=$(top_srcdir) |
| 38 | vpath %/Config.in $(srctree) |
| 39 | |
| 40 | include $(top_builddir)/Rules.mak |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 41 | |
Glenn L McGrath | 3238ea1 | 2003-02-15 10:53:40 +0000 | [diff] [blame] | 42 | DIRS:=applets archival archival/libunarchive coreutils console-tools \ |
| 43 | debianutils editors findutils init miscutils modutils networking \ |
Glenn L McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 44 | networking/libiproute networking/udhcp procps loginutils shell \ |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 45 | sysklogd util-linux e2fsprogs libpwdgrp coreutils/libcoreutils libbb |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 46 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 47 | SRC_DIRS:=$(patsubst %,$(top_srcdir)/%,$(DIRS)) |
| 48 | |
Eric Andersen | 9e48045 | 2003-07-03 10:07:04 +0000 | [diff] [blame] | 49 | ifeq ($(strip $(CONFIG_SELINUX)),y) |
Rob Landley | 60158cb | 2005-05-03 06:25:50 +0000 | [diff] [blame] | 50 | LIBRARIES += -lselinux |
Eric Andersen | 9e48045 | 2003-07-03 10:07:04 +0000 | [diff] [blame] | 51 | endif |
| 52 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 53 | CONFIG_CONFIG_IN = $(top_srcdir)/sysdeps/$(TARGET_OS)/Config.in |
| 54 | CONFIG_DEFCONFIG = $(top_srcdir)/sysdeps/$(TARGET_OS)/defconfig |
| 55 | |
| 56 | ALL_DIRS:= $(DIRS) scripts/config |
| 57 | ALL_MAKEFILES:=$(patsubst %,%/Makefile,$(ALL_DIRS)) |
| 58 | |
| 59 | ifeq ($(KBUILD_SRC),) |
| 60 | |
| 61 | ifdef O |
| 62 | ifeq ("$(origin O)", "command line") |
| 63 | KBUILD_OUTPUT := $(O) |
| 64 | endif |
| 65 | endif |
| 66 | |
| 67 | # That's our default target when none is given on the command line |
| 68 | .PHONY: _all |
| 69 | _all: |
| 70 | |
| 71 | ifneq ($(KBUILD_OUTPUT),) |
| 72 | # Invoke a second make in the output directory, passing relevant variables |
| 73 | # check that the output directory actually exists |
| 74 | saved-output := $(KBUILD_OUTPUT) |
| 75 | KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) |
| 76 | $(if $(wildcard $(KBUILD_OUTPUT)),, \ |
| 77 | $(error output directory "$(saved-output)" does not exist)) |
| 78 | |
| 79 | .PHONY: $(MAKECMDGOALS) |
| 80 | |
| 81 | $(filter-out _all,$(MAKECMDGOALS)) _all: $(KBUILD_OUTPUT)/Rules.mak $(KBUILD_OUTPUT)/Makefile |
| 82 | $(MAKE) -C $(KBUILD_OUTPUT) \ |
| 83 | top_srcdir=$(CURDIR) \ |
| 84 | top_builddir=$(KBUILD_OUTPUT) \ |
| 85 | TOPDIR=$(KBUILD_OUTPUT) \ |
| 86 | KBUILD_SRC=$(CURDIR) \ |
| 87 | -f $(CURDIR)/Makefile $@ |
| 88 | |
| 89 | $(KBUILD_OUTPUT)/Rules.mak: |
| 90 | @echo > $@ |
| 91 | @echo top_srcdir=$(CURDIR) >> $@ |
| 92 | @echo top_builddir=$(KBUILD_OUTPUT) >> $@ |
| 93 | @echo include $(top_srcdir)/Rules.mak >> $@ |
| 94 | |
| 95 | $(KBUILD_OUTPUT)/Makefile: |
| 96 | @echo > $@ |
| 97 | @echo top_srcdir=$(CURDIR) >> $@ |
| 98 | @echo top_builddir=$(KBUILD_OUTPUT) >> $@ |
| 99 | @echo KBUILD_SRC='$$(top_srcdir)' >> $@ |
| 100 | @echo include '$$(KBUILD_SRC)'/Makefile >> $@ |
| 101 | |
| 102 | # Leave processing to above invocation of make |
| 103 | skip-makefile := 1 |
| 104 | endif # ifneq ($(KBUILD_OUTPUT),) |
| 105 | endif # ifeq ($(KBUILD_SRC),) |
| 106 | |
| 107 | ifeq ($(skip-makefile),) |
| 108 | |
| 109 | _all: all |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 110 | |
Eric Andersen | 068b6b0 | 2002-12-13 22:53:28 +0000 | [diff] [blame] | 111 | ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
Eric Andersen | 0081466 | 2001-04-26 23:29:10 +0000 | [diff] [blame] | 112 | |
Eric Andersen | d4fcb80 | 2003-07-15 00:28:26 +0000 | [diff] [blame] | 113 | all: busybox busybox.links doc |
Erik Andersen | 0a704e8 | 2000-05-03 03:19:06 +0000 | [diff] [blame] | 114 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 115 | all_tree: $(ALL_MAKEFILES) |
Eric Andersen | 3cd2760 | 2001-10-24 07:58:02 +0000 | [diff] [blame] | 116 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 117 | $(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile |
| 118 | d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@ |
| 119 | |
| 120 | # In this section, we need .config |
| 121 | -include $(top_builddir)/.config.cmd |
| 122 | include $(patsubst %,%/Makefile.in, $(SRC_DIRS)) |
| 123 | -include $(top_builddir)/.depend |
| 124 | |
| 125 | busybox: $(ALL_MAKEFILES) .depend include/config.h $(libraries-y) |
Glenn L McGrath | d72e34c | 2003-09-20 00:59:35 +0000 | [diff] [blame] | 126 | $(CC) $(LDFLAGS) -o $@ -Wl,--start-group $(libraries-y) $(LIBRARIES) -Wl,--end-group |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 127 | $(STRIPCMD) $@ |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 128 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 129 | busybox.links: $(top_srcdir)/applets/busybox.mkll include/config.h $(top_srcdir)/include/applets.h |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 130 | - $(SHELL) $^ >$@ |
| 131 | |
Eric Andersen | 6302486 | 2004-10-13 17:45:57 +0000 | [diff] [blame] | 132 | install: $(top_srcdir)/applets/install.sh busybox busybox.links |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 133 | $(SHELL) $< $(PREFIX) |
Eric Andersen | 1387910 | 2004-08-26 23:13:00 +0000 | [diff] [blame] | 134 | ifeq ($(strip $(CONFIG_FEATURE_SUID)),y) |
| 135 | @echo |
| 136 | @echo |
| 137 | @echo -------------------------------------------------- |
| 138 | @echo You will probably need to make your busybox binary |
| 139 | @echo setuid root to ensure all configured applets will |
| 140 | @echo work properly. |
| 141 | @echo -------------------------------------------------- |
| 142 | @echo |
| 143 | endif |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 144 | |
Glenn L McGrath | 87470de | 2003-08-29 12:20:31 +0000 | [diff] [blame] | 145 | uninstall: busybox.links |
| 146 | rm -f $(PREFIX)/bin/busybox |
| 147 | for i in `cat busybox.links` ; do rm -f $(PREFIX)$$i; done |
Eric Andersen | 1f30a41 | 2002-04-13 13:39:48 +0000 | [diff] [blame] | 148 | |
Peter Kjellerstedt | 88da3ef | 2004-11-02 09:05:22 +0000 | [diff] [blame] | 149 | install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 150 | $(SHELL) $< $(PREFIX) --hardlinks |
| 151 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 152 | check: busybox |
| 153 | bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \ |
| 154 | $(top_srcdir)/testsuite/runtest |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 155 | |
| 156 | # Documentation Targets |
Eric Andersen | f730088 | 2004-04-06 15:26:25 +0000 | [diff] [blame] | 157 | doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html |
John Beppu | 94e5054 | 2001-04-05 19:42:03 +0000 | [diff] [blame] | 158 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 159 | docs/busybox.pod : $(top_srcdir)/docs/busybox_header.pod $(top_srcdir)/include/usage.h $(top_srcdir)/docs/busybox_footer.pod |
| 160 | -mkdir -p docs |
| 161 | - ( cat $(top_srcdir)/docs/busybox_header.pod; \ |
| 162 | $(top_srcdir)/docs/autodocifier.pl $(top_srcdir)/include/usage.h; \ |
| 163 | cat $(top_srcdir)/docs/busybox_footer.pod ) > docs/busybox.pod |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 164 | |
Eric Andersen | 67536ff | 2000-07-06 22:53:22 +0000 | [diff] [blame] | 165 | docs/BusyBox.txt: docs/busybox.pod |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 166 | @echo |
| 167 | @echo BusyBox Documentation |
| 168 | @echo |
Eric Andersen | 29be79c | 2000-12-01 22:57:44 +0000 | [diff] [blame] | 169 | -mkdir -p docs |
Eric Andersen | 19f8620 | 2001-02-17 00:42:47 +0000 | [diff] [blame] | 170 | -pod2text $< > $@ |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 171 | |
Eric Andersen | 67536ff | 2000-07-06 22:53:22 +0000 | [diff] [blame] | 172 | docs/BusyBox.1: docs/busybox.pod |
Eric Andersen | 09a34e5 | 2000-12-01 19:40:18 +0000 | [diff] [blame] | 173 | - mkdir -p docs |
Eric Andersen | 29be79c | 2000-12-01 22:57:44 +0000 | [diff] [blame] | 174 | - pod2man --center=BusyBox --release="version $(VERSION)" \ |
Eric Andersen | 19f8620 | 2001-02-17 00:42:47 +0000 | [diff] [blame] | 175 | $< > $@ |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 176 | |
Eric Andersen | 2423b12 | 2001-12-08 01:56:15 +0000 | [diff] [blame] | 177 | docs/BusyBox.html: docs/busybox.net/BusyBox.html |
Eric Andersen | 1cf8166 | 2001-02-17 15:55:15 +0000 | [diff] [blame] | 178 | - mkdir -p docs |
Eric Andersen | e2f6e12 | 2000-12-01 19:55:04 +0000 | [diff] [blame] | 179 | -@ rm -f docs/BusyBox.html |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 180 | -@ cp docs/busybox.net/BusyBox.html docs/BusyBox.html |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 181 | |
Eric Andersen | 2423b12 | 2001-12-08 01:56:15 +0000 | [diff] [blame] | 182 | docs/busybox.net/BusyBox.html: docs/busybox.pod |
| 183 | -@ mkdir -p docs/busybox.net |
Eric Andersen | 19f8620 | 2001-02-17 00:42:47 +0000 | [diff] [blame] | 184 | - pod2html --noindex $< > \ |
Eric Andersen | 2423b12 | 2001-12-08 01:56:15 +0000 | [diff] [blame] | 185 | docs/busybox.net/BusyBox.html |
Eric Andersen | 3676374 | 2001-04-24 21:46:07 +0000 | [diff] [blame] | 186 | -@ rm -f pod2htm* |
Erik Andersen | 0a704e8 | 2000-05-03 03:19:06 +0000 | [diff] [blame] | 187 | |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 188 | # The nifty new buildsystem stuff |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 189 | scripts/mkdep: $(top_srcdir)/scripts/mkdep.c |
| 190 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< |
Eric Andersen | 67536ff | 2000-07-06 22:53:22 +0000 | [diff] [blame] | 191 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 192 | scripts/split-include: $(top_srcdir)/scripts/split-include.c |
| 193 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< |
Erik Andersen | 1d1d950 | 2000-04-21 01:26:49 +0000 | [diff] [blame] | 194 | |
Mike Frysinger | e9903cf | 2005-06-11 00:13:58 +0000 | [diff] [blame] | 195 | .depend: scripts/mkdep include/config.h |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 196 | rm -f .depend .hdepend; |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 197 | mkdir -p include/config; |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 198 | scripts/mkdep -I include -- \ |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 199 | `find $(top_srcdir) -name \*.c -print | sed -e "s,^./,,"` >> .depend; |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 200 | scripts/mkdep -I include -- \ |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 201 | `find $(top_srcdir) -name \*.h -print | sed -e "s,^./,,"` >> .hdepend; |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 202 | |
Mike Frysinger | e9903cf | 2005-06-11 00:13:58 +0000 | [diff] [blame] | 203 | depend dep: .depend |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 204 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 205 | include/config/MARKER: depend scripts/split-include |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 206 | scripts/split-include include/config.h include/config |
| 207 | @ touch include/config/MARKER |
| 208 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 209 | include/config.h: .config |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 210 | @if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \ |
Glenn L McGrath | b19c73d | 2003-08-29 13:25:55 +0000 | [diff] [blame] | 211 | $(MAKE) -C scripts/config conf; \ |
Eric Andersen | 3cd2760 | 2001-10-24 07:58:02 +0000 | [diff] [blame] | 212 | fi; |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 213 | @$(top_builddir)/scripts/config/conf -o $(CONFIG_CONFIG_IN) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 214 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 215 | finished2: |
| 216 | @echo |
| 217 | @echo Finished installing... |
| 218 | @echo |
Eric Andersen | 19f8620 | 2001-02-17 00:42:47 +0000 | [diff] [blame] | 219 | |
Eric Andersen | 068b6b0 | 2002-12-13 22:53:28 +0000 | [diff] [blame] | 220 | else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 221 | |
| 222 | all: menuconfig |
| 223 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 224 | # configuration |
| 225 | # --------------------------------------------------------------------------- |
| 226 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 227 | $(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile |
| 228 | d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@ |
| 229 | |
| 230 | scripts/config/conf: scripts/config/Makefile Rules.mak |
Glenn L McGrath | b19c73d | 2003-08-29 13:25:55 +0000 | [diff] [blame] | 231 | $(MAKE) -C scripts/config conf |
Eric Andersen | 068b6b0 | 2002-12-13 22:53:28 +0000 | [diff] [blame] | 232 | -@if [ ! -f .config ] ; then \ |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 233 | cp $(CONFIG_DEFCONFIG) .config; \ |
Eric Andersen | 068b6b0 | 2002-12-13 22:53:28 +0000 | [diff] [blame] | 234 | fi |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 235 | |
| 236 | scripts/config/mconf: scripts/config/Makefile Rules.mak |
Glenn L McGrath | b19c73d | 2003-08-29 13:25:55 +0000 | [diff] [blame] | 237 | $(MAKE) -C scripts/config ncurses conf mconf |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 238 | -@if [ ! -f .config ] ; then \ |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 239 | cp $(CONFIG_DEFCONFIG) .config; \ |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 240 | fi |
| 241 | |
| 242 | menuconfig: scripts/config/mconf |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 243 | @./scripts/config/mconf $(CONFIG_CONFIG_IN) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 244 | |
| 245 | config: scripts/config/conf |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 246 | @./scripts/config/conf $(CONFIG_CONFIG_IN) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 247 | |
| 248 | oldconfig: scripts/config/conf |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 249 | @./scripts/config/conf -o $(CONFIG_CONFIG_IN) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 250 | |
| 251 | randconfig: scripts/config/conf |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 252 | @./scripts/config/conf -r $(CONFIG_CONFIG_IN) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 253 | |
| 254 | allyesconfig: scripts/config/conf |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 255 | @./scripts/config/conf -y $(CONFIG_CONFIG_IN) |
Eric Andersen | 8ee6943 | 2004-04-06 11:46:56 +0000 | [diff] [blame] | 256 | sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config |
| 257 | sed -i -e "s/^USING_CROSS_COMPILER.*/# USING_CROSS_COMPILER is not set/" .config |
Eric Andersen | b07ae7b | 2004-04-06 11:51:45 +0000 | [diff] [blame] | 258 | sed -i -e "s/^CONFIG_STATIC.*/# CONFIG_STATIC is not set/" .config |
| 259 | sed -i -e "s/^CONFIG_SELINUX.*/# CONFIG_SELINUX is not set/" .config |
Eric Andersen | 8ee6943 | 2004-04-06 11:46:56 +0000 | [diff] [blame] | 260 | @./scripts/config/conf -o $(CONFIG_CONFIG_IN) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 261 | |
| 262 | allnoconfig: scripts/config/conf |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 263 | @./scripts/config/conf -n $(CONFIG_CONFIG_IN) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 264 | |
| 265 | defconfig: scripts/config/conf |
Glenn L McGrath | 6376b58 | 2003-09-24 15:48:29 +0000 | [diff] [blame] | 266 | @./scripts/config/conf -d $(CONFIG_CONFIG_IN) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 267 | |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 268 | clean: |
Eric Andersen | f730088 | 2004-04-06 15:26:25 +0000 | [diff] [blame] | 269 | - rm -f docs/busybox.dvi docs/busybox.ps \ |
| 270 | docs/busybox.pod docs/busybox.net/busybox.html \ |
Eric Andersen | 24e098a | 2003-08-22 20:53:38 +0000 | [diff] [blame] | 271 | docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \ |
| 272 | docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \ |
| 273 | docs/busybox.net/BusyBox.html busybox.links libbb/loop.h \ |
| 274 | .config.old .hdepend busybox |
| 275 | - rm -rf _install |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 276 | - find . -name .\*.flags -exec rm -f {} \; |
Eric Andersen | 8771517 | 2002-07-31 03:45:05 +0000 | [diff] [blame] | 277 | - find . -name \*.o -exec rm -f {} \; |
| 278 | - find . -name \*.a -exec rm -f {} \; |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 279 | |
| 280 | distclean: clean |
Eric Andersen | a995343 | 2003-01-27 22:11:59 +0000 | [diff] [blame] | 281 | - rm -f scripts/split-include scripts/mkdep |
| 282 | - rm -rf include/config include/config.h |
| 283 | - find . -name .depend -exec rm -f {} \; |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 284 | rm -f .config .config.old .config.cmd |
Eric Andersen | a995343 | 2003-01-27 22:11:59 +0000 | [diff] [blame] | 285 | - $(MAKE) -C scripts/config clean |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 286 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 287 | release: distclean #doc |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 288 | cd ..; \ |
Glenn L McGrath | 0874a61 | 2003-11-17 10:26:43 +0000 | [diff] [blame] | 289 | rm -rf $(PROG)-$(VERSION); \ |
| 290 | cp -a busybox $(PROG)-$(VERSION); \ |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 291 | \ |
Glenn L McGrath | 0874a61 | 2003-11-17 10:26:43 +0000 | [diff] [blame] | 292 | find $(PROG)-$(VERSION)/ -type d \ |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 293 | -name CVS \ |
| 294 | -print \ |
Eric Andersen | 53b55ac | 2001-03-16 07:43:53 +0000 | [diff] [blame] | 295 | -exec rm -rf {} \; ; \ |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 296 | \ |
Glenn L McGrath | 0874a61 | 2003-11-17 10:26:43 +0000 | [diff] [blame] | 297 | find $(PROG)-$(VERSION)/ -type f \ |
Eric Andersen | b0b732b | 2000-07-06 23:17:16 +0000 | [diff] [blame] | 298 | -name .\#* \ |
| 299 | -print \ |
Eric Andersen | 53b55ac | 2001-03-16 07:43:53 +0000 | [diff] [blame] | 300 | -exec rm -f {} \; ; \ |
Eric Andersen | b0b732b | 2000-07-06 23:17:16 +0000 | [diff] [blame] | 301 | \ |
Glenn L McGrath | 0874a61 | 2003-11-17 10:26:43 +0000 | [diff] [blame] | 302 | tar -cvzf $(PROG)-$(VERSION).tar.gz $(PROG)-$(VERSION)/; |
Mark Whitley | dd23b8b | 2000-07-10 23:00:47 +0000 | [diff] [blame] | 303 | |
Mark Whitley | dd23b8b | 2000-07-10 23:00:47 +0000 | [diff] [blame] | 304 | tags: |
| 305 | ctags -R . |
Matt Kraai | 4e05da8 | 2001-11-19 19:47:56 +0000 | [diff] [blame] | 306 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 307 | |
Eric Andersen | 068b6b0 | 2002-12-13 22:53:28 +0000 | [diff] [blame] | 308 | endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 309 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 310 | endif # ifeq ($(skip-makefile),) |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 311 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 312 | .PHONY: dummy subdirs release distclean clean config oldconfig \ |
| 313 | menuconfig tags check test depend buildtree |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 314 | |