diff options
| -rw-r--r-- | Makefile.in | 67 | ||||
| -rw-r--r-- | README | 4 | ||||
| -rwxr-xr-x | extra/scripts/conf-header.sh | 27 |
3 files changed, 73 insertions, 25 deletions
diff --git a/Makefile.in b/Makefile.in index 268f480b9..69a2155da 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,7 +8,7 @@ #-------------------------------------------------------------- # You shouldn't need to mess with anything beyond this point... #-------------------------------------------------------------- -noconfig_targets := menuconfig config oldconfig randconfig \ +noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \ defconfig allyesconfig allnoconfig clean distclean \ release dist tags @@ -37,8 +37,10 @@ include $(top_srcdir)extra/locale/Makefile.in include $(top_srcdir)libc/Makefile.in include/bits/uClibc_config.h: extra/config/conf .config - $(INSTALL) -d $(dir $@) - @$< -o $(top_srcdir)extra/Configs/Config.in + $(Q)$(INSTALL) -d $(dir $@) + $(Q)@$< -o $(top_srcdir)extra/Configs/Config.in + $(top_srcdir)extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h + # For the moment, we have to keep re-running this target # because the fix includes scripts rely on pre-processers @@ -52,7 +54,8 @@ export header_extra_args = -n endif HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h)) HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h)) -HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH),$(HEADERS_BITS_COMMON)) +HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h)) +HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH),$(HEADERS_BITS_COMMON)) headers_sysnum: $(Q)\ @@ -72,7 +75,7 @@ headers_bootstrap: include/bits/uClibc_config.h $(Q)$(MAKE) headers-y $(Q)\ set -e; \ - if [ -f libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h ] ; then \ + if [ -e libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h ] ; then \ $(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h include/ ; \ else \ $(LN) -fs ../libc/sysdeps/linux/common/fpu_control.h include/ ; \ @@ -88,6 +91,9 @@ headers_bootstrap: include/bits/uClibc_config.h done; \ for i in $(HEADERS_BITS_ARCH) ; do \ $(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$$i .; \ + done; \ + for i in $(HEADERS_BITS_SUBARCH) ; do \ + $(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$$i .; \ done $(Q)\ cd include/sys; \ @@ -128,7 +134,7 @@ install: install_runtime install_dev RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib) # Installs header files. -install_headers: +install_headers: headers $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \ $(TAR) -chf - -X tar_exclude include \ @@ -136,6 +142,8 @@ install_headers: rm -f tar_exclude printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \ $(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h + echo '/* Dont use _syscall#() macros; use the syscall() function */' > \ + $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/_lfs_64.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h @@ -150,6 +158,11 @@ ifneq ($(UCLIBC_HAS_FLOATS),y) $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h endif +ifneq ($(UCLIBC_HAS_FENV),y) + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \ + $(PREFIX)$(DEVEL_PREFIX)include/bits/fenv.h \ + $(PREFIX)$(DEVEL_PREFIX)include/bits/fenvinline.h +endif ifneq ($(UCLIBC_HAS_WCHAR),y) # Remove wide char headers since wide char support is disabled. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h @@ -208,6 +221,11 @@ ifneq ($(UCLIBC_HAS_THREADS),y) $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h endif +ifneq ($(HAVE_SHARED),y) + # Remove dlfcn header if we don't have shared libraries. + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dlfcn.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/dlfcn.h +endif ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) # Remove this as it is only used internally. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h @@ -301,24 +319,30 @@ headers: endif # ifeq ($(HAVE_DOT_CONFIG),y) +include/bits: + $(INSTALL) -d include/bits + # configuration # --------------------------------------------------------------------------- -extra/config/conf extra/config/mconf: - $(MAKE) -C extra/config $(notdir $@) +extra/config/conf extra/config/mconf: include/bits + $(Q)$(MAKE) -C extra/config $(notdir $@) -menuconfig: extra/config/mconf +menuconfig: extra/config/mconf include/bits $(Q)./extra/config/mconf extra/Configs/Config.in -config: extra/config/conf +config: extra/config/conf include/bits $(Q)./extra/config/conf extra/Configs/Config.in -oldconfig: extra/config/conf +oldconfig: extra/config/conf include/bits $(Q)./extra/config/conf -o extra/Configs/Config.in -randconfig: extra/config/conf +silentoldconfig: extra/config/conf include/bits + $(Q)./extra/config/conf -s extra/Configs/Config.in + +randconfig: extra/config/conf include/bits $(Q)./extra/config/conf -r extra/Configs/Config.in -allyesconfig: extra/config/conf +allyesconfig: extra/config/conf include/bits $(Q)./extra/config/conf -y extra/Configs/Config.in sed -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config sed -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config @@ -327,18 +351,17 @@ allyesconfig: extra/config/conf sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config $(Q)./extra/config/conf -o extra/Configs/Config.in -allnoconfig: extra/config/conf +allnoconfig: extra/config/conf include/bits $(Q)./extra/config/conf -n extra/Configs/Config.in -defconfig: extra/config/conf +defconfig: extra/config/conf include/bits $(Q)./extra/config/conf -d extra/Configs/Config.in clean: $(Q)$(RM) -r lib include/bits $(RM) lib*/*.a ldso/*/*.a libpthread/*/*.a $(RM) include/fpu_control.h include/dl-osinfo.h include/hp-timing.h - $(MAKE) -C extra/locale locale_clean - $(MAKE) headers_clean-y + $(MAKE) objclean-y headers_clean-y $(MAKE) -s -C test clean $(MAKE) -C utils utils_clean @set -e; \ @@ -351,20 +374,18 @@ clean: done; \ fi @$(RM) include/linux include/asm* - -find . \( -name \*.o -o -name \*.os -o -name \*.oS \) -exec $(RM) {} \; distclean: clean -find . \( -name core -o -name \*.orig -o -name \*~ \) -exec $(RM) {} \; $(RM) .config .config.old .config.cmd $(RM) extra/locale/*.tgz - $(MAKE) -C extra/config config_clean + $(MAKE) -C extra/config distclean dist release: - $(MAKE) -s distclean - $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.gz + $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2 svn -q export . ../uClibc-$(VERSION) - $(TAR) czf ../uClibc-$(VERSION).tar.gz -C .. uClibc-$(VERSION) - du -b ../uClibc-$(VERSION).tar.gz + $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION) + du -b ../uClibc-$(VERSION).tar.bz2 test check: $(Q)$(MAKE) -C test @@ -21,7 +21,7 @@ example, that 12 Terabytes will be Network Attached Storage and you plan to burn Linux into the system's firmware... uClibc is maintained by Erik Andersen and is licensed under the -GNU LIBRARY GENERAL PUBLIC LICENSE. This license allows you to +GNU LESSER GENERAL PUBLIC LICENSE. This license allows you to make closed source commercial applications using an unmodified version of uClibc (Please consider sharing some of the money you make ;-). You do not need to give away all your source code just @@ -44,7 +44,7 @@ Additional information (recent releases, FAQ, mailing list, bugs, etc.) can be found at http://www.uclibc.org/. uClibc may be freely modified and distributed under the terms of -the GNU Library General Public License, which can be found in the +the GNU Lesser General Public License, which can be found in the file COPYING.LIB. Please Note: diff --git a/extra/scripts/conf-header.sh b/extra/scripts/conf-header.sh new file mode 100755 index 000000000..90dfa999a --- /dev/null +++ b/extra/scripts/conf-header.sh @@ -0,0 +1,27 @@ +#!/bin/sh -e + +# Turn .config into a header file + +if [ -z "$1" ] ; then + echo "Usage: conf-header.sh <.config>" + exit 1 +fi + +cat <<EOF +#if !defined __FEATURES_H && !defined __need_uClibc_config_h +# error Never include <bits/uClibc_config.h> directly; use <features.h> instead +#endif + +#define __UCLIBC_MAJOR__ ${MAJOR_VERSION} +#define __UCLIBC_MINOR__ ${MINOR_VERSION} +#define __UCLIBC_SUBLEVEL__ ${SUBLEVEL} +EOF + +exec \ +sed \ + -e '/^#$/d' \ + -e '/^[^#]/s:^\([^=]*\)=\(.*\):#define __\1__ \2:' \ + -e '/^#define /s: y$: 1:' \ + -e '/^# .* is not set$/s:^# \(.*\) is not set$:#undef __\1__:' \ + -e 's:^# \(.*\)$:/* \1 */:' \ + $1 |
