]> Git Repo - uclibc-ng.git/blame - Makefile.in
- commentary typo fix
[uclibc-ng.git] / Makefile.in
CommitLineData
a80fc77b
PM
1# Makefile for uClibc
2#
3# Copyright (C) 2000-2005 Erik Andersen <[email protected]>
4#
5# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6#
7
8#--------------------------------------------------------------
9# You shouldn't need to mess with anything beyond this point...
10#--------------------------------------------------------------
d5e463c5 11noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
a80fc77b 12 defconfig allyesconfig allnoconfig clean distclean \
a2a58104 13 release dist tags help
a80fc77b 14
5fe51654 15include $(top_builddir)Rules.mak
94c41e72 16sub_headers := headers
5fe51654 17
f2420be7
BRF
18#suspicious_dependency:=include/bits
19
a80fc77b
PM
20ifeq ($(HAVE_DOT_CONFIG),y)
21
ad93127a 22all: pregen libs
a80fc77b
PM
23
24# In this section, we need .config
25-include .config.cmd
26
bde524e9 27include $(top_srcdir)ldso/Makefile.in
0a7b9d5d
PM
28include $(top_srcdir)libcrypt/Makefile.in
29include $(top_srcdir)libintl/Makefile.in
30include $(top_srcdir)libm/Makefile.in
31include $(top_srcdir)libnsl/Makefile.in
32include $(top_srcdir)libresolv/Makefile.in
0a7b9d5d
PM
33include $(top_srcdir)libutil/Makefile.in
34include $(top_srcdir)libpthread/Makefile.in
bc87181a 35include $(top_srcdir)librt/Makefile.in
44d99019 36include $(top_srcdir)extra/locale/Makefile.in
0a7b9d5d 37
034b372c
PM
38# last included to catch all the objects added by others (locales/threads)
39include $(top_srcdir)libc/Makefile.in
40
f2420be7
BRF
41# If the .config changes then we have to make sure that our includes are
42# updated properly. This would normally work by saying that the headers
43# have uClibc_config.h as prerequisite but since we _symlink_ the headers
44# and do not (?) want to rely on 'make -L' we better update them right here,
45# on spot to save us from alot of hazzle.
46include/bits/uClibc_config.h: extra/config/conf .config $(top_srcdir)extra/scripts/conf-header.sh | include/bits
47 @$(disp_gen)
48 @#superfluous: $(Q)$(INSTALL) -d $(dir $@)
49 $(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
50 $(Q)$(top_srcdir)extra/scripts/conf-header.sh .config > $@
51 $(Q)$(MAKE) headers-y
a80fc77b 52
47a8b207
PK
53# For the moment, we have to keep re-running this target
54# because the fix includes scripts rely on pre-processers
55# in order to generate the headers correctly :(. That
56# means we can't use the $(HOSTCC) in order to get the
a80fc77b 57# correct output.
010301e9 58ifeq ($(ARCH_USE_MMU),y)
47a8b207 59export header_extra_args =
a80fc77b
PM
60else
61export header_extra_args = -n
62endif
695fcdc1
MF
63HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
64HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
999f1270
DV
65HEADERS_BITS_SUBARCH :=
66ifneq ($(TARGET_SUBARCH),)
67HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
68endif
9be49589 69HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
f2420be7
BRF
70
71HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
72HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h))
73HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
74
75ALL_HEADERS_COMMON := include/fpu_control.h include/dl-osinfo.h \
76 include/hp-timing.h
77ALL_HEADERS_BITS_COMMON := $(addprefix include/bits/,$(HEADERS_BITS_COMMON))
78ALL_HEADERS_BITS_ARCH := $(addprefix include/bits/,$(HEADERS_BITS_ARCH))
79ifneq ($(TARGET_SUBARCH),)
80ALL_HEADERS_BITS_SUBARCH := $(addprefix include/bits/,$(HEADERS_BITS_SUBARCH))
81else
82ALL_HEADERS_BITS_SUBARCH :=
86124389 83endif
f2420be7
BRF
84ALL_HEADERS_SYS_COMMON := $(addprefix include/sys/,$(HEADERS_SYS_COMMON))
85ALL_HEADERS_SYS_ARCH := $(addprefix include/sys/,$(HEADERS_SYS_ARCH))
86
87target-headers-sysdep := \
88 $(ALL_HEADERS_COMMON) \
89 $(ALL_HEADERS_BITS_COMMON) \
90 $(ALL_HEADERS_BITS_ARCH) \
91 $(ALL_HEADERS_BITS_SUBARCH) \
92 $(ALL_HEADERS_SYS_COMMON) \
93 $(ALL_HEADERS_SYS_ARCH)
94
95include/fpu_control.h:
96 @$(disp_ln)
97 $(Q)[ -r libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
98 $(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
99 $(LN) -fs ../libc/sysdeps/linux/common/$(@F) $@
100
101include/dl-osinfo.h include/hp-timing.h:
102 $(do_ln) ../libc/sysdeps/linux/common/$(@F) $@
103
104$(ALL_HEADERS_BITS_COMMON):
105 $(do_ln) ../../libc/sysdeps/linux/common/bits/$(@F) $@
106
107$(ALL_HEADERS_BITS_ARCH):
108 $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
109
110ifneq ($(TARGET_SUBARCH),)
111$(ALL_HEADERS_BITS_SUBARCH):
112 $(do_ln) ../../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
113endif
114
115ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),)
116$(ALL_HEADERS_SYS_COMMON):
117 $(do_ln) ../../libc/sysdeps/linux/common/sys/$(@F) $@
118endif
119
120ifneq ($(strip $(ALL_HEADERS_SYS_ARCH)),)
121$(ALL_HEADERS_SYS_ARCH):
122 $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
123endif
124
125$(target-headers-sysdep): | include/bits
126
127sysdep_common_headers-clean:
128 $(RM) $(ALL_HEADERS_COMMON)
129headers_clean-y += sysdep_common_headers-clean
130
131# The headers. Arch specific headers are specified via ARCH_HEADERS in
132# libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
133# libc/sysdeps/linux/Makefile.commonarch to headers-y
134headers-y += $(target-headers-sysdep)
135
136headers: include/bits/uClibc_config.h
86124389 137
f2420be7 138pregen: include/bits/sysnum.h headers
ba19233f 139 $(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
86124389 140
f2420be7
BRF
141include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
142 $(Q)$(INSTALL) -d $(@D)
143 @$(disp_gen)
144 $(Q)set -e; \
695fcdc1 145 cd $(top_builddir); \
adcf10ad
MF
146 tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
147 [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
08e377aa 148 KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
adcf10ad
MF
149 if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
150 $(RM) $$tmp; \
a80fc77b 151 else \
adcf10ad 152 mv -f $$tmp include/bits/sysnum.h; \
a80fc77b 153 fi
a80fc77b 154
9be49589
CA
155$(LOCAL_INSTALL_PATH):
156 $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
157 DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
158 HOSTCC="$(HOSTCC)" \
159 install_kernel_headers
160 $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
161 DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
162 HOSTCC="$(HOSTCC)" \
163 install_dev
a80fc77b 164
ad93127a 165install: install_runtime install_dev
a80fc77b
PM
166
167
168RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib)
169
8602e0ef
DV
170$(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
171 $(hcompile.u)
172
aea115e9
DV
173# Installs kernel header files (linux/*, asm/*, asm-generic/*).
174install_kernel_headers: headers
175 top_builddir=$(top_builddir) \
176 $(top_srcdir)extra/scripts/install_kernel_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
177
a80fc77b 178# Installs header files.
8602e0ef 179install_headers: headers $(top_builddir)extra/scripts/unifdef
a80fc77b 180 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
8602e0ef
DV
181 top_builddir=$(top_builddir) \
182 $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
f12fe235 183 printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \
523e1378 184 $(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
06969fa4
EA
185 echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
186 $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
237277e9 187 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h
3115acd5 188 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/_lfs_64.h
86450311 189 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h
477fd46e
PM
190 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_sigaction.h
191 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_stat.h
a80fc77b
PM
192ifneq ($(UCLIBC_HAS_FLOATS),y)
193 # Remove floating point related headers since float support is disabled.
194 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h
195 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fpu_control.h
196 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ieee754.h
197 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h
198 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h
199 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h
200endif
bce5bba7
BRF
201ifneq ($(UCLIBC_HAS_FENV),y)
202 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \
203 $(PREFIX)$(DEVEL_PREFIX)include/bits/fenv.h \
204 $(PREFIX)$(DEVEL_PREFIX)include/bits/fenvinline.h
205endif
a80fc77b
PM
206ifneq ($(UCLIBC_HAS_WCHAR),y)
207 # Remove wide char headers since wide char support is disabled.
208 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h
209 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wchar.h
210endif
211ifneq ($(UCLIBC_HAS_LOCALE),y)
212 # Remove iconv header since locale support is disabled.
213 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/iconv.h
214endif
215ifneq ($(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF),y)
216 # Remove printf header since custom print specifier support is disabled.
217 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/printf.h
218endif
219ifneq ($(UCLIBC_HAS_XLOCALE),y)
220 # Remove xlocale header since extended locale support is disabled.
221 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/xlocale.h
222endif
223ifneq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y)
224 # Remove libintl header since gettext support is disabled.
225 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/libintl.h
226endif
227ifneq ($(UCLIBC_HAS_REGEX),y)
228 # Remove regex headers since regex support is disabled.
229 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regex.h
230 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h
231endif
232ifneq ($(UCLIBC_HAS_WORDEXP),y)
233 # Remove wordexp header since wordexp support is disabled.
234 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wordexp.h
235endif
236ifneq ($(UCLIBC_HAS_FTW),y)
237 # Remove ftw header since ftw support is disabled.
238 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ftw.h
239endif
240ifneq ($(UCLIBC_HAS_GLOB),y)
241 # Remove glob header since glob support is disabled.
242 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/glob.h
243endif
244ifneq ($(UCLIBC_HAS_GNU_GETOPT),y)
0e4c4d11 245ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
a80fc77b
PM
246 # Remove getopt header since gnu getopt support is disabled.
247 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/getopt.h
248endif
0e4c4d11 249endif
3fdaf2bb 250ifneq ($(UCLIBC_HAS_SHADOW),y)
a80fc77b
PM
251 # Remove shadow header since shadow password support is disabled.
252 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/shadow.h
253endif
254ifneq ($(PTHREADS_DEBUG_SUPPORT),y)
255 # Remove thread_db header since thread debug support is disabled.
256 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/thread_db.h
257endif
258ifneq ($(UCLIBC_HAS_THREADS),y)
259 # Remove pthread headers since thread support is disabled.
260 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h
261 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
262 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h
312faf91 263endif
640cb909
BS
264ifneq ($(HAVE_SHARED),y)
265 # Remove dlfcn header if we don't have shared libraries.
266 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dlfcn.h
267 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/dlfcn.h
268endif
312faf91
SH
269ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
270 # Remove this as it is only used internally.
271 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h
a80fc77b 272endif
4cc4b304
BRF
273ifneq ($(UCLIBC_HAS_GNU_ERROR),y)
274 # Remove error.h upon request
275 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/error.h
276endif
277ifneq ($(UCLIBC_HAS_BSD_ERR),y)
278 # Remove err.h upon request
279 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/err.h
280endif
281ifneq ($(UCLIBC_SUSV3_LEGACY),y)
282 # Remove timeb.h since the LEGACY ftime() was disabled upon request
283 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h
284endif
285ifneq ($(UCLIBC_HAS_EPOLL),y)
286 # Remove epoll.h since epoll_*() were disabled upon request
287 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/epoll.h
288endif
289ifneq ($(UCLIBC_HAS_XATTR),y)
290 # Remove xattr.h since extended attributes were disabled upon request
291 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/xattr.h
292endif
4cc4b304
BRF
293ifneq ($(UCLIBC_HAS_PTY),y)
294 # Remove pty.h since PTY support was disabled upon request
295 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/pty.h
296endif
297ifneq ($(UCLIBC_LINUX_SPECIFIC),y)
298 # Remove linux-specific headers as requested
299 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/inotify.h
300 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/perm.h
301 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/personality.h
302endif
303ifneq ($(UCLIBC_SV4_DEPRECATED),y)
304 # Remove ustat.h since deprecated SV4 support was disabled upon request
305 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ustat.h
306 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h
307 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h
308endif
309ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_ADVANCED_REALTIME),)
310 # Remove SUSv-realtime related message-queue headers upon request
311 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h
312 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/mqueue.h
313 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h
314endif
315ifneq ($(UCLIBC_HAS_REALTIME),y)
316 # Remove SUSv-realtime related headers upon request
317 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sched.h
318 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sched.h
319 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sched.h
320 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
321 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/semaphore.h
322 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/semaphore.h
323endif
324ifneq ($(UCLIBC_HAS_SOCKET),y)
325 # Remove socket related headers upon request
326 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socket.h
327 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/socket.h
328 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socketvar.h
329endif
07beb34d
BRF
330ifneq ($(UCLIBC_HAS_CRYPT),y)
331 # Remove crypt.h since libcrypt was disabled upon request
332 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/crypt.h
333endif
7253e710
RW
334ifneq ($(UCLIBC_SUPPORT_AI_ADDRCONFIG),y)
335 # Remove ifaddrs.h since the corresponding functionality is disabled
336 $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ifaddrs.h
337endif
a80fc77b
PM
338
339# Installs development library links.
340install_dev: install_headers
341 $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
342 -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
343ifeq ($(HAVE_SHARED),y)
344 for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
345 sed -e 's/lib\///'` ; do \
346 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \
347 $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \
348 done
349 if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
350 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
47a8b207
PK
351 sed -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME):' \
352 -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME):' \
353 -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \
354 $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
a80fc77b 355 fi
6ba0493b
PM
356ifeq ($(UCLIBC_HAS_THREADS),y)
357ifneq ($(LINUXTHREADS_OLD),y)
358 if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \
359 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
360 cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
361 echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \
362 >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
363 fi
364endif
365endif
a80fc77b
PM
366ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
367 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
368 $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
369endif
26cb4c6f 370ifeq ($(DOPIC),y)
a80fc77b
PM
371# # If we build shared libraries then the static libs are PIC...
372# # Make _pic.a symlinks to make mklibs.py and similar tools happy.
373 if [ -d lib ] ; then \
374 for i in `find lib/ -type f -name 'lib*.a' | sed -e 's/lib\///'` ; do \
375 $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \
376 | sed -e 's/\.a$$/_pic.a/'`; \
377 done ; \
378 fi
379endif
26cb4c6f 380endif
e1d59aed 381ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
808694e8
MF
382 for file in lib/lib*.gdb; do \
383 if test -f $$file; then \
384 $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)lib; \
385 $(INSTALL) -m 755 `echo $$file | sed 's/\.gdb$$//'` \
386 $(PREFIX)$(DEVEL_PREFIX)lib; \
387 fi; \
388 done
389endif
a80fc77b
PM
390
391# Installs run-time libraries
392install_runtime:
393ifeq ($(HAVE_SHARED),y)
394 $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
6bc45b2d 395 $(INSTALL) -m 644 lib/lib*-$(VERSION).so \
a80fc77b 396 $(PREFIX)$(RUNTIME_PREFIX)lib
3abe19e3 397 cd lib && $(TAR) -cf - *.so.* | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib
6bc45b2d 398 @if [ -x lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
47a8b207 399 set -e; \
a80fc77b 400 $(SHELL_SET_X); \
6bc45b2d 401 $(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \
47a8b207 402 $(PREFIX)$(RUNTIME_PREFIX)lib; \
a80fc77b
PM
403 fi
404endif
405
406utils:
02ae0a4e 407 $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils
a80fc77b
PM
408
409# Installs helper applications, such as 'ldd' and 'ldconfig'
410install_utils: utils
eddd4169 411 $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
a80fc77b 412
a80fc77b
PM
413else # ifeq ($(HAVE_DOT_CONFIG),y)
414
415all: menuconfig
416
5a7a7164
MF
417headers:
418 @echo "Need to make a config file first, run: make menuconfig"
419 @false
420
421endif # ifeq ($(HAVE_DOT_CONFIG),y)
422
611a59f6 423include/bits:
f2420be7
BRF
424 @$(disp_mkdir)
425 $(Q)$(INSTALL) -d $@
611a59f6 426
a80fc77b
PM
427# configuration
428# ---------------------------------------------------------------------------
f2420be7 429extra/config/conf extra/config/mconf: $(suspicious_dependency)
f50cd166 430 $(Q)$(MAKE) -C extra/config $(notdir $@)
a80fc77b 431
f2420be7 432menuconfig: extra/config/mconf $(suspicious_dependency)
94c41e72 433 $(Q)./extra/config/mconf extra/Configs/Config.in
a80fc77b 434
f2420be7 435config: extra/config/conf $(suspicious_dependency)
0da794d6 436 $(Q)./extra/config/conf extra/Configs/Config.in
a80fc77b 437
f2420be7 438oldconfig: extra/config/conf $(suspicious_dependency)
0da794d6 439 $(Q)./extra/config/conf -o extra/Configs/Config.in
a80fc77b 440
f2420be7 441silentoldconfig: extra/config/conf $(suspicious_dependency)
d5e463c5
MF
442 $(Q)./extra/config/conf -s extra/Configs/Config.in
443
f2420be7 444randconfig: extra/config/conf $(suspicious_dependency)
0da794d6 445 $(Q)./extra/config/conf -r extra/Configs/Config.in
a80fc77b 446
f2420be7 447allyesconfig: extra/config/conf $(suspicious_dependency)
0da794d6 448 $(Q)./extra/config/conf -y extra/Configs/Config.in
a80fc77b
PM
449 sed -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config
450 sed -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config
451 sed -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config
452 sed -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config
453 sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
0da794d6 454 $(Q)./extra/config/conf -o extra/Configs/Config.in
a80fc77b 455
f2420be7 456allnoconfig: extra/config/conf $(suspicious_dependency)
0da794d6 457 $(Q)./extra/config/conf -n extra/Configs/Config.in
a80fc77b 458
f2420be7 459defconfig: extra/config/conf $(suspicious_dependency)
583c765a
BRF
460 $(Q)./extra/config/conf -d extra/Configs/Config.in \
461 -D extra/Configs/defconfigs/$(ARCH)
a80fc77b
PM
462
463clean:
0da794d6 464 $(Q)$(RM) -r lib include/bits
2e91f39c
BRF
465 $(RM) ldso/*/*.a libpthread/*/*.a libc/*.a libcrypt/*.a libintl/*.a \
466 libm/*.a libnsl/*.a libpthread/*.a libresolv/*.a librt/*.a \
9be49589
CA
467 libutil/*.a lib/*.a \
468 include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
b502511c 469 $(MAKE) objclean-y headers_clean-y
afc2511f 470 $(MAKE) -s -C test clean
eddd4169 471 $(MAKE) -C utils utils_clean
a80fc77b 472 @set -e; \
358043ff 473 for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
a80fc77b
PM
474 $(RM) include/sys/$$i; \
475 done; \
476 if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
477 for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
478 $(RM) include/sys/$$i; \
479 done; \
480 fi
481 @$(RM) include/linux include/asm*
a0adf1fe 482 $(RM) $(top_builddir)extra/scripts/unifdef
9be49589 483 $(RM) -r $(LOCAL_INSTALL_PATH)
a80fc77b
PM
484
485distclean: clean
20ef4ea0 486 -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
a80fc77b 487 $(RM) .config .config.old .config.cmd
fe76834d 488 $(RM) extra/locale/*.tgz
611a59f6 489 $(MAKE) -C extra/config distclean
a80fc77b 490
d8168686 491dist release:
3c4bcdcf 492 $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2
d8168686 493 svn -q export . ../uClibc-$(VERSION)
3c4bcdcf
MF
494 $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
495 du -b ../uClibc-$(VERSION).tar.bz2
a80fc77b 496
be56824c 497test check: test_compile
e471910a 498 $(Q)$(MAKE) -C test
9be49589
CA
499
500test_compile: $(LOCAL_INSTALL_PATH)
501 $(Q)$(MAKE) -C test compile
This page took 0.206986 seconds and 4 git commands to generate.