summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-08-11 01:23:29 +0000
committerEric Andersen <andersen@codepoet.org>2000-08-11 01:23:29 +0000
commit84866232d9644a02d613e11710d0f3abe8c7a66e (patch)
treea049bcdec016a50126beb40941fc786aa4a8b150 /libc/stdlib
parent3973dd83bfc875c6ec2d71b99f17e72b578d517d (diff)
Yet more updates. Getting closer....
-Erik
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/Makefile57
1 files changed, 20 insertions, 37 deletions
diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile
index 6f33f8afc..a7cf3a844 100644
--- a/libc/stdlib/Makefile
+++ b/libc/stdlib/Makefile
@@ -4,56 +4,39 @@
TOPDIR=../
include $(TOPDIR)Rules.make
+LIBC=$(TOPDIR)libc.a
-LIBC=../libc.a
MSRC=aliases.c
-MOBJ=abs.o remove.o creat.o bcopy.o bzero.o
-# raise.o bcmp.o index.o rindex.o
+MOBJ=abs.o remove.o creat.o bcopy.o bzero.o
+ # raise.o bcmp.o index.o rindex.o
+MSRC2=atexit.c
+MOBJ2=on_exit.o atexit.o __do_exit.o exit.o
-ESRC=atexit.c
-EOBJ=on_exit.o atexit.o __do_exit.o exit.o
+CFILES=atoi.c atol.c ltoa.c ltostr.c ctype.c qsort.c bsearch.c rand.c lsearch.c \
+ getopt.c glob.c fnmatch.c itoa.c strtod.c strtol.c crypt.c sleep.c \
+ mkstemp.c mktemp.c realpath.c getenv.c putenv.c popen.c system.c \
+ getcwd.c setenv.c execl.c execv.c execlp.c execvp.c execvep.c
+COBJS=$(patsubst %.c,%.o, $(CFILES))
-GOBJ=atoi.o atol.o ltoa.o ltostr.o \
- ctype.o qsort.o bsearch.o rand.o lsearch.o getopt.o \
- glob.o fnmatch.o itoa.o strtol.o crypt.o sleep.o mkstemp.o \
- mktemp.o realpath.o
-UOBJ=getenv.o putenv.o popen.o system.o getcwd.o setenv.o \
- execl.o execv.o execlp.o execvp.o execvep.o
+all: $(COBJS) $(MOBJ) $(MOBJ2) $(LIBC)
-OBJ=$(MOBJ) $(EOBJ) $(GOBJ) $(UOBJ)
+$(COBJS): $(CFILES)
+ $(CC) $(CFLAGS) -c $*.c -o $@
-## No ELKS strtod() until BCC does 16 bit FP...
-#ifneq ($(LIB_CPU),i86)
-#OBJ+=strtod.o
-#endif
+$(MOBJ): $(MSRC)
+ $(CC) $(CFLAGS) -DL_$* -c $(MSRC) -o $@
-all: $(LIBC)
+$(MOBJ2): $(MSRC2)
+ $(CC) $(CFLAGS) -DL_$* -c $(MSRC2) -o $@
-$(LIBC): $(LIBC)($(OBJ))
-
-$(LIBC)($(MOBJ)): $(MSRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(AR) $(ARFLAGS) $@ $*.o
-
-$(LIBC)($(EOBJ)): $(ESRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(AR) $(ARFLAGS) $@ $*.o
+$(LIBC): $(COBJS) $(MOBJ) $(MOBJ2)
+ $(AR) $(ARFLAGS) $(LIBC) $(COBJS) $(MOBJ) $(MOBJ2)
clean:
- rm -f *.o libc.a
-
-$(LIBC)(strtol.o): strtol.c
- $(CC) -c -ansi $(ARCH) $(CCFLAGS) $(DEFS) $*.c
- $(AR) $(ARFLAGS) $@ $*.o
+ rm -f *.o
-$(LIBC)(strtod.o): strtod.c
- $(CC) -c -ansi $(ARCH) $(CCFLAGS) $(DEFS) $*.c
- $(AR) $(ARFLAGS) $@ $*.o
-$(LIBC)(crypt.o): crypt.c
- $(CC) -c -ansi $(ARCH) $(CCFLAGS) $(DEFS) $*.c
- $(AR) $(ARFLAGS) $@ $*.o