OSDN Git Service

Yet more updates. Getting closer....
[uclinux-h8/uClibc.git] / libc / string / Makefile
1 # Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk>
2 # This file is part of the Linux-8086 C library and is distributed
3 # under the GNU Library General Public License.
4
5 TOPDIR=../
6 include $(TOPDIR)Rules.make
7 LIBC=$(TOPDIR)libc.a
8
9 MSRC=string.c
10 MOBJ=strlen.o strcat.o strcpy.o strcmp.o strncat.o strncpy.o strncmp.o \
11         strchr.o strrchr.o strdup.o memcpy.o memccpy.o memchr.o memset.o \
12         memcmp.o memmove.o movedata.o
13 CFILES=strpbrk.c strsep.c strstr.c strtok.c strcspn.c \
14     strspn.c strcasecmp.c strncasecmp.c config.c
15 COBJS=$(patsubst %.c,%.o, $(CFILES))
16
17
18 all: $(COBJS) $(MOBJ) $(LIBC)
19
20 $(COBJS): $(CFILES)
21         $(CC) $(CFLAGS) -c $*.c -o $@
22
23 $(MOBJ): $(MSRC)
24         $(CC) $(CFLAGS) -DL_$* -c $(MSRC) -o $@
25
26 $(LIBC): $(COBJS) $(MOBJ)
27         $(AR) $(ARFLAGS) $(LIBC) $(COBJS) $(MOBJ)
28
29 clean:
30         rm -f *.o
31
32