3 # Copyright (C) 2000 by Lineo, inc.
5 # This program is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Library General Public License as published by the Free
7 # Software Foundation; either version 2 of the License, or (at your option) any
10 # This program is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
15 # You should have received a copy of the GNU Library General Public License
16 # along with this program; if not, write to the Free Software Foundation, Inc.,
17 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # Derived in part from the Linux-8086 C library, the GNU C Library, and several
20 # other sundry sources. Files within this library are copyright by their
21 # respective copyright holders.
24 include $(TOPDIR)Rules.mak
27 ALL_SUBDIRS = malloc malloc-930716 malloc-simple
30 MOBJ=strtol.o strtoul.o strto_l.o atoi.o atol.o
33 MOBJ1=strtoll.o strtoull.o strto_ll.o atoll.o
39 CSRC = abort.c getenv.c mktemp.c qsort.c realpath.c abs.c bsearch.c \
40 mkstemp.c putenv.c rand.c random.c setenv.c system.c div.c ldiv.c \
41 getpt.c ptsname.c grantpt.c unlockpt.c gcvt.c
42 ifeq ($(HAS_FLOATING_POINT),true)
45 COBJS=$(patsubst %.c,%.o, $(CSRC))
48 OBJS=$(MOBJ) $(MOBJ2) $(COBJS)
49 ifeq ($(HAS_LONG_LONG),true)
55 $(LIBC): ar-target subdirs
58 $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
61 $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
62 $(STRIPTOOL) -x -R .note -R .comment $*.o
65 $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
66 $(STRIPTOOL) -x -R .note -R .comment $*.o
69 $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
70 $(STRIPTOOL) -x -R .note -R .comment $*.o
73 $(CC) $(CFLAGS) -c $< -o $@
74 $(STRIPTOOL) -x -R .note -R .comment $*.o
78 subdirs: $(patsubst %, _dir_%, $(DIRS))
79 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
81 $(patsubst %, _dir_%, $(DIRS)) : dummy
82 $(MAKE) -C $(patsubst _dir_%, %, $@)
84 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
85 $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean