From eb2ecd0b083611bdd07c5352ffc9cfa22e0de711 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 4 Oct 2000 23:26:55 +0000 Subject: Fix all the makefiles. Clean up some warnings, cleanup some headers. -Erik --- libc/stdlib/Makefile | 50 +++++++++++++++++++++++++++++---------------- libc/stdlib/malloc/Makefile | 32 +++++++++++++++++++++-------- 2 files changed, 56 insertions(+), 26 deletions(-) (limited to 'libc/stdlib') diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile index a7cf3a844..3db182c5f 100644 --- a/libc/stdlib/Makefile +++ b/libc/stdlib/Makefile @@ -1,42 +1,56 @@ -# Copyright (C) 1995,1996 Robert de Bath -# This file is part of the Linux-8086 C library and is distributed -# under the GNU Library General Public License. +# 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 General Public License for more +# details. +# +# You should have received a copy of the GNU 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)Rules.make LIBC=$(TOPDIR)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 -CFILES=atoi.c atol.c ltoa.c ltostr.c ctype.c qsort.c bsearch.c rand.c lsearch.c \ +CSRC=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)) - +COBJS=$(patsubst %.c,%.o, $(CSRC)) -all: $(COBJS) $(MOBJ) $(MOBJ2) $(LIBC) +all: $(MOBJ) $(MOBJ2) $(COBJS) $(LIBC) -$(COBJS): $(CFILES) - $(CC) $(CFLAGS) -c $*.c -o $@ +$(LIBC): $(MOBJ) $(MOBJ2) $(COBJS) + $(AR) $(ARFLAGS) $(LIBC) $(MOBJ) $(MOBJ2) $(COBJS) $(MOBJ): $(MSRC) - $(CC) $(CFLAGS) -DL_$* -c $(MSRC) -o $@ + $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o $(MOBJ2): $(MSRC2) - $(CC) $(CFLAGS) -DL_$* -c $(MSRC2) -o $@ + $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o -$(LIBC): $(COBJS) $(MOBJ) $(MOBJ2) - $(AR) $(ARFLAGS) $(LIBC) $(COBJS) $(MOBJ) $(MOBJ2) +$(COBJS): $(CSRC) -clean: - rm -f *.o +clean: + rm -f *.[oa] *~ core diff --git a/libc/stdlib/malloc/Makefile b/libc/stdlib/malloc/Makefile index 34c1b0538..d4ecab0b9 100644 --- a/libc/stdlib/malloc/Makefile +++ b/libc/stdlib/malloc/Makefile @@ -1,24 +1,40 @@ -# Copyright (C) 1996 Robert de Bath -# This file is part of the Linux-8086 C library and is distributed -# under the GNU Library General Public License. +# 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 General Public License for more +# details. +# +# You should have received a copy of the GNU 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)Rules.make - 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 -all: $(LIBC)($(MOBJ)) +all: $(MOBJ) $(LIBC) $(LIBC): $(MOBJ) + $(AR) $(ARFLAGS) $(LIBC) $(MOBJ) $(MOBJ): $(MSRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o - $(AR) $(ARFLAGS) $(LIBC) $*.o clean: - rm -f *.o libc.a - + rm -f *.[oa] *~ core -- cgit v1.2.3