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