diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-31 18:20:21 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-31 18:20:21 +0000 |
commit | 6737908f74ff566748864548cf35bb1da8e64af6 (patch) | |
tree | 6eeafda4548f49d960e1b597c880a810a08a66f0 | |
parent | c734e7ca57f520e55236b21eaef16ac40099a378 (diff) |
Ok, this commit is _huge_ and its gonna change the world. I've
been working on a new config system on and off for about 6 months
now, but I've never been fully satisfied. Well, I'm finally am
happy with the new config system, so here it is. This completely
removes the old uClibc configuration system, and replaces it with
an entirely new system based on LinuxKernelConf, from
http://www.xs4all.nl/~zippel/lc/
As it turns out, Linus has just merged LinuxKernelConf into Linux
2.5.45, so it looks like I made the right choice.
I have thus far updated only x86. I'll be updating the other
architectures shortly.
-Erik
109 files changed, 19093 insertions, 518 deletions
diff --git a/.cvsignore b/.cvsignore index 19c5ad2af..49273e8e3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -9,3 +9,4 @@ lib Config _install build-stamp +.config* @@ -22,29 +22,27 @@ # other sundry sources. Files within this library are copyright by their # respective copyright holders. -#-------------------------------------------------------- -# -#There are a number of configurable options in "Config" -# -#-------------------------------------------------------- +#-------------------------------------------------------------- +# You shouldn't need to mess with anything beyond this point... +#-------------------------------------------------------------- +noconfig_targets := menuconfig config oldconfig randconfig \ + defconfig allyesconfig allnoconfig clean distclean \ + release tags TAGS TOPDIR=./ include Rules.mak DIRS = extra ldso libc libcrypt libresolv libutil libm libpthread -all: headers uClibc_config subdirs shared utils finished +ifdef include-config -Config: - @echo - @echo "You didn't read the README, did you... =)" - @echo "Choose a configuration file in extras/Config/ and then run" - @echo " ln -s ./extra/Configs/Config.<arch> ./Config" - @echo - @exit 1 +all: headers subdirs shared utils finished + +# In this section, we need .config +-include .config.cmd shared: -ifeq ($(strip $(HAVE_SHARED)),true) +ifeq ($(strip $(HAVE_SHARED)),y) @$(MAKE) -C libc shared @$(MAKE) -C ldso shared @$(MAKE) -C libcrypt shared @@ -67,7 +65,7 @@ finished: shared # Target for uClinux distro # romfs: -ifeq ($(strip $(HAVE_SHARED)),true) +ifeq ($(strip $(HAVE_SHARED)),y) install -d $(ROMFSDIR)/lib install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \ $(ROMFSDIR)/lib @@ -79,13 +77,18 @@ ifeq ($(strip $(HAVE_SHARED)),true) fi; endif -headers: dummy +include/bits/uClibc_config.h: .config + rm -rf include/bits + mkdir -p include/bits + @./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH) + +headers: include/bits/uClibc_config.h rm -f include/asm; - @if [ $(TARGET_ARCH) = "powerpc" ];then \ + @if [ "$(TARGET_ARCH)" = "powerpc" ];then \ ln -fs $(KERNEL_SOURCE)/include/asm-ppc include/asm; \ - elif [ $(TARGET_ARCH) = "mips" ];then \ + elif [ "$(TARGET_ARCH)" = "mips" ];then \ ln -fs $(KERNEL_SOURCE)/include/asm-mips include/asm; \ - elif [ $(TARGET_ARCH) = "mipsel" ];then \ + elif [ "$(TARGET_ARCH)" = "mipsel" ];then \ ln -fs $(KERNEL_SOURCE)/include/asm-mips include/asm; \ cd $(shell pwd)/libc/sysdeps/linux; \ ln -fs mips mipsel; \ @@ -93,10 +96,10 @@ headers: dummy ln -fs mips mipsel; \ cd $(shell pwd)/libpthread/linuxthreads/sysdeps; \ ln -fs mips mipsel; \ - elif [ $(TARGET_ARCH) = "cris" ];then \ + elif [ "$(TARGET_ARCH)" = "cris" ];then \ ln -fs $(KERNEL_SOURCE)/include/asm-cris include/asm; \ else \ - if [ $(HAS_MMU) != "true" ]; then \ + if [ "$(UCLIBC_HAS_MMU)" != "y" ]; then \ if [ -d $(KERNEL_SOURCE)/include/asm-$(TARGET_ARCH)nommu ] ; then \ ln -fs $(KERNEL_SOURCE)/include/asm-$(TARGET_ARCH)nommu include/asm;\ else \ @@ -110,16 +113,14 @@ headers: dummy set -e; \ echo " "; \ echo "The path '$(KERNEL_SOURCE)/include/asm' doesn't exist."; \ - echo "I bet you didn't set KERNEL_SOURCE, TARGET_ARCH or HAS_MMU in \`Config'"; \ - echo "correctly. Please edit \`Config' and fix these settings."; \ + echo "I bet you didn't set KERNEL_SOURCE, TARGET_ARCH or UCLIBC_HAS_MMU"; \ + echo "correctly when you configured uClibc. Please fix these settings."; \ echo " "; \ false; \ fi; rm -f include/linux include/scsi ln -fs $(KERNEL_SOURCE)/include/linux include/linux ln -fs $(KERNEL_SOURCE)/include/scsi include/scsi - rm -rf include/bits - mkdir -p include/bits @cd include/bits; \ set -e; \ for i in `ls ../../libc/sysdeps/linux/common/bits/*.h` ; do \ @@ -146,97 +147,6 @@ headers: dummy TOPDIR=. CC=$(CC) /bin/sh extra/scripts/gen_bits_syscall_h.sh > include/bits/sysnum.h $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) headers -uClibc_config: Makefile Config - @echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" > include/bits/uClibc_config.h - @echo "#if !defined __FEATURES_H && !defined __need_uClibc_config_h" >> include/bits/uClibc_config.h - @echo "#error Never include <bits/uClibc_config.h> directly; use <features.h> instead." >> include/bits/uClibc_config.h - @echo "#endif" >> include/bits/uClibc_config.h - @echo "#define __UCLIBC_MAJOR__ $(MAJOR_VERSION)" >> include/bits/uClibc_config.h - @echo "#define __UCLIBC_MINOR__ $(MINOR_VERSION)" >> include/bits/uClibc_config.h - @echo "#define __UCLIBC_SUBLEVEL__ $(SUBLEVEL)" >> include/bits/uClibc_config.h - @echo "#define linux 1" >> include/bits/uClibc_config.h - @echo "#define __linux__ 1" >> include/bits/uClibc_config.h - @if [ "$(INCLUDE_IPV6)" = "true" ] ; then \ - echo "#define __UCLIBC_HAS_IPV6__ 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "#undef __UCLIBC_HAS_IPV6__" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(HAS_MMU)" = "true" ] ; then \ - echo "#define __UCLIBC_HAS_MMU__ 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "For now we make the assumption that a linux system without an"; \ - echo "MMU must be uClinux, and must have a broken munmap (both"; \ - echo "assumptions are a bit dodgy, but can be changed in the future)."; \ - echo "#undef __UCLIBC_HAS_MMU__" >> include/bits/uClibc_config.h ; \ - echo "#define __UCLIBC_UCLINUX_BROKEN_MUNMAP__ 1" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(HAS_FLOATING_POINT)" = "true" ] ; then \ - echo "#define __UCLIBC_HAS_FLOATS__ 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "#undef __UCLIBC_HAS_FLOATS__" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(HAS_LOCALE)" = "true" ] ; then \ - echo "#define __UCLIBC_HAS_LOCALE__ 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "#undef __UCLIBC_HAS_LOCALE__" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(HAS_WCHAR)" = "true" ] ; then \ - echo "#define __UCLIBC_HAS_WCHAR__ 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "#undef __UCLIBC_HAS_WCHAR__" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(HAVE_ELF)" = "false" ] ; then \ - echo "#undef HAVE_ELF" >> include/bits/uClibc_config.h ; \ - else \ - echo "#define HAVE_ELF 1" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(HAVE_SHARED)" = "false" ] ; then \ - echo "#undef HAVE_SHARED" >> include/bits/uClibc_config.h ; \ - else \ - echo "#define HAVE_SHARED 1" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(TARGET_ARCH)" = "sh" ] ; then \ - echo "#define NO_UNDERSCORES 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "#undef NO_UNDERSCORES" >> include/bits/uClibc_config.h ; \ - fi - @if [ "$(INCLUDE_RPC)" = "true" ] ; then \ - echo "#define __UCLIBC_HAS_RPC__ 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "#undef __UCLIBC_HAS_RPC__" >> include/bits/uClibc_ |