]> Git Repo - uclibc-ng.git/blame - Makefile
Patch from Peter S. Mazinger:
[uclibc-ng.git] / Makefile
CommitLineData
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#--------------------------------------------------------------
25noconfig_targets := menuconfig config oldconfig randconfig \
26 defconfig allyesconfig allnoconfig clean distclean \
27 release tags TAGS
91307a36 28TOPDIR=./
cf4328b1 29include Rules.mak
a99617fe 30
037a01de
MNI
31DIRS = extra ldso libc libcrypt libresolv libnsl libutil libm libpthread
32ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
33 DIRS += libintl
34endif
f0da4aa1 35
929f718b 36ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
f0da4aa1 37
86be4f7e 38all: headers pregen subdirs shared utils finished
6737908f
EA
39
40# In this section, we need .config
41-include .config.cmd
ac191d55 42
b2eb218f
DM
43.PHONY: $(SHARED_TARGET)
44shared: $(SHARED_TARGET)
6737908f 45ifeq ($(strip $(HAVE_SHARED)),y)
f0da4aa1 46 @$(MAKE) -C libc shared
96277cfc 47 @$(MAKE) -C ldso shared
bebf39c4 48 @$(MAKE) -C libcrypt shared
a078da48 49 @$(MAKE) -C libresolv shared
00020640 50 @$(MAKE) -C libnsl shared
64cdebe1 51 @$(MAKE) -C libutil shared
1077fa4d 52 @$(MAKE) -C libm shared
e356ea32 53 @$(MAKE) -C libpthread shared
037a01de 54ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
50660812 55 @$(MAKE) -C libintl shared
037a01de 56endif
96277cfc 57else
b2eb218f 58ifeq ($(SHARED_TARGET),)
96277cfc
EA
59 @echo
60 @echo Not building shared libraries...
61 @echo
62endif
b2eb218f
DM
63endif
64
65ifneq ($(SHARED_TARGET),)
66
67lib/main.o: $(ROOTDIR)/lib/libc/main.c
68 $(CC) $(CFLAGS) $(ARCH_CFLAGS) -c -o $@ $(ROOTDIR)/lib/libc/main.c
69
1837e910 70bogus $(SHARED_TARGET): lib/libc.a lib/main.o Makefile
b2eb218f 71 make -C $(ROOTDIR) relink
1837e910 72 $(CC) -nostartfiles -o $(SHARED_TARGET) $(ARCH_CFLAGS) -Wl,-elf2flt -nostdlib \
b2eb218f 73 -Wl,-shared-lib-id,${LIBID} \
1837e910
DM
74 lib/main.o \
75 -Wl,--whole-archive,lib/libc.a,-lgcc,--no-whole-archive
b2eb218f 76 $(OBJCOPY) -L _GLOBAL_OFFSET_TABLE_ -L main -L __main -L _start \
1837e910
DM
77 -L __uClibc_main -L __uClibc_start_main -L lib_main \
78 -L _exit_dummy_ref \
b2eb218f
DM
79 -L __do_global_dtors -L __do_global_ctors \
80 -L __CTOR_LIST__ -L __DTOR_LIST__ \
81 -L _current_shared_library_a5_offset_ \
82 $(SHARED_TARGET).gdb
ff23ecf6 83 $(LN) -sf $(SHARED_TARGET).gdb .
b2eb218f 84endif
8eaff69d 85
34436c09 86finished: shared
42ee0791
EA
87 @echo
88 @echo Finally finished compiling...
89 @echo
64bc6412 90
ee7b1a31 91#
79a790a5 92# Target for uClinux distro
ee7b1a31 93#
b2eb218f 94.PHONY: romfs
ee7b1a31 95romfs:
b2eb218f 96 @if [ "$(CONFIG_BINFMT_SHARED_FLAT)" = "y" ]; then \
49f0dd0f 97 [ -e $(ROMFSDIR)/lib ] || $(INSTALL) -d $(ROMFSDIR)/lib; \
b2eb218f
DM
98 $(ROMFSINST) $(SHARED_TARGET) /lib/lib$(LIBID).so; \
99 fi
6737908f 100ifeq ($(strip $(HAVE_SHARED)),y)
49f0dd0f
EA
101 $(INSTALL) -d $(ROMFSDIR)/lib
102 $(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
79a790a5 103 $(ROMFSDIR)/lib
b2eb218f 104 cp -fa lib/*.so.* $(ROMFSDIR)/lib/.
79a790a5
SH
105 @if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
106 set -x -e; \
49f0dd0f 107 $(INSTALL) -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
79a790a5 108 $(ROMFSDIR)/lib; \
b2eb218f
DM
109 $(ROMFSINST) -s \
110 /lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
111 /lib/ld-linux.so.2; \
79a790a5
SH
112 fi;
113endif
ee7b1a31 114
6737908f 115include/bits/uClibc_config.h: .config
51da40e7 116 @if [ ! -x ./extra/config/conf ] ; then \
929f718b 117 make -C extra/config conf; \
51da40e7 118 fi;
dd3fb0f8 119 $(RM) -r include/bits
49f0dd0f 120 $(INSTALL) -d include/bits
6737908f
EA
121 @./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH)
122
123headers: include/bits/uClibc_config.h
f71b544e
EA
124ifeq ($(strip $(UCLIBC_HAS_MMU)),y)
125 @./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH)
126else
127 @./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) -n
128endif
129 @if [ "$(TARGET_ARCH)" = "mipsel" ]; then \
ff23ecf6
EA
130 $(LN) -fs mips libc/sysdeps/linux/mipsel; \
131 $(LN) -fs mips ldso/ldso/mipsel; \
132 $(LN) -fs mips libpthread/linuxthreads/sysdeps/mipsel; \
a7b5c376 133 fi;
ad255d2d 134 @cd include/bits; \
b8c417a5 135 set -e; \
ad255d2d 136 for i in `ls ../../libc/sysdeps/linux/common/bits/*.h` ; do \
ff23ecf6 137 $(LN) -fs $$i .; \
ad255d2d
EA
138 done; \
139 if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits ] ; then \
140 for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h` ; do \
ff23ecf6 141 $(LN) -fs $$i .; \
ad255d2d
EA
142 done; \
143 fi
144 @cd include/sys; \
b8c417a5 145 set -e; \
7589fd62 146 for i in `ls ../../libc/sysdeps/linux/common/sys/*.h` ; do \
ff23ecf6 147 $(LN) -fs $$i .; \
ad255d2d
EA
148 done; \
149 if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
7589fd62 150 for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h` ; do \
ff23ecf6 151 $(LN) -fs $$i .; \
ad255d2d
EA
152 done; \
153 fi
54a833f9
EA
154 @cd $(TOPDIR); \
155 set -x -e; \
654b5ef1
EA
156 TOPDIR=. CC="$(CC)" /bin/sh extra/scripts/gen_bits_syscall_h.sh > include/bits/sysnum.h.new; \
157 if cmp include/bits/sysnum.h include/bits/sysnum.h.new >/dev/null 2>&1; then \
158 $(RM) include/bits/sysnum.h.new; \
159 else \
160 mv -f include/bits/sysnum.h.new include/bits/sysnum.h; \
161 fi
0a4aa6c3 162 $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) headers
ec265314 163
86be4f7e
EA
164# Command used to download source code
165WGET:=wget --passive-ftp
166
167pregen: headers
168ifeq ($(strip $(UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA)),y)
169 (cd extra/locale; \
170 $(WGET) http://www.uclibc.org/downloads/uClibc-locale-030818.tgz);
171endif
172ifeq ($(strip $(UCLIBC_PREGENERATED_LOCALE_DATA)),y)
173 (cd extra/locale; zcat uClibc-locale-030818.tgz | tar -xvf -)
174 make -C extra/locale pregen
175endif
176
177
f0da4aa1
EA
178subdirs: $(patsubst %, _dir_%, $(DIRS))
179
180$(patsubst %, _dir_%, $(DIRS)) : dummy
181 $(MAKE) -C $(patsubst _dir_%, %, $@)
182
183tags:
184 ctags -R
185
f87b5fa1 186install: install_dev install_runtime install_utils finished2
f0da4aa1 187
96277cfc
EA
188
189# Installs header files and development library links.
190install_dev:
49f0dd0f 191 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)/lib
49f0dd0f
EA
192 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)/include
193 -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)/lib/
171c8941 194 tar -chf - include | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX);
24b3f737
MNI
195ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
196 # Remove floating point related headers since float support is disabled.
dd3fb0f8
EA
197 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/complex.h
198 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/fpu_control.h
199 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/ieee754.h
200 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/math.h
201 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/tgmath.h
24b3f737 202endif
037a01de 203ifneq ($(strip $(UCLIBC_HAS_WCHAR)),y)
8be2cd04 204 # Remove wide char headers since wide char support is disabled.
dd3fb0f8
EA
205 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/wctype.h
206 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/wchar.h
037a01de
MNI
207endif
208ifneq ($(strip $(UCLIBC_HAS_LOCALE)),y)
8be2cd04 209 # Remove iconv header since locale support is disabled.
dd3fb0f8 210 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/iconv.h
037a01de 211endif
24b3f737
MNI
212ifneq ($(strip $(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF)),y)
213 # Remove printf header since custom print specifier support is disabled.
dd3fb0f8 214 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/printf.h
24b3f737 215endif
037a01de 216ifneq ($(strip $(UCLIBC_HAS_XLOCALE)),y)
8be2cd04 217 # Remove xlocale header since extended locale support is disabled.
dd3fb0f8 218 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/xlocale.h
037a01de
MNI
219endif
220ifneq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
8be2cd04 221 # Remove libintl header since gettext support is disabled.
dd3fb0f8 222 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/libintl.h
72d74d71
EA
223endif
224ifneq ($(strip $(UCLIBC_HAS_REGEX)),y)
8be2cd04 225 # Remove regex headers since regex support is disabled.
dd3fb0f8
EA
226 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/regex.h
227 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/regexp.h
72d74d71
EA
228endif
229ifneq ($(strip $(UCLIBC_HAS_WORDEXP)),y)
8be2cd04 230 # Remove wordexp header since wordexp support is disabled.
dd3fb0f8 231 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/wordexp.h
72d74d71
EA
232endif
233ifneq ($(strip $(UCLIBC_HAS_FTW)),y)
8be2cd04 234 # Remove ftw header since ftw support is disabled.
dd3fb0f8 235 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/ftw.h
72d74d71
EA
236endif
237ifneq ($(strip $(UCLIBC_HAS_GLOB)),y)
8be2cd04 238 # Remove glob header since glob support is disabled.
dd3fb0f8 239 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/glob.h
f2239854
MNI
240endif
241ifneq ($(strip $(UCLIBC_HAS_GNU_GETOPT)),y)
242 # Remove getopt header since gnu getopt support is disabled.
dd3fb0f8 243 $(RM) $(PREFIX)$(DEVEL_PREFIX)/include/getopt.h
037a01de 244endif
6a461519 245 -@for i in `find $(PREFIX)$(DEVEL_PREFIX) -type d` ; do \
c9907bfa 246 chmod 755 $$i; chmod 644 $$i/*.h; \
6a461519 247 done;
dd3fb0f8 248 -find $(PREFIX)$(DEVEL_PREFIX) -name CVS | xargs $(RM) -r;
8841a5a7 249 -chown -R `id | sed 's/^uid=\([0-9]*\).*gid=\([0-9]*\).*$$/\1.\2/'` $(PREFIX)$(DEVEL_PREFIX)
6737908f 250ifeq ($(strip $(HAVE_SHARED)),y)
49f0dd0f 251 -$(INSTALL) -m 644 lib/*.so $(PREFIX)$(DEVEL_PREFIX)/lib/
65680f69 252 -find lib/ -type l -name '*.so' -exec cp -fa {} $(PREFIX)$(DEVEL_PREFIX)/lib ';'
34117d1d
EA
253 # If we build shared libraries then the static libs are PIC...
254 # Make _pic.a symlinks to make mklibs.py and similar tools happy.
255 for i in `find lib/ -type f -name '*.a' | sed -e 's/lib\///'` ; do \
ff23ecf6 256 $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)/lib/`echo $$i | sed -e 's/\.a$$/_pic.a/'`; \
34117d1d 257 done
ffc7bb39
EA
258endif
259
96277cfc
EA
260
261# Installs run-time libraries and helper apps onto the host system
262# allowing cross development. If you want to deploy to a target
263# system, use the "install_target" target instead...
ffc7bb39 264install_runtime:
6737908f 265ifeq ($(strip $(HAVE_SHARED)),y)
336eda9b 266 $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)/lib
49f0dd0f 267 $(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
336eda9b
EA
268 $(PREFIX)$(RUNTIME_PREFIX)/lib
269 cp -fa lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)/lib
58bd16ab 270 @if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
f605da2f 271 set -x -e; \
49f0dd0f 272 $(INSTALL) -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
336eda9b 273 $(PREFIX)$(RUNTIME_PREFIX)/lib; \
96277cfc 274 fi;
dd43462e
EA
275endif
276
c5c91dc7 277install_toolchain: install_utils
49f0dd0f
EA
278 $(INSTALL) -d $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin
279 $(INSTALL) -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin
c5c91dc7
EA
280 $(LN) -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldd \
281 $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/ldd
282 $(INSTALL) -m 755 ldso/util/ldd \
283 $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldd
284 $(INSTALL) -m 755 ldso/util/ldconfig \
285 $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldconfig;
286 $(INSTALL) -m 755 ldso/util/ldconfig \
287 $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldconfig;
288 # For now, don't bother with readelf since surely the host
289 # system has binutils, or we couldn't have gotten this far...
290 #$(LN) -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-readelf \
291 # $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/readelf
03f7612a 292 $(MAKE) -C extra/gcc-uClibc install
e788a838 293
6737908f 294ifeq ($(strip $(HAVE_SHARED)),y)
34067b3b 295utils: $(TOPDIR)ldso/util/ldd
2cf23b8b 296 $(MAKE) -C ldso utils
34067b3b
EA
297else
298utils: dummy
c3e08b51 299endif
2cf23b8b
EA
300
301install_utils: utils
6737908f 302ifeq ($(strip $(HAVE_SHARED)),y)
c5c91dc7
EA
303 $(INSTALL) -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/sbin
304 $(INSTALL) -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin
49f0dd0f 305 $(INSTALL) -m 755 ldso/util/ldd \
c5c91dc7
EA
306 $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/ldd
307 $(INSTALL) -m 755 ldso/util/ldconfig \
308 $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/sbin/ldconfig;
53c4df14
EA
309 # For now, don't bother with readelf since surely the host
310 # system has binutils, or we couldn't have gotten this far...
49f0dd0f 311 #$(INSTALL) -m 755 ldso/util/readelf \
c5c91dc7 312 # $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/readelf
03f7612a 313endif
f0da4aa1 314
96277cfc
EA
315# Installs run-time libraries and helper apps in preparation for
316# deploying onto a target system, but installed below wherever
317# $PREFIX is set to, allowing you to package up the result for
318# deployment onto your target system.
319install_target:
6737908f 320ifeq ($(strip $(HAVE_SHARED)),y)
49f0dd0f
EA
321 $(INSTALL) -d $(PREFIX)$(TARGET_PREFIX)/lib
322 $(INSTALL) -d $(PREFIX)$(TARGET_PREFIX)/usr/bin
323 $(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
58bd16ab 324 $(PREFIX)$(TARGET_PREFIX)/lib
65680f69 325 cp -fa lib/*.so.* $(PREFIX)$(TARGET_PREFIX)/lib
58bd16ab 326 @if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
f605da2f 327 set -x -e; \
49f0dd0f 328 $(INSTALL) -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
58bd16ab 329 $(PREFIX)$(TARGET_PREFIX)/lib; \
96277cfc 330 fi;
e788a838
EA
331endif
332
871fdfa9 333install_target_utils:
6737908f 334ifeq ($(strip $(HAVE_SHARED)),y)
042768df 335 @$(MAKE) -C ldso/util ldd.target ldconfig.target #readelf.target
49f0dd0f
EA
336 $(INSTALL) -d $(PREFIX)$(TARGET_PREFIX)/etc;
337 $(INSTALL) -d $(PREFIX)$(TARGET_PREFIX)/sbin;
338 $(INSTALL) -d $(PREFIX)$(TARGET_PREFIX)/usr/bin;
339 $(INSTALL) -m 755 ldso/util/ldd.target $(PREFIX)$(TARGET_PREFIX)/usr/bin/ldd
340 $(INSTALL) -m 755 ldso/util/ldconfig.target $(PREFIX)$(TARGET_PREFIX)/sbin/ldconfig;
341 #$(INSTALL) -m 755 ldso/util/readelf.target $(PREFIX)$(TARGET_PREFIX)/usr/bin/readelf;
96277cfc 342endif
c386ddb4
MNI
343ifeq ($(strip $(UCLIBC_HAS_LOCALE)),y)
344 @$(MAKE) -C libc/misc/wchar iconv.target
49f0dd0f
EA
345 $(INSTALL) -d $(PREFIX)$(TARGET_PREFIX)/usr/bin;
346 $(INSTALL) -m 755 libc/misc/wchar/iconv.target $(PREFIX)$(TARGET_PREFIX)/usr/bin/iconv
c386ddb4 347endif
96277cfc 348
34436c09
EA
349finished2:
350 @echo
351 @echo Finished installing...
352 @echo
353
929f718b 354else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
6737908f
EA
355
356all: menuconfig
357
6737908f
EA
358# configuration
359# ---------------------------------------------------------------------------
3056fc1a 360extra/config/conf: buildconf
929f718b
EA
361 -@if [ ! -f .config ] ; then \
362 cp extra/Configs/Config.$(TARGET_ARCH).default .config; \
363 fi
364
3056fc1a
EA
365buildconf:
366 make -C extra/config conf
367
368extra/config/mconf: buildmconf
6737908f
EA
369 -@if [ ! -f .config ] ; then \
370 cp extra/Configs/Config.$(TARGET_ARCH).default .config; \
371 fi
34436c09 372
3056fc1a
EA
373buildmconf:
374 make -C extra/config ncurses mconf
375
6737908f 376menuconfig: extra/config/mconf
dd3fb0f8 377 $(RM) -r include/bits
49f0dd0f 378 $(INSTALL) -d include/bits
6737908f
EA
379 @./extra/config/mconf extra/Configs/Config.$(TARGET_ARCH)
380
381config: extra/config/conf
dd3fb0f8 382 $(RM) -r include/bits
49f0dd0f 383 $(INSTALL) -d include/bits
6737908f
EA
384 @./extra/config/conf extra/Configs/Config.$(TARGET_ARCH)
385
386oldconfig: extra/config/conf
dd3fb0f8 387 $(RM) -r include/bits
49f0dd0f 388 $(INSTALL) -d include/bits
6737908f
EA
389 @./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH)
390
391randconfig: extra/config/conf
dd3fb0f8 392 $(RM) -r include/bits
49f0dd0f 393 $(INSTALL) -d include/bits
6737908f
EA
394 @./extra/config/conf -r extra/Configs/Config.$(TARGET_ARCH)
395
396allyesconfig: extra/config/conf
dd3fb0f8 397 $(RM) -r include/bits
49f0dd0f 398 $(INSTALL) -d include/bits
6737908f
EA
399 @./extra/config/conf -y extra/Configs/Config.$(TARGET_ARCH)
400
401allnoconfig: extra/config/conf
dd3fb0f8 402 $(RM) -r include/bits
49f0dd0f 403 $(INSTALL) -d include/bits
6737908f
EA
404 @./extra/config/conf -n extra/Configs/Config.$(TARGET_ARCH)
405
406defconfig: extra/config/conf
dd3fb0f8 407 $(RM) -r include/bits
49f0dd0f 408 $(INSTALL) -d include/bits
6737908f
EA
409 @./extra/config/conf -d extra/Configs/Config.$(TARGET_ARCH)
410
411
412clean:
dd3fb0f8
EA
413 - find . \( -name \*.o -o -name \*.a -o -name \*.so -o -name core -o -name .\#\* \) -exec $(RM) {} \;
414 @$(RM) -r tmp lib include/bits libc/tmp _install
c784f765 415 $(MAKE) -C test clean
0a4aa6c3 416 $(MAKE) -C ldso clean
6c514226 417 $(MAKE) -C libc/misc/internals clean
c386ddb4 418 $(MAKE) -C libc/misc/wchar clean
b52e867b 419 $(MAKE) -C libc/unistd clean
cb546530 420 $(MAKE) -C libc/sysdeps/linux/common clean
2c35b786
EA
421 $(MAKE) -C extra/gcc-uClibc clean
422 $(MAKE) -C extra/locale clean
6c514226
EA
423 @set -e; \
424 for i in `(cd $(TOPDIR)/libc/sysdeps/linux/common/sys; ls *.h)` ; do \
dd3fb0f8 425 $(RM) include/sys/$$i; \
6c514226
EA
426 done; \
427 if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
428 for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
dd3fb0f8 429 $(RM) include/sys/$$i; \
6c514226
EA
430 done; \
431 fi;
dd3fb0f8 432 @$(RM) include/linux include/scsi include/asm
96749a76
EA
433 @if [ -d libc/sysdeps/linux/$(TARGET_ARCH) ]; then \
434 $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) clean; \
435 fi;
6737908f 436 @if [ "$(TARGET_ARCH)" = "mipsel" ]; then \
40633991 437 $(MAKE) -C libc/sysdeps/linux/mips clean; \
dd3fb0f8
EA
438 $(RM) ldso/ldso/mipsel; \
439 $(RM) libc/sysdeps/linux/mipsel; \
440 $(RM) libpthread/linuxthreads/sysdeps/mipsel; \
6c514226 441 fi;
f0da4aa1 442
6737908f 443distclean: clean
dd3fb0f8 444 $(RM) .config .config.old .config.cmd
dec2c57b 445 $(MAKE) -C extra clean
6737908f
EA
446
447release: distclean
c784f765 448 cd ..; \
dd3fb0f8 449 $(RM) -r uClibc-$(VERSION); \
49f0dd0f 450 cp -fa uClibc uClibc-$(VERSION); \
aa1a0cd1 451 find uClibc-$(VERSION)/ -type f \
dd3fb0f8 452 -name .\#* -exec $(RM) -r {} \; ; \
aa1a0cd1 453 find uClibc-$(VERSION)/ -type d \
dd3fb0f8 454 -name CVS -exec $(RM) -r {} \; ; \
c784f765 455 \
aa1a0cd1 456 tar -cvzf uClibc-$(VERSION).tar.gz uClibc-$(VERSION)/;
c784f765 457
929f718b 458endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
6737908f
EA
459
460.PHONY: dummy subdirs release distclean clean config oldconfig menuconfig
461
64bc6412 462
This page took 0.196075 seconds and 4 git commands to generate.