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