1 |
1325 |
phoenix |
# Makefile for uClibc
|
2 |
|
|
#
|
3 |
|
|
# Copyright (C) 2000-2003 Erik Andersen
|
4 |
|
|
#
|
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
|
8 |
|
|
# later version.
|
9 |
|
|
#
|
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
|
13 |
|
|
# details.
|
14 |
|
|
#
|
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
|
18 |
|
|
|
19 |
|
|
TOPDIR=../../
|
20 |
|
|
include $(TOPDIR)Rules.mak
|
21 |
|
|
|
22 |
|
|
DIRS=
|
23 |
|
|
ifeq ($(TARGET_ARCH),$(wildcard $(TARGET_ARCH)))
|
24 |
|
|
DIRS = $(TARGET_ARCH)
|
25 |
|
|
endif
|
26 |
|
|
ALL_SUBDIRS = i386 arm sh64
|
27 |
|
|
|
28 |
|
|
MSRC= wstring.c
|
29 |
|
|
MOBJ= basename.o bcopy.o bzero.o dirname.o ffs.o memccpy.o memchr.o memcmp.o \
|
30 |
|
|
memcpy.o memmove.o mempcpy.o memrchr.o memset.o rawmemchr.o stpcpy.o \
|
31 |
|
|
stpncpy.o strcasecmp.o strcasestr.o strcat.o strchrnul.o strchr.o \
|
32 |
|
|
strcmp.o strcpy.o strcspn.o strdup.o strlen.o strncasecmp.o strncat.o \
|
33 |
|
|
strncmp.o strncpy.o strndup.o strnlen.o strpbrk.o strrchr.o strsep.o \
|
34 |
|
|
strspn.o strstr.o strtok.o strtok_r.o strerror.o _susv3_strerror_r.o \
|
35 |
|
|
_string_syserrmsgs.o _glibc_strerror_r.o \
|
36 |
|
|
_string_syssigmsgs.o sys_siglist.o strsignal.o psignal.o \
|
37 |
|
|
__xpg_basename.o strlcat.o strlcpy.o sys_errlist.o memmem.o
|
38 |
|
|
|
39 |
|
|
MOBJW= wcscasecmp.o wcscat.o wcschrnul.o wcschr.o wcscmp.o wcscpy.o wcscspn.o \
|
40 |
|
|
wcsdup.o wcslen.o wcsncasecmp.o wcsncat.o wcsncmp.o wcsncpy.o \
|
41 |
|
|
wcsnlen.o wcspbrk.o wcsrchr.o wcsspn.o wcsstr.o wcstok.o wmemchr.o \
|
42 |
|
|
wmemcmp.o wmemcpy.o wmemmove.o wmempcpy.o wmemset.o wcpcpy.o wcpncpy.o \
|
43 |
|
|
__wcslcpy.o \
|
44 |
|
|
wcsxfrm.o strxfrm.o # wcscoll strcoll.o
|
45 |
|
|
|
46 |
|
|
MOBJx=
|
47 |
|
|
MOBJWx=
|
48 |
|
|
|
49 |
|
|
ifeq ($(UCLIBC_HAS_XLOCALE),y)
|
50 |
|
|
MOBJx += strcasecmp_l.o strncasecmp_l.o
|
51 |
|
|
MOBJWx += wcscasecmp_l.o wcsncasecmp_l.o wcsxfrm_l.o strxfrm_l.o
|
52 |
|
|
endif
|
53 |
|
|
|
54 |
|
|
#ffsl ffsll
|
55 |
|
|
|
56 |
|
|
OBJS=$(MOBJ) $(MOBJx)
|
57 |
|
|
|
58 |
|
|
ifeq ($(UCLIBC_HAS_WCHAR),y)
|
59 |
|
|
OBJS += $(MOBJW) $(MOBJWx)
|
60 |
|
|
endif
|
61 |
|
|
|
62 |
|
|
all: $(LIBC) subdirs
|
63 |
|
|
|
64 |
|
|
$(LIBC): ar-target
|
65 |
|
|
|
66 |
|
|
ar-target: $(OBJS)
|
67 |
|
|
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
|
68 |
|
|
|
69 |
|
|
$(MOBJ): $(MSRC)
|
70 |
|
|
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
|
71 |
|
|
$(STRIPTOOL) -x -R .note -R .comment $*.o
|
72 |
|
|
|
73 |
|
|
$(MOBJx): $(MSRC)
|
74 |
|
|
$(CC) $(CFLAGS) -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
|
75 |
|
|
$(STRIPTOOL) -x -R .note -R .comment $*.o
|
76 |
|
|
|
77 |
|
|
$(MOBJW): $(MSRC)
|
78 |
|
|
$(CC) $(CFLAGS) -DWANT_WIDE -DL_$* $< -c -o $*.o
|
79 |
|
|
$(STRIPTOOL) -x -R .note -R .comment $*.o
|
80 |
|
|
|
81 |
|
|
$(MOBJWx): $(MSRC)
|
82 |
|
|
$(CC) $(CFLAGS) -DWANT_WIDE -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
|
83 |
|
|
$(STRIPTOOL) -x -R .note -R .comment $*.o
|
84 |
|
|
|
85 |
|
|
$(COBJS): %.o : %.c
|
86 |
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
87 |
|
|
$(STRIPTOOL) -x -R .note -R .comment $*.o
|
88 |
|
|
|
89 |
|
|
clean: subdirs_clean
|
90 |
|
|
$(RM) *.[oa] *~ core
|
91 |
|
|
|
92 |
|
|
subdirs: $(patsubst %, _dir_%, $(DIRS))
|
93 |
|
|
subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
|
94 |
|
|
|
95 |
|
|
$(patsubst %, _dir_%, $(DIRS)) : $(OBJS)
|
96 |
|
|
$(MAKE) -C $(patsubst _dir_%, %, $@)
|
97 |
|
|
|
98 |
|
|
$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
|
99 |
|
|
$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
|
100 |
|
|
|
101 |
|
|
.PHONY: dummy
|
102 |
|
|
|