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