diff options
Diffstat (limited to 'libc')
68 files changed, 303 insertions, 341 deletions
diff --git a/libc/.cvsignore b/libc/.cvsignore index a9a5aecf4..e9374e8d6 100644 --- a/libc/.cvsignore +++ b/libc/.cvsignore @@ -1 +1,2 @@ tmp +obj.* diff --git a/libc/Makefile b/libc/Makefile index c37f11882..17937bbc8 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -37,10 +37,33 @@ DIRS = misc pwd_grp stdio string termios inet signal stdlib sysdeps unistd VERSION_SCRIPT:=${shell if [ -f sysdeps/linux/$(TARGET_ARCH)/libc.map ] ; then \ echo "--version-script sysdeps/linux/$(TARGET_ARCH)/libc.map"; fi} -all: halfclean $(LIBNAME) $(DO_SHARED) +LIBNAME_TARGET:=$(TOPDIR)lib/$(LIBNAME) +all: halfclean $(LIBNAME_TARGET) $(DO_SHARED) + +# Some functions are duplicated across subdirs, and when you pass $(AR) +# the same object file more than once, it'll add it to the archive multiple +# times (boo!). So what we do here is: +# - import all the objects (thus we may have dupes) +# - delete all the dupes +# - re-import certain objects based upon preference +# - the sysdeps dir should override all other symbols for example +# We need to use shell globbing with obj.* because if we use make's wildcard, +# the wildcard will be evaluated when `make` is run instead of when the make +# target is evaluated. That means if you run `rm obj.* ; make`, the wildcard +# will evaluate to no files :(. $(LIBNAME) ar-target: subdirs + objs=`cat obj.*` ; $(AR) $(ARFLAGS) $(LIBNAME) $$objs + objs=`cat obj.*` ; $(AR) dN 2 $(LIBNAME) $$objs + @for objfile in obj.signal obj.string.generic obj.string \ + obj.sysdeps.$(TARGET_ARCH) obj.sysdeps.common ; do \ + echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \ + objs=`cat $$objfile` ; \ + $(AR) $(ARFLAGS) $(LIBNAME) $$objs || exit 1 ; \ + done $(RANLIB) $(LIBNAME) + +$(LIBNAME_TARGET): $(LIBNAME) $(INSTALL) -d $(TOPDIR)lib $(RM) $(TOPDIR)lib/$(LIBNAME) $(INSTALL) -m 644 $(LIBNAME) $(TOPDIR)lib @@ -67,6 +90,7 @@ tags: clean: subdirs_clean halfclean @$(RM) -r tmp $(RM) include/asm include/linux include/bits + $(RM) obj.* subdirs: $(patsubst %, _dir_%, $(DIRS)) subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS)) diff --git a/libc/inet/Makefile b/libc/inet/Makefile index 5ca42ddf2..e7018db7c 100644 --- a/libc/inet/Makefile +++ b/libc/inet/Makefile @@ -58,13 +58,12 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS) +OBJ_LIST=../obj.inet -all: $(OBJS) $(LIBC) +all: $(OBJ_LIST) subdirs -$(LIBC): ar-target subdirs - -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, inet/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -95,4 +94,3 @@ $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean .PHONY: dummy - diff --git a/libc/inet/rpc/Makefile b/libc/inet/rpc/Makefile index 5b8975cbf..352e9a28b 100644 --- a/libc/inet/rpc/Makefile +++ b/libc/inet/rpc/Makefile @@ -50,12 +50,12 @@ endif COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: ar-target +OBJ_LIST=../../obj.inet.rpc -$(LIBC): $(OBJS) +all: $(OBJ_LIST) -ar-target: $(LIBC) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, inet/rpc/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -63,4 +63,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/Makefile b/libc/misc/Makefile index da7c44fba..9d2d74a2b 100644 --- a/libc/misc/Makefile +++ b/libc/misc/Makefile @@ -50,9 +50,7 @@ ifeq ($(strip $(UCLIBC_HAS_GLOB)),y) DIRS += glob endif -all: libc.a - -libc.a: subdirs +all: subdirs tags: ctags -R @@ -70,4 +68,3 @@ $(patsubst %, _dirclean_%, $(DIRS)) : dummy $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean .PHONY: dummy - diff --git a/libc/misc/assert/Makefile b/libc/misc/assert/Makefile index cfd469c14..57a2c0154 100644 --- a/libc/misc/assert/Makefile +++ b/libc/misc/assert/Makefile @@ -28,12 +28,12 @@ CSRC=__assert.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(LIBC) +OBJ_LIST=../../obj.misc.assert -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/assert/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ diff --git a/libc/misc/ctype/Makefile b/libc/misc/ctype/Makefile index 26bb33731..dd7b799bd 100644 --- a/libc/misc/ctype/Makefile +++ b/libc/misc/ctype/Makefile @@ -47,12 +47,12 @@ ifeq ($(UCLIBC_HAS_XLOCALE),y) OBJS += $(MOBJx) endif -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.ctype -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/ctype/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -66,4 +66,3 @@ $(OBJS): Makefile clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/dirent/Makefile b/libc/misc/dirent/Makefile index 4ccf3d3e0..1f1032642 100644 --- a/libc/misc/dirent/Makefile +++ b/libc/misc/dirent/Makefile @@ -30,12 +30,12 @@ CSRC=alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c scandir.c \ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.dirent -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/dirent/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -43,4 +43,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/error/Makefile b/libc/misc/error/Makefile index 880fd58df..1ef71dfa7 100644 --- a/libc/misc/error/Makefile +++ b/libc/misc/error/Makefile @@ -23,12 +23,12 @@ CSRC=error.c err.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.error -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/error/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -36,4 +36,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/file/Makefile b/libc/misc/file/Makefile index fc1a1bfc3..a590f6ab5 100644 --- a/libc/misc/file/Makefile +++ b/libc/misc/file/Makefile @@ -32,12 +32,12 @@ endif COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.file -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/file/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -45,4 +45,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/fnmatch/Makefile b/libc/misc/fnmatch/Makefile index af067bd15..535169550 100644 --- a/libc/misc/fnmatch/Makefile +++ b/libc/misc/fnmatch/Makefile @@ -28,12 +28,12 @@ CSRC=fnmatch.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.fnmatch -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/fnmatch/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -41,4 +41,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/ftw/Makefile b/libc/misc/ftw/Makefile index a9df0c782..a8d52bf32 100644 --- a/libc/misc/ftw/Makefile +++ b/libc/misc/ftw/Makefile @@ -27,12 +27,12 @@ MSRC=ftw.c MOBJ=ftw.o ftw64.o OBJS=$(MOBJ) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.ftw -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/ftw/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -40,4 +40,3 @@ $(MOBJ): $(MSRC) clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/glob/Makefile b/libc/misc/glob/Makefile index 31a3b80fe..e753c936a 100644 --- a/libc/misc/glob/Makefile +++ b/libc/misc/glob/Makefile @@ -28,12 +28,12 @@ CSRC=glob.c glob64.c glob-hooks.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.glob -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/glob/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -43,4 +43,3 @@ glob64.o: glob64.c glob.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/gnu/Makefile b/libc/misc/gnu/Makefile index 6e3fd8463..a338b8131 100644 --- a/libc/misc/gnu/Makefile +++ b/libc/misc/gnu/Makefile @@ -28,12 +28,12 @@ CSRC=obstack.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(LIBC) +OBJ_LIST=../../obj.misc.gnu -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/gnu/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ diff --git a/libc/misc/internals/Makefile b/libc/misc/internals/Makefile index 486cf8d55..23816b38d 100644 --- a/libc/misc/internals/Makefile +++ b/libc/misc/internals/Makefile @@ -29,12 +29,12 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) interp.o $(LIBC) +OBJ_LIST=../../obj.misc.internals -$(LIBC): interp.c ar-target +all: $(OBJ_LIST) interp.o -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/internals/%, $(OBJS)) > $(OBJ_LIST) interp.c: Makefile echo "/* Force shared libraries to know about the correct library loader */" > interp.c @@ -54,4 +54,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] interp.c *~ core - diff --git a/libc/misc/intl/Makefile b/libc/misc/intl/Makefile index df59c9d52..e0eb06493 100644 --- a/libc/misc/intl/Makefile +++ b/libc/misc/intl/Makefile @@ -30,12 +30,12 @@ MOBJ= __uClibc_dgettext.o __uClibc_dcgettext.o \ OBJS=$(MOBJ) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.intl -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/intl/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -47,4 +47,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/locale/Makefile b/libc/misc/locale/Makefile index 75fa56a78..5ab005538 100644 --- a/libc/misc/locale/Makefile +++ b/libc/misc/locale/Makefile @@ -43,13 +43,12 @@ endif OBJS= $(MOBJ) $(MOBJx) $(DATA) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.locale +all: $(OBJ_LIST) -$(LIBC): ar-target - -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/locale/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o diff --git a/libc/misc/mntent/Makefile b/libc/misc/mntent/Makefile index 7430dfe00..34a3d6f71 100644 --- a/libc/misc/mntent/Makefile +++ b/libc/misc/mntent/Makefile @@ -28,12 +28,12 @@ CSRC=mntent.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.mntent -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/mntent/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -41,4 +41,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/pthread/Makefile b/libc/misc/pthread/Makefile index d01af1d74..0e432d308 100644 --- a/libc/misc/pthread/Makefile +++ b/libc/misc/pthread/Makefile @@ -33,12 +33,12 @@ CSRC=no-tsd.c weaks.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.pthread -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/pthread/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -46,4 +46,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/regex/Makefile b/libc/misc/regex/Makefile index 5bdda32b4..db215edd8 100644 --- a/libc/misc/regex/Makefile +++ b/libc/misc/regex/Makefile @@ -28,12 +28,12 @@ CSRC=regex.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.regex -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/regex/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -41,4 +41,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/search/Makefile b/libc/misc/search/Makefile index 9d579b964..7e67bb4e5 100644 --- a/libc/misc/search/Makefile +++ b/libc/misc/search/Makefile @@ -41,12 +41,12 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) $(MOBJ1) $(MOBJ2) $(MOBJ3) $(MOBJ4) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.search -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/search/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ1): $(MSRC1) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -70,4 +70,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/statfs/Makefile b/libc/misc/statfs/Makefile index 55c21b8f6..bbb9dd0bc 100644 --- a/libc/misc/statfs/Makefile +++ b/libc/misc/statfs/Makefile @@ -30,13 +30,12 @@ endif COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) +OBJ_LIST=../../obj.misc.statfs -all: $(OBJS) $(LIBC) +all: $(OBJ_LIST) -$(LIBC): ar-target - -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/statfs/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -44,4 +43,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/syslog/Makefile b/libc/misc/syslog/Makefile index 8eb583c51..35e755e40 100644 --- a/libc/misc/syslog/Makefile +++ b/libc/misc/syslog/Makefile @@ -28,12 +28,12 @@ CSRC=syslog.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.syslog -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/syslog/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -41,4 +41,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/sysvipc/Makefile b/libc/misc/sysvipc/Makefile index eaf5dd1ec..11aba5758 100644 --- a/libc/misc/sysvipc/Makefile +++ b/libc/misc/sysvipc/Makefile @@ -40,13 +40,12 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS) +OBJ_LIST=../../obj.misc.sysvipc -all: $(OBJS) $(LIBC) +all: $(OBJ_LIST) -$(LIBC): ar-target subdirs - -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/sysvipc/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -77,4 +76,3 @@ $(patsubst %, _dirclean_%, $(DIRS)) : dummy $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean .PHONY: dummy - diff --git a/libc/misc/time/Makefile b/libc/misc/time/Makefile index 2247b2b92..236a160bf 100644 --- a/libc/misc/time/Makefile +++ b/libc/misc/time/Makefile @@ -50,12 +50,12 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) $(MOBJ) $(MOBJx) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.time -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/time/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -71,4 +71,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/ttyent/Makefile b/libc/misc/ttyent/Makefile index 1b814089e..8aaf8e8e8 100644 --- a/libc/misc/ttyent/Makefile +++ b/libc/misc/ttyent/Makefile @@ -23,12 +23,12 @@ CSRC=getttyent.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.ttyent -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/ttyent/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -36,4 +36,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/utmp/Makefile b/libc/misc/utmp/Makefile index 7a506a45d..c4cab9e9b 100644 --- a/libc/misc/utmp/Makefile +++ b/libc/misc/utmp/Makefile @@ -28,12 +28,12 @@ CSRC=utent.c wtent.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(LIBC) +OBJ_LIST=../../obj.misc.utmp -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/utmp/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ diff --git a/libc/misc/wchar/Makefile b/libc/misc/wchar/Makefile index b1db37293..62b49f2ee 100644 --- a/libc/misc/wchar/Makefile +++ b/libc/misc/wchar/Makefile @@ -45,12 +45,12 @@ endif OBJS=$(MOBJ1) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.wchar -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/wchar/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ1): $(MSRC1) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -62,4 +62,3 @@ $(MOBJ2): $(MSRC2) clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/wctype/Makefile b/libc/misc/wctype/Makefile index 291036451..8a842dce7 100644 --- a/libc/misc/wctype/Makefile +++ b/libc/misc/wctype/Makefile @@ -41,12 +41,12 @@ ifeq ($(UCLIBC_HAS_XLOCALE),y) OBJS += $(MOBJx) endif -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.wctype -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/wctype/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -58,4 +58,3 @@ $(MOBJx): $(MSRC) clean: $(RM) *.[oa] *~ core - diff --git a/libc/misc/wordexp/Makefile b/libc/misc/wordexp/Makefile index 5e29f4704..6126be8bf 100644 --- a/libc/misc/wordexp/Makefile +++ b/libc/misc/wordexp/Makefile @@ -23,12 +23,12 @@ CSRC=wordexp.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.misc.wordexp -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, misc/wordexp/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -36,4 +36,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/pwd_grp/Makefile b/libc/pwd_grp/Makefile index 8835d665a..3b37e0052 100644 --- a/libc/pwd_grp/Makefile +++ b/libc/pwd_grp/Makefile @@ -46,12 +46,12 @@ endif COBJ=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(MOBJ) $(COBJ) -all: $(OBJS) $(LIBC) +OBJ_LIST=../obj.pwd_grp -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, pwd_grp/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o diff --git a/libc/signal/Makefile b/libc/signal/Makefile index 28d87a77e..2ce6216e9 100644 --- a/libc/signal/Makefile +++ b/libc/signal/Makefile @@ -28,12 +28,12 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../obj.signal -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, signal/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ diff --git a/libc/stdio/Makefile b/libc/stdio/Makefile index 59bccc148..a52098c90 100644 --- a/libc/stdio/Makefile +++ b/libc/stdio/Makefile @@ -118,13 +118,12 @@ ifeq ($(strip $(UCLIBC_HAS_LFS)),y) OBJS += $(CLOBJS) endif +OBJ_LIST=../obj.stdio -all: $(OBJS) $(LIBC) +all: $(OBJ_LIST) -$(LIBC): ar-target - -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, stdio/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -153,5 +152,4 @@ $(MWOBJ): $(MWSRC) $(OBJ): Makefile clean: - rm -f *.[oa] *~ core - + $(RM) *.[oa] *~ core diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile index 02dd8887e..5a3ffe631 100644 --- a/libc/stdlib/Makefile +++ b/libc/stdlib/Makefile @@ -94,12 +94,12 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(MOBJ) $(MOBJx) $(MOBJ1) $(MOBJ1x) $(MOBJ2) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../obj.stdlib -$(LIBC): ar-target subdirs +all: $(OBJ_LIST) subdirs -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, stdlib/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -140,5 +140,3 @@ clean: subdirs_clean $(RM) *.[oa] *~ core .PHONY: dummy - - diff --git a/libc/stdlib/malloc-simple/Makefile b/libc/stdlib/malloc-simple/Makefile index 1da7a672c..161aece1a 100644 --- a/libc/stdlib/malloc-simple/Makefile +++ b/libc/stdlib/malloc-simple/Makefile @@ -27,18 +27,16 @@ MSRC=alloc.c MOBJ=malloc.o realloc.o free.o calloc.o memalign.o OBJS=$(MOBJ) +OBJ_LIST=../../obj.stdlib.malloc-simple -all: $(OBJS) $(LIBC) +all: $(OBJ_LIST) -$(LIBC): ar-target - -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, stdlib/malloc-simple/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o $(STRIPTOOL) -x -R .note -R .comment $*.o clean: - rm -f *.[oa] *~ core - + $(RM) *.[oa] *~ core diff --git a/libc/stdlib/malloc-standard/Makefile b/libc/stdlib/malloc-standard/Makefile index 2b87c5de2..0af06b3ff 100644 --- a/libc/stdlib/malloc-standard/Makefile +++ b/libc/stdlib/malloc-standard/Makefile @@ -35,12 +35,12 @@ CSRC=malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.stdlib.malloc-standard -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, stdlib/malloc-standard/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ @@ -48,4 +48,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/stdlib/malloc/Makefile b/libc/stdlib/malloc/Makefile index ce789f8e8..e4a6f3a43 100644 --- a/libc/stdlib/malloc/Makefile +++ b/libc/stdlib/malloc/Makefile @@ -39,12 +39,12 @@ endif COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.stdlib.malloc -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, stdlib/malloc/%, $(OBJS)) > $(OBJ_LIST) malloc.o free.o realloc.o memalign.o: malloc.h $(COBJS): heap.h diff --git a/libc/string/Makefile b/libc/string/Makefile index 02c86d6aa..111bf2fdb 100644 --- a/libc/string/Makefile +++ b/libc/string/Makefile @@ -67,12 +67,12 @@ ifeq ($(UCLIBC_HAS_WCHAR),y) OBJS += $(MOBJW) $(MOBJWx) endif -all: $(LIBC) subdirs +OBJ_LIST=../obj.string -$(LIBC): ar-target +all: $(OBJ_LIST) subdirs -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -107,4 +107,3 @@ $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean .PHONY: dummy - diff --git a/libc/string/arm/Makefile b/libc/string/arm/Makefile index 7a4e18454..a874eb96d 100644 --- a/libc/string/arm/Makefile +++ b/libc/string/arm/Makefile @@ -22,13 +22,14 @@ include $(TOPDIR)Rules.mak SSRC= _memcpy.S bcopy.S bzero.S memcmp.S memcpy.S memmove.S memset.S \ strcmp.S strlen.S strncmp.S SOBJS=$(patsubst %.S,%.o, $(SSRC)) +OBJS=$(SOBJS) -all: $(SOBJS) $(LIBC) +OBJ_LIST=../../obj.string.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(SOBJS) - $(AR) $(ARFLAGS) $(LIBC) $(SOBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(SOBJS): %.o : %.S $(CC) $(ASFLAGS) -c $< -o $@ @@ -36,4 +37,3 @@ $(SOBJS): %.o : %.S clean: $(RM) *.[oa] *~ core - diff --git a/libc/string/frv/Makefile b/libc/string/frv/Makefile index b9cea059a..36682c94c 100644 --- a/libc/string/frv/Makefile +++ b/libc/string/frv/Makefile @@ -23,12 +23,12 @@ SSRC=memcpy.S memset.S SOBJS=$(patsubst %.S,%.o, $(SSRC)) OBJS=$(SOBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.string.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(SOBJS): %.o : %.S $(CC) $(ASFLAGS) -c $< -o $@ @@ -36,4 +36,3 @@ $(SOBJS): %.o : %.S clean: $(RM) *.[oa] *~ core - diff --git a/libc/string/generic/Makefile b/libc/string/generic/Makefile index 3f9af72a3..fac678a59 100644 --- a/libc/string/generic/Makefile +++ b/libc/string/generic/Makefile @@ -25,15 +25,14 @@ CSRC= memchr.c memcmp.c memcpy.c memmem.c memmove.c mempcpy.c memrchr.c \ strrchr.c strsep.c strspn.c strstr.c strtok_r.c COBJS=$(patsubst %.c,%.o, $(CSRC)) - OBJS=$(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.string.generic -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/generic/%, $(OBJS)) > $(OBJ_LIST) # $(MOBJ): $(MSRC) # $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -45,4 +44,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/string/i386/Makefile b/libc/string/i386/Makefile index 3042e6e98..d2baa7dd8 100644 --- a/libc/string/i386/Makefile +++ b/libc/string/i386/Makefile @@ -25,12 +25,12 @@ MOBJ= strcpy.o strncpy.o strcat.o strncat.o strcmp.o \ memcpy.o memmove.o memchr.o memset.o OBJS=$(MOBJ) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.string.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -42,4 +42,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/string/mips/Makefile b/libc/string/mips/Makefile index 805024929..a6d7d4a4b 100644 --- a/libc/string/mips/Makefile +++ b/libc/string/mips/Makefile @@ -21,13 +21,14 @@ include $(TOPDIR)Rules.mak SSRC= memcpy.S memset.S SOBJS=$(patsubst %.S,%.o, $(SSRC)) +OBJS=$(SOBJS) -all: $(SOBJS) $(LIBC) +OBJ_LIST=../../obj.string.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(SOBJS) - $(AR) $(ARFLAGS) $(LIBC) $(SOBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(SOBJS): %.o : %.S $(CC) $(ASFLAGS) -c $< -o $@ @@ -35,4 +36,3 @@ $(SOBJS): %.o : %.S clean: $(RM) *.[oa] *~ core - diff --git a/libc/string/powerpc/Makefile b/libc/string/powerpc/Makefile index d99798694..c1b0ba184 100644 --- a/libc/string/powerpc/Makefile +++ b/libc/string/powerpc/Makefile @@ -23,12 +23,12 @@ MSRC= string.c MOBJ= memcpy.o memmove.o memset.o bzero.o OBJS=$(MOBJ) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../obj.string.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -40,4 +40,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/string/sh64/Makefile b/libc/string/sh64/Makefile index fcd988f58..0a7ee0ba2 100644 --- a/libc/string/sh64/Makefile +++ b/libc/string/sh64/Makefile @@ -21,13 +21,14 @@ include $(TOPDIR)Rules.mak SSRC= memcpy.S memset.S strcpy.S strlen.S SOBJS=$(patsubst %.S,%.o, $(SSRC)) +OBJS=$(SOBJS) -all: $(SOBJS) $(LIBC) +OBJ_LIST=../../obj.string.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(SOBJS) - $(AR) $(ARFLAGS) $(LIBC) $(SOBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(SOBJS): %.o : %.S $(CC) $(ASFLAGS) -c $< -o $@ @@ -35,4 +36,3 @@ $(SOBJS): %.o : %.S clean: $(RM) *.[oa] *~ core - diff --git a/libc/sysdeps/Makefile b/libc/sysdeps/Makefile index e1e304873..f0d2ebd72 100644 --- a/libc/sysdeps/Makefile +++ b/libc/sysdeps/Makefile @@ -34,6 +34,4 @@ $(patsubst %, _dir_%, $(DIRS)) : dummy $(patsubst %, _dirclean_%, $(DIRS)) : dummy $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean - .PHONY: dummy - diff --git a/libc/sysdeps/linux/Makefile b/libc/sysdeps/linux/Makefile index 9aa585eec..0e891d193 100644 --- a/libc/sysdeps/linux/Makefile +++ b/libc/sysdeps/linux/Makefile @@ -39,6 +39,4 @@ subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean - .PHONY: dummy $(TARGET_ARCH) - diff --git a/libc/sysdeps/linux/alpha/Makefile b/libc/sysdeps/linux/alpha/Makefile index d415c24ba..5c7310b38 100644 --- a/libc/sysdeps/linux/alpha/Makefile +++ b/libc/sysdeps/linux/alpha/Makefile @@ -32,12 +32,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -75,7 +76,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/alpha/fpu_control.h $(TOPDIR)/include/ diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile index ecc75b350..94929304e 100644 --- a/libc/sysdeps/linux/arm/Makefile +++ b/libc/sysdeps/linux/arm/Makefile @@ -33,12 +33,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -76,7 +77,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/arm/fpu_control.h $(TOPDIR)/include/ @@ -84,4 +84,3 @@ clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h $(RM) gmon-start.S - diff --git a/libc/sysdeps/linux/bfin/Makefile b/libc/sysdeps/linux/bfin/Makefile index b48131a4c..8fb05118e 100644 --- a/libc/sysdeps/linux/bfin/Makefile +++ b/libc/sysdeps/linux/bfin/Makefile @@ -32,13 +32,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) - mkdir -p $(TOPDIR)lib/ +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile index e42987859..5c43c1689 100644 --- a/libc/sysdeps/linux/common/Makefile +++ b/libc/sysdeps/linux/common/Makefile @@ -63,14 +63,14 @@ endif COBJS=$(patsubst %.c,%.o, $(CSRC)) -OBJ=$(COBJS) $(MOBJ) +OBJS=$(COBJS) $(MOBJ) -all: $(STR_SYSCALLS) $(OBJ) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.common -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJ) - $(AR) $(ARFLAGS) $(LIBC) $(OBJ) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, sysdeps/linux/common/%, $(OBJS)) > $(OBJ_LIST) $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ diff --git a/libc/sysdeps/linux/cris/Makefile b/libc/sysdeps/linux/cris/Makefile index 458c512d7..f69db2503 100644 --- a/libc/sysdeps/linux/cris/Makefile +++ b/libc/sysdeps/linux/cris/Makefile @@ -34,12 +34,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -77,9 +78,7 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: clean: $(RM) *.[oa] *~ core - diff --git a/libc/sysdeps/linux/e1/Makefile b/libc/sysdeps/linux/e1/Makefile index da98b902f..60d6ec026 100644 --- a/libc/sysdeps/linux/e1/Makefile +++ b/libc/sysdeps/linux/e1/Makefile @@ -37,12 +37,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) $(CRT0_OBJ) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/$(CRT0_OBJ) $(CRT0_OBJ): %.o : %.S @@ -80,14 +81,11 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: - clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h ifneq ($(strip $(HAVE_ELF)),y) $(RM) $(TOPDIR)/include/float.h endif - diff --git a/libc/sysdeps/linux/h8300/Makefile b/libc/sysdeps/linux/h8300/Makefile index 9176a2ed2..b5d337427 100644 --- a/libc/sysdeps/linux/h8300/Makefile +++ b/libc/sysdeps/linux/h8300/Makefile @@ -37,12 +37,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -80,9 +81,7 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: clean: $(RM) *.[oa] *~ core - diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile index c48a44092..d9bf0239a 100644 --- a/libc/sysdeps/linux/i386/Makefile +++ b/libc/sysdeps/linux/i386/Makefile @@ -34,12 +34,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(SCRT0_OBJ) $(TOPDIR)lib/ ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) $(RM) $(TOPDIR)lib/Scrt0.o @@ -86,7 +87,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/i386/fpu_control.h $(TOPDIR)/include/ @@ -95,4 +95,3 @@ clean: $(RM) bits/sysnum.h $(RM) $(TOPDIR)/include/fpu_control.h $(RM) gmon-start.S - diff --git a/libc/sysdeps/linux/i960/Makefile b/libc/sysdeps/linux/i960/Makefile index 7632e5b2d..2701e9985 100644 --- a/libc/sysdeps/linux/i960/Makefile +++ b/libc/sysdeps/linux/i960/Makefile @@ -34,12 +34,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -77,11 +78,8 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: - clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h - diff --git a/libc/sysdeps/linux/m68k/Makefile b/libc/sysdeps/linux/m68k/Makefile index 8f0a2ba96..7e595229f 100644 --- a/libc/sysdeps/linux/m68k/Makefile +++ b/libc/sysdeps/linux/m68k/Makefile @@ -38,12 +38,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) diff --git a/libc/sysdeps/linux/microblaze/Makefile b/libc/sysdeps/linux/microblaze/Makefile index b17cb74ef..269d53eb6 100644 --- a/libc/sysdeps/linux/microblaze/Makefile +++ b/libc/sysdeps/linux/microblaze/Makefile @@ -40,12 +40,13 @@ COBJS = $(patsubst %.c,%.o, $(CSRC)) OBJS = $(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -83,10 +84,8 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h - diff --git a/libc/sysdeps/linux/mips/Makefile b/libc/sysdeps/linux/mips/Makefile index 71d80a408..ac29d9955 100644 --- a/libc/sysdeps/linux/mips/Makefile +++ b/libc/sysdeps/linux/mips/Makefile @@ -32,12 +32,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(LN) -fs $(CRT0_OBJ) $(TOPDIR)/lib/crt0.o $(LN) -fs $(CRT0_OBJ) $(TOPDIR)/lib/Scrt1.o @@ -78,7 +79,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/mips/sgidefs.h $(TOPDIR)/include/ # $(LN) -fs ../libc/sysdeps/linux/mips/regdef.h $(TOPDIR)/include/ diff --git a/libc/sysdeps/linux/nios/Makefile b/libc/sysdeps/linux/nios/Makefile index 67ee79e55..cdfd9a204 100644 --- a/libc/sysdeps/linux/nios/Makefile +++ b/libc/sysdeps/linux/nios/Makefile @@ -31,12 +31,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -74,7 +75,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/nios/fpu_control.h $(TOPDIR)/include/ @@ -82,4 +82,3 @@ clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h $(RM) $(TOPDIR)/include/fpu_control.h - diff --git a/libc/sysdeps/linux/nios2/Makefile b/libc/sysdeps/linux/nios2/Makefile index 942708429..7cb737e36 100644 --- a/libc/sysdeps/linux/nios2/Makefile +++ b/libc/sysdeps/linux/nios2/Makefile @@ -31,12 +31,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -74,7 +75,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/nios2/fpu_control.h $(TOPDIR)/include/ @@ -82,4 +82,3 @@ clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h $(RM) $(TOPDIR)/include/fpu_control.h - diff --git a/libc/sysdeps/linux/powerpc/Makefile b/libc/sysdeps/linux/powerpc/Makefile index b2da65eba..25cb7047d 100644 --- a/libc/sysdeps/linux/powerpc/Makefile +++ b/libc/sysdeps/linux/powerpc/Makefile @@ -34,12 +34,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(SCRT0_OBJ) $(TOPDIR)lib/ ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) $(RM) $(TOPDIR)lib/Scrt0.o @@ -87,7 +88,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/powerpc/fpu_control.h $(TOPDIR)/include/ @@ -95,4 +95,3 @@ clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h $(RM) gmon-start.S - diff --git a/libc/sysdeps/linux/sh/Makefile b/libc/sysdeps/linux/sh/Makefile index 01e0fb511..3532ef2b9 100644 --- a/libc/sysdeps/linux/sh/Makefile +++ b/libc/sysdeps/linux/sh/Makefile @@ -36,12 +36,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -79,7 +80,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/sh/fpu_control.h $(TOPDIR)/include/ @@ -87,4 +87,3 @@ clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h $(RM) gmon-start.S - diff --git a/libc/sysdeps/linux/sh64/Makefile b/libc/sysdeps/linux/sh64/Makefile index 688df0be0..3b5e8e9d0 100644 --- a/libc/sysdeps/linux/sh64/Makefile +++ b/libc/sysdeps/linux/sh64/Makefile @@ -37,12 +37,13 @@ COBJS = $(patsubst %.c,%.o, $(CSRC)) OBJS = $(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -80,10 +81,8 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h - diff --git a/libc/sysdeps/linux/sparc/Makefile b/libc/sysdeps/linux/sparc/Makefile index 436785747..0e9ede2f5 100644 --- a/libc/sysdeps/linux/sparc/Makefile +++ b/libc/sysdeps/linux/sparc/Makefile @@ -32,12 +32,13 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(MOBJ) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -75,7 +76,6 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: $(LN) -fs ../libc/sysdeps/linux/sparc/fpu_control.h $(TOPDIR)/include/ diff --git a/libc/sysdeps/linux/v850/Makefile b/libc/sysdeps/linux/v850/Makefile index 160bf25d8..e54925096 100644 --- a/libc/sysdeps/linux/v850/Makefile +++ b/libc/sysdeps/linux/v850/Makefile @@ -37,12 +37,13 @@ COBJS = $(patsubst %.c,%.o, $(CSRC)) OBJS = $(SOBJS) $(COBJS) -all: $(OBJS) $(LIBC) +OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) -$(LIBC): ar-target +all: $(OBJ_LIST) -ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) + echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) + $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(TOPDIR)lib/ $(CRT0_OBJ): $(CRT0_SRC) @@ -80,10 +81,8 @@ $(TOPDIR)lib/crtn.o: $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o endif - headers: clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h - diff --git a/libc/termios/Makefile b/libc/termios/Makefile index 6ccfa9a7e..4e43039eb 100644 --- a/libc/termios/Makefile +++ b/libc/termios/Makefile @@ -34,13 +34,12 @@ CSRC=tcgetattr.c tcgetsid.c tcsetattr.c ttyname.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(MOBJ) $(COBJS) +OBJ_LIST=../obj.termios -all: $(OBJS) $(LIBC) +all: $(OBJ_LIST) -$(LIBC): ar-target - -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, termios/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o @@ -52,4 +51,3 @@ $(COBJS): %.o : %.c clean: $(RM) *.[oa] *~ core - diff --git a/libc/unistd/Makefile b/libc/unistd/Makefile index a097f06ea..ed142a8aa 100644 --- a/libc/unistd/Makefile +++ b/libc/unistd/Makefile @@ -42,12 +42,12 @@ endif COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) $(MOBJ1) -all: $(SYSCONF) $(OBJS) $(LIBC) +OBJ_LIST=../obj.unistd -$(LIBC): ar-target subdirs +all: $(OBJ_LIST) -ar-target: $(OBJS) - $(AR) $(ARFLAGS) $(LIBC) $(OBJS) +$(OBJ_LIST): $(OBJS) + echo $(patsubst %, unistd/%, $(OBJS)) > $(OBJ_LIST) $(MOBJ1): $(MSRC1) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o |