]>
Commit | Line | Data |
---|---|---|
2c8e931c | 1 | # Makefile for uClibc |
eb2ecd0b | 2 | # |
f71b544e | 3 | # Copyright (C) 2000-2003 Erik Andersen <[email protected]> |
eb2ecd0b | 4 | # |
f71b544e EA |
5 | # This program is free software; you can redistribute it and/or |
6 | # modify it under the terms of the GNU Library General Public | |
7 | # License as published by the Free Software Foundation; either | |
8 | # version 2 of the License, or (at your option) any later | |
9 | # version. | |
eb2ecd0b | 10 | # |
f71b544e EA |
11 | # This program is distributed in the hope that it will be useful, |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU Library General Public License for more details. | |
eb2ecd0b | 15 | # |
f71b544e EA |
16 | # You should have received a copy of the GNU Library General |
17 | # Public License along with this program; if not, write to the | |
18 | # Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |
19 | # Boston, MA 02111-1307 USA | |
eb2ecd0b | 20 | |
a99617fe | 21 | |
6737908f EA |
22 | #-------------------------------------------------------------- |
23 | # You shouldn't need to mess with anything beyond this point... | |
24 | #-------------------------------------------------------------- | |
25 | noconfig_targets := menuconfig config oldconfig randconfig \ | |
26 | defconfig allyesconfig allnoconfig clean distclean \ | |
f70602be | 27 | release tags |
91307a36 | 28 | TOPDIR=./ |
124af9f4 | 29 | include Rules.mak |
a99617fe | 30 | |
f70602be PM |
31 | # need to have libc.so built, before we can build the others |
32 | PRE_DIRS = ldso libc | |
33 | DIRS = ldso libcrypt libresolv libnsl libutil librt | |
3a7ac9c7 | 34 | ifeq ($(UCLIBC_HAS_FLOATS),y) |
9431826d PM |
35 | DIRS += libm |
36 | endif | |
3a7ac9c7 | 37 | ifeq ($(UCLIBC_HAS_THREADS),y) |
9431826d PM |
38 | DIRS += libpthread |
39 | endif | |
3a7ac9c7 | 40 | ifeq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y) |
037a01de MNI |
41 | DIRS += libintl |
42 | endif | |
f0da4aa1 | 43 | |
3a7ac9c7 | 44 | ifeq ($(HAVE_DOT_CONFIG),y) |
f0da4aa1 | 45 | |
f70602be | 46 | all: finished |
6737908f EA |
47 | |
48 | # In this section, we need .config | |
49 | -include .config.cmd | |
ac191d55 | 50 | |
f70602be | 51 | finished: subdirs |
e5760ee3 MF |
52 | $(SECHO) |
53 | $(SECHO) Finally finished compiling ... | |
54 | $(SECHO) | |
64bc6412 | 55 | |
6737908f | 56 | include/bits/uClibc_config.h: .config |
51da40e7 | 57 | @if [ ! -x ./extra/config/conf ] ; then \ |
1b156699 | 58 | $(MAKE) -C extra/config conf; \ |
2b4bc63f | 59 | fi |
dd3fb0f8 | 60 | $(RM) -r include/bits |
49f0dd0f | 61 | $(INSTALL) -d include/bits |
f8a3fa02 | 62 | @./extra/config/conf -o extra/Configs/Config.in |
6737908f | 63 | |
214557d8 MF |
64 | # For the moment, we have to keep re-running this target |
65 | # because the fix includes scripts rely on pre-processers | |
66 | # in order to generate the headers correctly :(. That | |
67 | # means we can't use the $(HOSTCC) in order to get the | |
68 | # correct output. | |
3a7ac9c7 | 69 | ifeq ($(ARCH_HAS_MMU),y) |
e5760ee3 | 70 | export header_extra_args = |
f71b544e | 71 | else |
e5760ee3 | 72 | export header_extra_args = -n |
f71b544e | 73 | endif |
e5760ee3 MF |
74 | headers: include/bits/uClibc_config.h |
75 | @$(SHELL_SET_X); \ | |
76 | ./extra/scripts/fix_includes.sh \ | |
77 | -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) \ | |
78 | $(header_extra_args) | |
ad255d2d | 79 | @cd include/bits; \ |
b8c417a5 | 80 | set -e; \ |
ad255d2d | 81 | for i in `ls ../../libc/sysdeps/linux/common/bits/*.h` ; do \ |
ff23ecf6 | 82 | $(LN) -fs $$i .; \ |
ad255d2d EA |
83 | done; \ |
84 | if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits ] ; then \ | |
85 | for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h` ; do \ | |
ff23ecf6 | 86 | $(LN) -fs $$i .; \ |
ad255d2d EA |
87 | done; \ |
88 | fi | |
89 | @cd include/sys; \ | |
b8c417a5 | 90 | set -e; \ |
7589fd62 | 91 | for i in `ls ../../libc/sysdeps/linux/common/sys/*.h` ; do \ |
ff23ecf6 | 92 | $(LN) -fs $$i .; \ |
ad255d2d EA |
93 | done; \ |
94 | if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \ | |
7589fd62 | 95 | for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h` ; do \ |
ff23ecf6 | 96 | $(LN) -fs $$i .; \ |
ad255d2d EA |
97 | done; \ |
98 | fi | |
54a833f9 | 99 | @cd $(TOPDIR); \ |
e5760ee3 MF |
100 | set -e; \ |
101 | $(SHELL_SET_X); \ | |
7a83a9f1 | 102 | TOPDIR=. CC="$(CC)" /bin/sh extra/scripts/gen_bits_syscall_h.sh > include/bits/sysnum.h.new; \ |
654b5ef1 EA |
103 | if cmp include/bits/sysnum.h include/bits/sysnum.h.new >/dev/null 2>&1; then \ |
104 | $(RM) include/bits/sysnum.h.new; \ | |
105 | else \ | |
106 | mv -f include/bits/sysnum.h.new include/bits/sysnum.h; \ | |
107 | fi | |
3a7ac9c7 | 108 | ifeq ($(UCLIBC_HAS_THREADS),y) |
b402fab3 | 109 | $(MAKE) -C libpthread headers |
9186977b | 110 | endif |
7bda1856 | 111 | $(MAKE) -C libc/sysdeps/linux/common headers |
0a4aa6c3 | 112 | $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) headers |
ec265314 | 113 | |
86be4f7e EA |
114 | # Command used to download source code |
115 | WGET:=wget --passive-ftp | |
116 | ||
2ed8ea7e MNI |
117 | LOCALE_DATA_FILENAME:=uClibc-locale-030818.tgz |
118 | ||
86be4f7e | 119 | pregen: headers |
3a7ac9c7 | 120 | ifeq ($(UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA),y) |
86be4f7e | 121 | (cd extra/locale; \ |
2ed8ea7e MNI |
122 | if [ ! -f $(LOCALE_DATA_FILENAME) ] ; then \ |
123 | $(WGET) http://www.uclibc.org/downloads/$(LOCALE_DATA_FILENAME) ; \ | |
2b4bc63f | 124 | fi ) |
86be4f7e | 125 | endif |
3a7ac9c7 | 126 | ifeq ($(UCLIBC_PREGENERATED_LOCALE_DATA),y) |
2ed8ea7e | 127 | (cd extra/locale; zcat $(LOCALE_DATA_FILENAME) | tar -xvf -) |
1b156699 | 128 | $(MAKE) -C extra/locale pregen |
86be4f7e EA |
129 | endif |
130 | ||
f70602be PM |
131 | pre_subdirs: $(patsubst %, _pre_dir_%, $(PRE_DIRS)) |
132 | $(patsubst %, _pre_dir_%, $(PRE_DIRS)): pregen | |
133 | $(MAKE) -C $(patsubst _pre_dir_%, %, $@) | |
86be4f7e | 134 | |
f0da4aa1 | 135 | subdirs: $(patsubst %, _dir_%, $(DIRS)) |
f70602be | 136 | $(patsubst %, _dir_%, $(DIRS)): pre_subdirs |
f0da4aa1 EA |
137 | $(MAKE) -C $(patsubst _dir_%, %, $@) |
138 | ||
139 | tags: | |
140 | ctags -R | |
141 | ||
f0de7b23 | 142 | install: install_runtime install_dev finished2 |
f0da4aa1 | 143 | |
96277cfc | 144 | |
909c7fda EA |
145 | RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib) |
146 | ||
6042a50c PM |
147 | # Installs header files. |
148 | install_headers: | |
4a321ff4 | 149 | $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include |
08a9752c MF |
150 | if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \ |
151 | extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \ | |
152 | else \ | |
153 | extra_exclude="" ; \ | |
154 | fi ; \ | |
155 | tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \ | |
8196d433 | 156 | | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX) |
593d5a15 | 157 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ssp-internal.h |
3a7ac9c7 | 158 | ifneq ($(UCLIBC_HAS_FLOATS),y) |
24b3f737 | 159 | # Remove floating point related headers since float support is disabled. |
4a321ff4 EA |
160 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h |
161 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fpu_control.h | |
162 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ieee754.h | |
163 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h | |
164 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h | |
0576579a | 165 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h |
24b3f737 | 166 | endif |
3a7ac9c7 | 167 | ifneq ($(UCLIBC_HAS_WCHAR),y) |
8be2cd04 | 168 | # Remove wide char headers since wide char support is disabled. |
4a321ff4 EA |
169 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h |
170 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wchar.h | |
037a01de | 171 | endif |
3a7ac9c7 | 172 | ifneq ($(UCLIBC_HAS_LOCALE),y) |
8be2cd04 | 173 | # Remove iconv header since locale support is disabled. |
4a321ff4 | 174 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/iconv.h |
037a01de | 175 | endif |
3a7ac9c7 | 176 | ifneq ($(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF),y) |
24b3f737 | 177 | # Remove printf header since custom print specifier support is disabled. |
4a321ff4 | 178 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/printf.h |
24b3f737 | 179 | endif |
3a7ac9c7 | 180 | ifneq ($(UCLIBC_HAS_XLOCALE),y) |
8be2cd04 | 181 | # Remove xlocale header since extended locale support is disabled. |
4a321ff4 | 182 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/xlocale.h |
037a01de | 183 | endif |
3a7ac9c7 | 184 | ifneq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y) |
8be2cd04 | 185 | # Remove libintl header since gettext support is disabled. |
4a321ff4 | 186 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/libintl.h |
72d74d71 | 187 | endif |
3a7ac9c7 | 188 | ifneq ($(UCLIBC_HAS_REGEX),y) |
8be2cd04 | 189 | # Remove regex headers since regex support is disabled. |
4a321ff4 EA |
190 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regex.h |
191 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h | |
72d74d71 | 192 | endif |
3a7ac9c7 | 193 | ifneq ($(UCLIBC_HAS_WORDEXP),y) |
8be2cd04 | 194 | # Remove wordexp header since wordexp support is disabled. |
4a321ff4 | 195 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wordexp.h |
72d74d71 | 196 | endif |
3a7ac9c7 | 197 | ifneq ($(UCLIBC_HAS_FTW),y) |
8be2cd04 | 198 | # Remove ftw header since ftw support is disabled. |
4a321ff4 | 199 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ftw.h |
72d74d71 | 200 | endif |
3a7ac9c7 | 201 | ifneq ($(UCLIBC_HAS_GLOB),y) |
8be2cd04 | 202 | # Remove glob header since glob support is disabled. |
4a321ff4 | 203 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/glob.h |
f2239854 | 204 | endif |
3a7ac9c7 | 205 | ifneq ($(UCLIBC_HAS_GNU_GETOPT),y) |
f2239854 | 206 | # Remove getopt header since gnu getopt support is disabled. |
4a321ff4 | 207 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/getopt.h |
9f77c8c4 | 208 | endif |
3a7ac9c7 | 209 | ifneq ($(HAS_SHADOW),y) |
99daa24b | 210 | # Remove shadow header since shadow password support is disabled. |
9f77c8c4 | 211 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/shadow.h |
0576579a | 212 | endif |
3a7ac9c7 | 213 | ifneq ($(PTHREADS_DEBUG_SUPPORT),y) |
0576579a PM |
214 | # Remove thread_db header since thread debug support is disabled. |
215 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/thread_db.h | |
216 | endif | |
3a7ac9c7 | 217 | ifneq ($(UCLIBC_HAS_THREADS),y) |
0576579a PM |
218 | # Remove pthread headers since thread support is disabled. |
219 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h | |
220 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h | |
221 | $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h | |
037a01de | 222 | endif |
6a461519 | 223 | -@for i in `find $(PREFIX)$(DEVEL_PREFIX) -type d` ; do \ |
3a546d13 | 224 | chmod 755 $$i; chmod 644 $$i/*.h > /dev/null 2>&1; \ |
2b4bc63f PM |
225 | done |
226 | -find $(PREFIX)$(DEVEL_PREFIX) -name .svn | xargs $(RM) -r | |
7df4fc5e | 227 | -chown -R `id | sed 's/^uid=\([0-9]*\).*gid=\([0-9]*\).*$$/\1:\2/'` $(PREFIX)$(DEVEL_PREFIX) |
6042a50c PM |
228 | |
229 | # Installs development library links. | |
230 | install_dev: install_headers | |
231 | $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib | |
232 | -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/ | |
3a7ac9c7 | 233 | ifeq ($(HAVE_SHARED),y) |
71f89684 EA |
234 | for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \ |
235 | sed -e 's/lib\///'` ; do \ | |
909c7fda | 236 | $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \ |
71f89684 | 237 | $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \ |
e8138701 | 238 | done |
6042a50c | 239 | if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \ |
e8138701 PM |
240 | $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ |
241 | sed -e '/^GROUP/d' $(TOPDIR)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ | |
f70602be | 242 | fi |
3a7ac9c7 | 243 | ifeq ($(COMPAT_ATEXIT),y) |
6042a50c | 244 | if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \ |
e8138701 PM |
245 | echo "GROUP ( $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) )" \ |
246 | >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ | |
247 | fi | |
9ddd9870 | 248 | else |
6042a50c | 249 | if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \ |
e8138701 PM |
250 | echo "GROUP ( $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) )" \ |
251 | >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ | |
252 | fi | |
9ddd9870 | 253 | endif |
3a7ac9c7 | 254 | ifeq ($(PTHREADS_DEBUG_SUPPORT),y) |
6716bc70 | 255 | $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \ |
71f89684 EA |
256 | $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so |
257 | endif | |
258 | # # If we build shared libraries then the static libs are PIC... | |
259 | # # Make _pic.a symlinks to make mklibs.py and similar tools happy. | |
c12b5f41 | 260 | if [ -d lib ] ; then \ |
f70602be PM |
261 | for i in `find lib/ -type f -name 'lib*.a' | sed -e 's/lib\///'` ; do \ |
262 | $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \ | |
263 | | sed -e 's/\.a$$/_pic.a/'`; \ | |
264 | done ; \ | |
c12b5f41 | 265 | fi |
ffc7bb39 EA |
266 | endif |
267 | ||
ad8d1eb4 | 268 | # Installs run-time libraries |
cffc73df | 269 | install_runtime: |
3a7ac9c7 | 270 | ifeq ($(HAVE_SHARED),y) |
27c01b77 | 271 | $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib |
49f0dd0f | 272 | $(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \ |
27c01b77 | 273 | $(PREFIX)$(RUNTIME_PREFIX)lib |
9d003b25 | 274 | cp -dRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib |
58bd16ab | 275 | @if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \ |
e5760ee3 MF |
276 | set -e; \ |
277 | $(SHELL_SET_X); \ | |
49f0dd0f | 278 | $(INSTALL) -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \ |
27c01b77 | 279 | $(PREFIX)$(RUNTIME_PREFIX)lib; \ |
2b4bc63f | 280 | fi |
dd43462e EA |
281 | endif |
282 | ||
f0de7b23 | 283 | utils: |
92dbe108 | 284 | $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils |
2cf23b8b | 285 | |
ad8d1eb4 | 286 | # Installs helper applications, such as 'ldd' and 'ldconfig' |
2cf23b8b | 287 | install_utils: utils |
92dbe108 | 288 | $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils install |
96277cfc | 289 | |
34436c09 | 290 | finished2: |
e5760ee3 MF |
291 | $(SECHO) |
292 | $(SECHO) Finished installing ... | |
293 | $(SECHO) | |
34436c09 | 294 | |
3a7ac9c7 | 295 | else # ifeq ($(HAVE_DOT_CONFIG),y) |
6737908f EA |
296 | |
297 | all: menuconfig | |
298 | ||
6737908f EA |
299 | # configuration |
300 | # --------------------------------------------------------------------------- | |
f8a3fa02 | 301 | extra/config/conf: |
1b156699 | 302 | $(MAKE) -C extra/config conf |
3056fc1a | 303 | |
f8a3fa02 | 304 | extra/config/mconf: |
1b156699 | 305 | $(MAKE) -C extra/config ncurses mconf |
3056fc1a | 306 | |
6737908f | 307 | menuconfig: extra/config/mconf |
dd3fb0f8 | 308 | $(RM) -r include/bits |
49f0dd0f | 309 | $(INSTALL) -d include/bits |
f8a3fa02 | 310 | @./extra/config/mconf extra/Configs/Config.in |
b3db5549 | 311 | $(MAKE) headers |
6737908f EA |
312 | |
313 | config: extra/config/conf | |
dd3fb0f8 | 314 | $(RM) -r include/bits |
49f0dd0f | 315 | $(INSTALL) -d include/bits |
f8a3fa02 | 316 | @./extra/config/conf extra/Configs/Config.in |
6737908f EA |
317 | |
318 | oldconfig: extra/config/conf | |
dd3fb0f8 | 319 | $(RM) -r include/bits |
49f0dd0f | 320 | $(INSTALL) -d include/bits |
f8a3fa02 | 321 | @./extra/config/conf -o extra/Configs/Config.in |
6737908f EA |
322 | |
323 | randconfig: extra/config/conf | |
dd3fb0f8 | 324 | $(RM) -r include/bits |
49f0dd0f | 325 | $(INSTALL) -d include/bits |
f8a3fa02 | 326 | @./extra/config/conf -r extra/Configs/Config.in |
6737908f EA |
327 | |
328 | allyesconfig: extra/config/conf | |
dd3fb0f8 | 329 | $(RM) -r include/bits |
49f0dd0f | 330 | $(INSTALL) -d include/bits |
f8a3fa02 | 331 | @./extra/config/conf -y extra/Configs/Config.in |
6e112da9 EA |
332 | sed -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config |
333 | sed -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config | |
334 | sed -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config | |
335 | sed -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config | |
336 | sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config | |
337 | @./extra/config/conf -o extra/Configs/Config.in | |
6737908f EA |
338 | |
339 | allnoconfig: extra/config/conf | |
dd3fb0f8 | 340 | $(RM) -r include/bits |
49f0dd0f | 341 | $(INSTALL) -d include/bits |
f8a3fa02 | 342 | @./extra/config/conf -n extra/Configs/Config.in |
6737908f EA |
343 | |
344 | defconfig: extra/config/conf | |
dd3fb0f8 | 345 | $(RM) -r include/bits |
49f0dd0f | 346 | $(INSTALL) -d include/bits |
f8a3fa02 | 347 | @./extra/config/conf -d extra/Configs/Config.in |
6737908f | 348 | |
68a33eaf | 349 | clean: |
9186977b | 350 | @$(RM) -r lib include/bits |
75e3be2c | 351 | $(RM) libc/*.a libc/obj.* libc/nonshared_obj.* |
3a7ac9c7 | 352 | $(RM) libc/misc/locale/locale_data.c |
68a33eaf | 353 | $(RM) libc/misc/internals/interp.c |
75e3be2c | 354 | $(RM) ldso/libdl/*.a |
68a33eaf | 355 | $(RM) include/fpu_control.h |
2c35b786 | 356 | $(MAKE) -C extra/locale clean |
75e3be2c PM |
357 | $(MAKE) -C ldso headers_clean |
358 | $(MAKE) -C libpthread headers_clean | |
68a33eaf PM |
359 | $(MAKE) -C test clean |
360 | $(MAKE) -C utils clean | |
6c514226 EA |
361 | @set -e; \ |
362 | for i in `(cd $(TOPDIR)/libc/sysdeps/linux/common/sys; ls *.h)` ; do \ | |
dd3fb0f8 | 363 | $(RM) include/sys/$$i; \ |
6c514226 EA |
364 | done; \ |
365 | if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \ | |
366 | for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \ | |
dd3fb0f8 | 367 | $(RM) include/sys/$$i; \ |
6c514226 | 368 | done; \ |
2b4bc63f | 369 | fi |
935b2624 | 370 | @$(RM) include/linux include/asm* |
96749a76 EA |
371 | @if [ -d libc/sysdeps/linux/$(TARGET_ARCH) ]; then \ |
372 | $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) clean; \ | |
2b4bc63f | 373 | fi |
4583f84a | 374 | -find . \( -name \*.o -o -name \*.os \) -exec $(RM) {} \; |
f0da4aa1 | 375 | |
6737908f | 376 | distclean: clean |
75e3be2c | 377 | -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\#\* \) -exec $(RM) {} \; |
dd3fb0f8 | 378 | $(RM) .config .config.old .config.cmd |
a29321c6 | 379 | $(RM) extra/locale/*.txt |
dec2c57b | 380 | $(MAKE) -C extra clean |
6737908f EA |
381 | |
382 | release: distclean | |
c784f765 | 383 | cd ..; \ |
dd3fb0f8 | 384 | $(RM) -r uClibc-$(VERSION); \ |
9d003b25 | 385 | cp -dRf uClibc uClibc-$(VERSION); \ |
aa1a0cd1 | 386 | find uClibc-$(VERSION)/ -type f \ |
dd3fb0f8 | 387 | -name .\#* -exec $(RM) -r {} \; ; \ |
aa1a0cd1 | 388 | find uClibc-$(VERSION)/ -type d \ |
bc8dffb0 | 389 | -name .svn -exec $(RM) -r {} \; ; \ |
c784f765 | 390 | \ |
2b4bc63f | 391 | tar -cvzf uClibc-$(VERSION).tar.gz uClibc-$(VERSION)/ |
c784f765 | 392 | |
3a7ac9c7 | 393 | endif # ifeq ($(HAVE_DOT_CONFIG),y) |
6737908f | 394 | |
7d664310 MF |
395 | check: |
396 | $(MAKE) -C test | |
397 | ||
2b4bc63f | 398 | .PHONY: dummy subdirs release distclean clean config oldconfig menuconfig utils |