TOPDIR=./
include Rules.mak
-DIRS = extra misc pwd_grp stdio string termios inet signal stdlib sysdeps unistd libcrypt libutil libm
-
-ifeq ($(strip $(HAS_MMU)),true)
- DO_SHARED=shared
-endif
-
-all: halfclean headers uClibc_config.h subdirs $(LIBNAME) $(DO_SHARED) done
-
-$(LIBNAME): subdirs
- $(CROSS)ranlib $(LIBNAME)
-
-shared: $(LIBNAME)
- @rm -rf tmp
- @mkdir tmp
- @$(MAKE) -C ld.so-1 ldso
- @(cd tmp; CC=$(CC) /bin/sh ../extra/scripts/get-needed-libgcc-objects.sh)
- if [ -s ./tmp/libgcc-need.a ] ; then \
- $(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
- -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
- ./$(LIBNAME) ./tmp/libgcc-need.a \
- $(LDSO) ; \
- else \
- $(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
- -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
- ./$(LIBNAME) $(LDSO) ; \
- fi
- @rm -rf tmp
- cp -a $(SHARED_FULLNAME) lib;
- (cd lib; ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME));
+DIRS = extra ldso libc libcrypt libutil libm
+
+all: headers uClibc_config.h subdirs $(DO_SHARED) done
+
+shared:
+ @$(MAKE) -C libc shared
+ @$(MAKE) -C ldso shared
+ @$(MAKE) -C ldso/libdl shared
@$(MAKE) -C libcrypt shared
@$(MAKE) -C libutil shared
@$(MAKE) -C libm shared
- @$(MAKE) -C ld.so-1
-done: $(LIBNAME) $(DO_SHARED)
+done: $(DO_SHARED)
@echo
@echo Finally finished compiling...
@echo
-halfclean:
- @rm -f $(LIBNAME) crt0.o uClibc_config.h
- @rm -f $(SHARED_FULLNAME) $(SHARED_MAJORNAME) uClibc-0.* libc.so*
-
headers: dummy
@rm -f include/asm include/linux include/bits
@ln -s $(KERNEL_SOURCE)/include/asm include/asm
sleep 10; \
fi;
@ln -s $(KERNEL_SOURCE)/include/linux include/linux
- @ln -s ../sysdeps/linux/$(TARGET_ARCH)/bits include/bits
- @ln -sf ../../../../uClibc_config.h sysdeps/linux/$(TARGET_ARCH)/bits/uClibc_config.h
-
-
-tags:
- ctags -R
-
-clean: subdirs_clean halfclean
- @rm -rf tmp
- rm -f include/asm include/linux include/bits
- @$(MAKE) -C ld.so-1 clean
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS) test)
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-$(patsubst %, _dirclean_%, $(DIRS) test) : dummy
- $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-
-install: install_runtime install_dev
-
-# Installs shared library
-install_runtime:
- install -d $(INSTALL_DIR)/lib
- cp -fa lib/* $(INSTALL_DIR)/lib;
-
-# Installs development library and headers
-# This is done with the assumption that it can blow away anything
-# in $(INSTALL_DIR)/include. Probably true only if you're using
-# a packaging system.
-install_dev:
- install -d $(INSTALL_DIR)/include
- install -d $(INSTALL_DIR)/include/bits
- rm -f $(INSTALL_DIR)/include/asm
- rm -f $(INSTALL_DIR)/include/linux
- ln -s $(KERNEL_SOURCE)/include/asm $(INSTALL_DIR)/include/asm
- ln -s $(KERNEL_SOURCE)/include/linux $(INSTALL_DIR)/include/linux
- find include/ -type f -depth -not -path "*CVS*" -exec install -D -m 644 {} $(INSTALL_DIR)/'{}' ';'
- find include/bits/ -type f -depth -not -path "*CVS*" -exec install -D -m 644 {} $(INSTALL_DIR)/'{}' ';'
- install -m 644 include/bits/uClibc_config.h $(INSTALL_DIR)/include/bits/
- install -d $(INSTALL_DIR)/lib
- rm -f $(INSTALL_DIR)/lib/$(LIBNAME)
- install -m 644 $(LIBNAME) $(INSTALL_DIR)/lib/
- @if [ -f crt0.o ] ; then install -m 644 crt0.o $(INSTALL_DIR)/lib/; fi
- install -d $(INSTALL_DIR)/bin
- $(MAKE) -C extra/gcc-uClibc install
+ @ln -s ../libc/sysdeps/linux/$(TARGET_ARCH)/bits include/bits
+ (cd include/bits; ln -sf ../../../../../uClibc_config.h uClibc_config.h)
uClibc_config.h: Config
@echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" > uClibc_config.h
echo "#undef __UCLIBC_HAS_RPC__" >> uClibc_config.h ; \
fi
+subdirs: $(patsubst %, _dir_%, $(DIRS))
+
+$(patsubst %, _dir_%, $(DIRS)) : dummy
+ $(MAKE) -C $(patsubst _dir_%, %, $@)
+
+tags:
+ ctags -R
+
+install: install_runtime install_dev
+
+# Installs shared library
+install_runtime:
+ install -d $(INSTALL_DIR)/lib
+ cp -fa lib/* $(INSTALL_DIR)/lib;
+
+# Installs development library and headers
+# This is done with the assumption that it can blow away anything
+# in $(INSTALL_DIR)/include. Probably true only if you're using
+# a packaging system.
+install_dev:
+ install -d $(INSTALL_DIR)/include
+ install -d $(INSTALL_DIR)/include/bits
+ rm -f $(INSTALL_DIR)/include/asm
+ rm -f $(INSTALL_DIR)/include/linux
+ ln -s $(KERNEL_SOURCE)/include/asm $(INSTALL_DIR)/include/asm
+ ln -s $(KERNEL_SOURCE)/include/linux $(INSTALL_DIR)/include/linux
+ find include/ -type f -depth -not -path "*CVS*" -exec install \
+ -D -m 644 {} $(INSTALL_DIR)/'{}' ';'
+ find include/bits/ -type f -depth -not -path "*CVS*" -exec install \
+ -D -m 644 {} $(INSTALL_DIR)/'{}' ';'
+ install -m 644 include/bits/uClibc_config.h $(INSTALL_DIR)/include/bits/
+ $(MAKE) -C extra/gcc-uClibc install
+
+clean:
+ @rm -rf tmp lib
+ rm -f include/asm include/linux include/bits uClibc_config.h
+ - find . \( -name \*.o -o -name \*.a -o -name \*.so -o -name core \) -exec rm -f {} \;
+
.PHONY: dummy subdirs
SHARED_FULLNAME=libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION)
UCLIBC_LDSO=ld-uclibc.so.$(MAJOR_VERSION)
+LIBC=$(TOPDIR)libc/libc.a
BUILDTIME = $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g')
-LDSO_PRESENT=$(strip $(shell cd $(TOPDIR)/ld.so-1/d-link; ls -d $(TARGET_ARCH) 2>/dev/null))
+ifeq ($(strip $(HAS_MMU)),true)
+ DO_SHARED=shared
+endif
+
+LDSO_PRESENT=$(strip $(shell cd $(TOPDIR)/ldso/d-link; ls -d $(TARGET_ARCH) 2>/dev/null))
ifeq ($(NATIVE_ARCH), $(TARGET_ARCH))
SYSTEM_LDSO=$(shell ldd `which $(CC)` | sed -ne /ld/p | sed -e s/\ =.*//g)
endif
ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
- LDSO=ld.so-1/d-link/$(UCLIBC_LDSO)
+ LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO)
else
LDSO=$(SYSTEM_LDSO)
endif
-
# It turns out the currently, function-sections causes ldelf2flt to segfault.
static char *rpath_link[] = {
"-Wl,-rpath-link,"UCLIBC_INSTALL_DIR"lib",
- "-Wl,-rpath-link,"UCLIBC_BUILD_DIR
+ "-Wl,-rpath-link,"UCLIBC_BUILD_DIR"lib"
};
static char *rpath[] = {
"-Wl,-rpath,"UCLIBC_INSTALL_DIR"lib",
- "-Wl,-rpath,"UCLIBC_BUILD_DIR
+ "-Wl,-rpath,"UCLIBC_BUILD_DIR"lib"
};
static char *uClibc_inc[] = {
static char *lib_path[] = {
"-L"UCLIBC_INSTALL_DIR"lib",
- "-L"UCLIBC_BUILD_DIR
+ "-L"UCLIBC_BUILD_DIR"lib"
};
static char static_linking[] = "-static";
SUBDIRS = util d-link libdl # man
-
all:
- @if [ -d $(TOPDIR)ld.so-1/d-link/$(TARGET_ARCH) ] ; then \
- set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d ; done \
- fi;
- @if [ -d $(TOPDIR)ld.so-1/d-link/$(TARGET_ARCH) ] ; then \
- install -d $(TOPDIR)lib ; \
- install -m 755 $(TOPDIR)ld.so-1/d-link/$(UCLIBC_LDSO) $(TOPDIR)lib/ld-linux-uclibc.so ; \
- install -m 644 $(TOPDIR)ld.so-1/libdl/$(LIBDL).$(MAJOR_VERSION) $(TOPDIR)lib ; \
- (cd $(TOPDIR)lib;ln -sf ld-linux-uclibc.so $(UCLIBC_LDSO)); \
- (cd $(TOPDIR)lib;ln -sf $(LIBDL).$(MAJOR_VERSION) $(LIBDL)) ; \
+ @if [ -d $(TOPDIR)ldso/d-link/$(TARGET_ARCH) ] ; then \
+ $(MAKE) -C d-link; \
fi;
-ldso:
- @if [ -d $(TOPDIR)ld.so-1/d-link/$(TARGET_ARCH) ] ; then \
- $(MAKE) -C d-link; \
+shared:
+ @if [ -d $(TOPDIR)ldso/d-link/$(TARGET_ARCH) ] ; then \
+ set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d ; done \
fi;
clean:
include $(TOPDIR)Rules.mak
LDSO_VERSION=1.9.11
-LIBDL = libdl.so
DEVEL=true
+# Makefile for uClibc
+#
+# Copyright (C) 2000 by Lineo, inc.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Library General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Derived in part from the Linux-8086 C library, the GNU C Library, and several
+# other sundry sources. Files within this library are copyright by their
+# respective copyright holders.
+
+
TOPDIR=../../
-include $(TOPDIR)/ld.so-1/Rules.mak
+include $(TOPDIR)/ldso/Rules.mak
+
+LDSO_FULLNAME=ld-uclibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
-CFLAGS += -DUSE_CACHE -fPIC -D__PIC__ #-DDL_DEBUG #-funroll-loops
CSRC= boot1.c hash.c readelflib1.c vsprintf.c $(TARGET_ARCH)/elfinterp.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
AOBJS=$(patsubst %.S,%.o, $(ASRC))
OBJS=$(AOBJS) $(COBJS)
-ELF_LDFLAGS=--shared # using GNU ld
-all: ld.so.h lib
+CFLAGS += -DUSE_CACHE -fPIC -D__PIC__ #-DDL_DEBUG #-funroll-loops
-ld.so.h:
- echo "char *_dl_progname = \""$(UCLIBC_LDSO)"\";" > ld.so.h
+all: lib
-lib:: $(OBJS) $(DLINK_OBJS)
- $(LD) -e _dl_boot $(ELF_LDFLAGS) -o $(UCLIBC_LDSO) \
+lib:: ld.so.h $(OBJS) $(DLINK_OBJS)
+ $(LD) -e _dl_boot --shared -o $(LDSO_FULLNAME) \
-soname $(UCLIBC_LDSO) $(OBJS)
+ install -d $(TOPDIR)lib ; \
+ install -m 755 $(LDSO_FULLNAME) $(TOPDIR)lib; \
+ (cd $(TOPDIR)lib;ln -sf $(LDSO_FULLNAME) $(UCLIBC_LDSO));
+
+ld.so.h:
+ echo "char *_dl_progname = \""$(UCLIBC_LDSO)"\";" > ld.so.h
$(COBJS): %.o : %.c
$(CC) -I. -I./$(TARGET_ARCH) -I../libdl $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
-realclean::
- $(RM) -f .depend $(UCLIBC_LDSO)* core *.o *.a *.s *.i tmp_make foo *~
-
clean::
- $(RM) -f $(UCLIBC_LDSO)* $(OBJS) core *.o *.a *.s *.i tmp_make foo *~
+ $(RM) -f $(UCLIBC_LDSO)* $(OBJS) $(LDSO_FULLNAME)* core *.o *.a *.s *.i tmp_make foo *~
+# Makefile for uClibc
+#
+# Copyright (C) 2000 by Lineo, inc.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Library General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Derived in part from the Linux-8086 C library, the GNU C Library, and several
+# other sundry sources. Files within this library are copyright by their
+# respective copyright holders.
+
+
TOPDIR=../../
-include $(TOPDIR)/ld.so-1/Rules.mak
+include $(TOPDIR)/ldso/Rules.mak
-CFLAGS += -DUSE_CACHE
-CFLAGS += #-fPIC -D__PIC__ #-funroll-loops
+LIBDL=libdl.a
+LIBDL_SHARED=libdl.so
+LIBDL_SHARED_FULLNAME=libdl-$(MAJOR_VERSION).$(MINOR_VERSION).so
+TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
CSRC= dlib.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+OBJS=$(patsubst %.c,%.o, $(CSRC))
-all: lib
+CFLAGS += -DUSE_CACHE #-fPIC -D__PIC__ #-funroll-loops
-$(COBJS): %.o : %.c
- $(CC) -I../d-link -I../d-link/$(TARGET_ARCH) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+all: $(OBJS) $(LIBDL)
-ELF_LDFLAGS=--shared -nostartfiles -nostdlib # using GNU ld
-#ELF_LDFLAGS=-G # with SVr4 ld
+$(LIBDL): ar-target
-lib:: $(OBJS)
- $(CC) $(ELF_LDFLAGS) \
- -o $(LIBDL).$(MAJOR_VERSION) -Wl,-soname -Wl,$(LIBDL).$(MAJOR_VERSION) \
- *.o $(TOPDIR)$(SHARED_FULLNAME)
+ar-target: $(OBJS)
+ $(AR) $(ARFLAGS) $(LIBDL) $(OBJS)
+ install -d $(TOPDIR)lib
+ rm -f $(TOPDIR)lib/$(LIBDL)
+ install -m 644 $(LIBDL) $(TOPDIR)lib
+
+$(OBJS): %.o : %.c
+ $(TARGET_CC) -I../d-link -I../d-link/$(TARGET_ARCH) $(CFLAGS) -c $< -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
-obj: $(OBJS)
+$(OBJ): Makefile
-realclean::
- $(RM) -f .depend $(LIBDL) core *.o *.a *.s *.i tmp_make foo *~
+shared: all
+ $(TARGET_CC) $(LDFLAGS) -shared -o $(LIBDL_SHARED_FULLNAME) \
+ -Wl,-soname,$(LIBDL_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive \
+ $(LIBDL) $(TOPDIR)lib/$(SHARED_FULLNAME)
+ install -d $(TOPDIR)lib
+ rm -f $(TOPDIR)lib/$(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBDL_SHARED).$(MAJOR_VERSION)
+ install -m 644 $(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib;
+ (cd $(TOPDIR)lib; ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED).$(MAJOR_VERSION));
-clean::
- $(RM) -f $(LIBDL)* core *.o *.a *.s *.i tmp_make foo *~
+clean:
+ $(RM) -f .depend $(LIBDL_SHARED)* $(LIBDL_SHARED_FULLNAME) core *.o *.a *.s *.i tmp_make foo *~
TOPDIR=../../
-include $(TOPDIR)/ld.so-1/Rules.mak
+include $(TOPDIR)/ldso/Rules.mak
CFLAGS += -DLDSO_ADDR="0x62f00020" # needed by ldd.o
CFLAGS += -I./ -I../../include/
-LDFLAGS += -nostdlib ../../libc.a ../../crt0.o $(GCCINCDIR)/../libgcc.a
+LDFLAGS += -nostdlib $(TOPDIR)lib/libc.a $(TOPDIR)lib/crt0.o $(GCCINCDIR)/../libgcc.a
ALL = ldconfig ldd # lddstub
--- /dev/null
+# Makefile for uClibc
+#
+# Copyright (C) 2000, 2001 by Lineo, inc.
+# Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Library General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Derived in part from the Linux-8086 C library, the GNU C Library, and several
+# other sundry sources. Files within this library are copyright by their
+# respective copyright holders.
+
+#--------------------------------------------------------
+#
+#There are a number of configurable options in "Config"
+#
+#--------------------------------------------------------
+
+TOPDIR=../
+include $(TOPDIR)Rules.mak
+
+DIRS = misc pwd_grp stdio string termios inet signal stdlib sysdeps unistd
+
+all: halfclean subdirs $(LIBNAME) $(DO_SHARED) done
+
+$(LIBNAME): subdirs
+ $(CROSS)ranlib $(LIBNAME)
+ install -d $(TOPDIR)lib
+ rm -f $(TOPDIR)lib/$(LIBNAME)
+ install -m 644 crt0.o $(LIBNAME) $(TOPDIR)lib
+
+shared: $(TOPDIR)lib/$(LIBNAME)
+ @rm -rf tmp
+ @mkdir tmp
+ @(cd tmp; CC=$(CC) /bin/sh ../../extra/scripts/get-needed-libgcc-objects.sh)
+ if [ -s ./tmp/libgcc-need.a ] ; then \
+ $(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
+ -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
+ ./$(LIBNAME) ./tmp/libgcc-need.a \
+ $(LDSO) ; \
+ else \
+ $(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
+ -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
+ ./$(LIBNAME) $(LDSO) ; \
+ fi
+ @rm -rf tmp
+ install -d $(TOPDIR)lib
+ rm -f $(TOPDIR)lib/$(SHARED_FULLNAME)
+ install -m 644 $(SHARED_FULLNAME) $(TOPDIR)lib
+ (cd ../lib; ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME));
+
+
+done: $(LIBNAME) $(DO_SHARED)
+ @echo
+ @echo Finally finished compiling...
+ @echo
+
+halfclean:
+ @rm -f $(LIBNAME) crt0.o uClibc_config.h
+ @rm -f $(SHARED_FULLNAME) $(SHARED_MAJORNAME) uClibc-0.* libc.so*
+
+headers: dummy
+ @rm -f include/asm include/linux include/bits
+ @ln -s $(KERNEL_SOURCE)/include/asm include/asm
+ @if [ ! -f include/asm/unistd.h ] ; then \
+ 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 " "; \
+ /bin/false; \
+ fi;
+ @if [ $(HAS_MMU) != "true" ] && [ $(TARGET_ARCH) = "i386" ] ; then \
+ echo "WARNING: I bet your x86 system really has an MMU, right?"; \
+ echo " malloc and friends won't work unless you fix \`Config'"; \
+ echo " "; \
+ sleep 10; \
+ fi;
+ @ln -s $(KERNEL_SOURCE)/include/linux include/linux
+ @ln -s ../sysdeps/linux/$(TARGET_ARCH)/bits include/bits
+ @ln -sf ../../../../uClibc_config.h sysdeps/linux/$(TARGET_ARCH)/bits/uClibc_config.h
+
+
+tags:
+ ctags -R
+
+clean: subdirs_clean halfclean
+ @rm -rf tmp
+ rm -f include/asm include/linux include/bits
+
+subdirs: $(patsubst %, _dir_%, $(DIRS))
+subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
+
+$(patsubst %, _dir_%, $(DIRS)) : dummy
+ $(MAKE) -C $(patsubst _dir_%, %, $@)
+
+$(patsubst %, _dirclean_%, $(DIRS)) : dummy
+ $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
+
+.PHONY: dummy subdirs
+
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
ifeq ($(strip $(INCLUDE_RPC)),true)
DIRS=rpc
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CFLAGS+=-I$(TOPDIR)include/linux
CSRC = auth_none.c auth_unix.c authunix_prot.c \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
DIRS = assert ctype dirent fnmatch glob internals lsearch mntent syslog \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=__assert.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
MSRC=ctype.c
MOBJ= isalnum.o isalpha.o isascii.o iscntrl.o isdigit.o isgraph.o \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c telldir.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=fnmatch.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=glob.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=ultostr.c ltostr.c __uClibc_main.c tempname.c
ifeq ($(HAS_FLOATS),true)
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=locale.c localeconv.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=flock.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=lsearch.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=mntent.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=regex.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=syslog.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
DIRS=
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=localtime.c gmtime.c asctime.c ctime.c asc_conv.c tm_conv.c mktime.c \
localtime_r.c gmtime_r.c asctime_r.c ctime_r.c utimes.c adjtime.c \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
MSRC=tsearch.c
MOBJ=tsearch.o tfind.o tdelete.o twalk.o
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=utent.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC= pwent.c getpwnam.c getpwuid.c putpwent.c getpw.c fgetpwent.c \
__getgrent.c grent.c getgrnam.c getgrgid.c fgetgrent.c \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=bsd_sig.c raise.c sigblock.c siggtmsk.c sigjmp.c signal.c sigintr.c\
sigpause.c sigstmsk.c sigaddset.c sigdelset.c sigismem.c \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
MSRC=stdio.c
MOBJ=_stdio_init.o \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
DIRS = $(MALLOC)
ALL_SUBDIRS = malloc malloc-930716 malloc-simple
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC=calloc.c free.c malloc.c memalign.c morecore.c realloc.c valloc.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
MSRC=alloc.c
MOBJ=malloc.o realloc.o free.o calloc.o malloc_dbg.o free_dbg.o calloc_dbg.o
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
MSRC=alloc.c
MOBJ=malloc_dbg.o free_dbg.o calloc_dbg.o realloc_dbg.o
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
MSRC=string.c
MOBJ=strlen.o strcat.o strcpy.o strchr.o strcmp.o strncat.o strncpy.o \
DIRS = linux
-all: libc.a
-
-libc.a: subdirs
+all: subdirs
tags:
ctags -R
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../
+TOPDIR=../../../
include $(TOPDIR)Rules.mak
DIRS = common $(TARGET_ARCH)
ALL_SUBDIRS = arm common i386 m68k powerpc sh sparc
-all: libc.a
-
-libc.a: subdirs
+all: subdirs
tags:
ctags -R
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../../
+TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
else
CRT0=crt0.S
endif
-
CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
SSRC=longjmp.S setjmp.S vfork.S
ar-target: $(OBJS) $(CRT0_OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
- cp $(CRT0_OBJ) $(TOPDIR)crt0.o
+ cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
$(CRT0_OBJ): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../../
+TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
CSRC= waitpid.c getdents.c kernel_version.c statfix.c getdnnm.c tell.c gethstnm.c \
mkfifo.c setegid.c wait.c errno.c getpagesize.c seteuid.c wait3.c setpgrp.c \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../../
+TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
CRT0=crt0.S
ar-target: $(OBJS) $(CRT0_OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
- cp $(CRT0_OBJ) $(TOPDIR)$(CRT0_OBJ)
+ cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
$(CRT0_OBJ): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../../
+TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
# If you're looking for vfork(), it is defined in include/unistd.h
ar-target: $(OBJS) $(CRT0_OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
- cp $(CRT0_OBJ) $(TOPDIR)$(CRT0_OBJ)
+ cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
$(CRT0_OBJ): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@
USE_CRT0_C=y
-TOPDIR=../../../
+TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
else
CRT0=crt0.S
endif
-
-CRT0_OBJ=crt0.o
+CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
SSRC=longjmp.S setjmp.S vfork.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
ar-target: $(OBJS) $(CRT0_OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
- cp $(CRT0_OBJ) $(TOPDIR)crt0.o
+ cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
ifeq ($(USE_CRT0_C),y)
$(CRT0_OBJ): %.o : %.c
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../../
+TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
CFLAGS+= -I../ -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
CRT0=crt0.S
-
CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
SSRC=setjmp.S bsd-setjmp.S bsd-_setjmp.S __longjmp.S
ar-target: $(OBJS) $(CRT0_OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
- cp $(CRT0_OBJ) $(TOPDIR)crt0.o
+ cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
$(CRT0_OBJ): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../../../
+TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
CRT0=crt0.S
ar-target: $(OBJS) $(CRT0_OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
- cp $(CRT0_OBJ) $(TOPDIR)$(CRT0_OBJ)
+ cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
$(CRT0_OBJ): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
MSRC=termios.c
MOBJ= tcdrain.o tcflow.o tcflush.o tcsendbreak.o tcsetpgrp.o tcgetpgrp.o \
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
DIRS:=
CSRC=execl.c execlp.c execv.c execvep.c execvp.c execle.c getcwd.c getopt.c \
$(AR) $(ARFLAGS) $(LIBCRYPT) $(OBJS)
install -d $(TOPDIR)lib
rm -f $(TOPDIR)lib/$(LIBCRYPT)
- install -m 644 $(LIBCRYPT) $(TOPDIR)lib/
+ install -m 644 $(LIBCRYPT) $(TOPDIR)lib
$(OBJS): %.o : %.c
$(TARGET_CC) $(CFLAGS) -c $< -o $@
shared: all
$(TARGET_CC) $(LDFLAGS) -shared -o $(LIBCRYPT_SHARED_FULLNAME) \
- -Wl,-soname,$(LIBCRYPT_SHARED).$(MAJOR_VERSION) $(OBJS) $(TOPDIR)$(SHARED_FULLNAME)
+ -Wl,-soname,$(LIBCRYPT_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive \
+ $(LIBCRYPT) $(TOPDIR)lib/$(SHARED_FULLNAME)
install -d $(TOPDIR)lib
rm -f $(TOPDIR)lib/$(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION)
- install -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/;
+ install -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib;
(cd $(TOPDIR)lib; ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED).$(MAJOR_VERSION));
clean:
# Makefile for uClibc's math library
-#
# Copyright (C) 2001 by Lineo, inc.
#
+# This math library is derived primarily from the Cephes Math Library,
+# copyright by Stephen L. Moshier <moshier@world.std.com>
+#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option) any
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
TOPDIR=../
include $(TOPDIR)Rules.mak
shared: all
@if [ -f $(LIBM) ] ; then \
$(TARGET_CC) $(LDFLAGS) -shared -o $(LIBM_SHARED_FULLNAME) \
- -Wl,-soname,$(LIBM_SHARED).$(MAJOR_VERSION) $(OBJS) $(TOPDIR)$(SHARED_FULLNAME); \
+ -Wl,-soname,$(LIBM_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive \
+ $(LIBM) $(TOPDIR)lib/$(SHARED_FULLNAME); \
install -d $(TOPDIR)lib; \
rm -f $(TOPDIR)lib/$(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION); \
install -m 644 $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib; \
# Makefile for uClibc's math library
-#
# Copyright (C) 2001 by Lineo, inc.
#
+# This math library is derived primarily from the Cephes Math Library,
+# copyright by Stephen L. Moshier <moshier@world.std.com>
+#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option) any
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
TOPDIR=../../
include $(TOPDIR)Rules.mak
# Makefile for uClibc's math library
-#
# Copyright (C) 2001 by Lineo, inc.
#
+# This math library is derived primarily from the Cephes Math Library,
+# copyright by Stephen L. Moshier <moshier@world.std.com>
+#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option) any
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
TOPDIR=../../
include $(TOPDIR)Rules.mak
struvef.c tandgf.c tanf.c tanhf.c ynf.c zetaf.c \
zetacf.c polevlf.c setprec.c mtherr.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
-
-
OBJS=$(COBJS)
all: $(OBJS) $(LIBM)
# Makefile for uClibc's math library
-#
# Copyright (C) 2001 by Lineo, inc.
#
+# This math library is derived primarily from the Cephes Math Library,
+# copyright by Stephen L. Moshier <moshier@world.std.com>
+#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option) any
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
TOPDIR=../../
include $(TOPDIR)Rules.mak
shared: all
$(TARGET_CC) $(LDFLAGS) -shared -o $(LIBUTIL_SHARED_FULLNAME) \
- -Wl,-soname,$(LIBUTIL_SHARED).$(MAJOR_VERSION) $(OBJS) $(TOPDIR)$(SHARED_FULLNAME)
+ -Wl,-soname,$(LIBUTIL_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive \
+ $(LIBUTIL) $(TOPDIR)lib/$(SHARED_FULLNAME)
install -d $(TOPDIR)lib
rm -f $(TOPDIR)lib/$(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBUTIL_SHARED).$(MAJOR_VERSION)
install -m 644 $(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/;