OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [libc/] [stdlib/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
# Makefile for uClibc
2
#
3
# Copyright (C) 2000 by Lineo, inc.
4
# Copyright (C) 2000,2001 Erik Andersen 
5
#
6
# This program is free software; you can redistribute it and/or modify it under
7
# the terms of the GNU Library General Public License as published by the Free
8
# Software Foundation; either version 2 of the License, or (at your option) any
9
# later version.
10
#
11
# This program is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
14
# details.
15
#
16
# You should have received a copy of the GNU Library General Public License
17
# along with this program; if not, write to the Free Software Foundation, Inc.,
18
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
#
20
# Derived in part from the Linux-8086 C library, the GNU C Library, and several
21
# other sundry sources.  Files within this library are copyright by their
22
# respective copyright holders.
23
 
24
TOPDIR=../../
25
include $(TOPDIR)Rules.mak
26
 
27
DIRS:=
28
ifeq ($(MALLOC),y)
29
    DIRS+=malloc
30
endif
31
ifeq ($(MALLOC_SIMPLE),y)
32
    DIRS+=malloc-simple
33
endif
34
ifeq ($(MALLOC_STANDARD),y)
35
    DIRS+=malloc-standard
36
endif
37
 
38
 
39
MSRC = stdlib.c
40
MOBJ = abs.o labs.o atoi.o atol.o strtol.o strtoul.o _stdlib_strto_l.o \
41
       qsort.o bsearch.o \
42
       llabs.o atoll.o strtoll.o strtoull.o _stdlib_strto_ll.o
43
# (aliases) strtoq.o strtouq.o
44
ifeq ($(UCLIBC_HAS_XLOCALE),y)
45
 
46
MOBJx =
47
MOBJx += strtol_l.o strtoul_l.o _stdlib_strto_l_l.o \
48
         strtoll_l.o strtoull_l.o _stdlib_strto_ll_l.o
49
endif
50
 
51
MSRC1 = strtod.c
52
MOBJ1 =
53
MOBJ1x =
54
 
55
ifeq ($(UCLIBC_HAS_FLOATS),y)
56
        MOBJ += atof.o
57
        MOBJ1 += strtod.o strtof.o strtold.o __strtofpmax.o __fp_range_check.o
58
ifeq ($(UCLIBC_HAS_XLOCALE),y)
59
        MOBJ1x += strtod_l.o strtof_l.o strtold_l.o __strtofpmax_l.o
60
endif
61
ifeq ($(UCLIBC_HAS_WCHAR),y)
62
        MOBJ1 += wcstod.o wcstof.o wcstold.o __wcstofpmax.o
63
ifeq ($(UCLIBC_HAS_XLOCALE),y)
64
        MOBJ1x += wcstod_l.o wcstof_l.o wcstold_l.o __wcstofpmax_l.o
65
endif
66
endif
67
endif
68
 
69
ifeq ($(UCLIBC_HAS_WCHAR),y)
70
        MOBJ += mblen.o mbtowc.o wctomb.o mbstowcs.o wcstombs.o \
71
                _stdlib_mb_cur_max.o _stdlib_wcsto_l.o _stdlib_wcsto_ll.o \
72
                wcstol.o wcstoul.o wcstoll.o wcstoull.o
73
ifeq ($(UCLIBC_HAS_XLOCALE),y)
74
        MOBJx += _stdlib_wcsto_l_l.o _stdlib_wcsto_ll_l.o \
75
                 wcstol_l.o wcstoul_l.o wcstoll_l.o wcstoull_l.o
76
endif
77
endif
78
# (aliases) wcstoq.o wcstouq.o
79
# wcstod wcstof wcstold
80
 
81
MSRC2 = atexit.c
82
MOBJ2 = atexit.o on_exit.o __exit_handler.o exit.o
83
 
84
CSRC =  abort.c getenv.c mkdtemp.c mktemp.c realpath.c mkstemp.c mkstemp64.c \
85
        rand.c random.c random_r.c setenv.c system.c div.c ldiv.c getpt.c \
86
        ptsname.c grantpt.c unlockpt.c gcvt.c drand48-iter.c jrand48.c \
87
        jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
88
        nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
89
        valloc.c
90
ifeq ($(UCLIBC_HAS_FLOATS),y)
91
        CSRC += drand48.c drand48_r.c erand48.c erand48_r.c
92
endif
93
COBJS=$(patsubst %.c,%.o, $(CSRC))
94
 
95
OBJS=$(MOBJ) $(MOBJx) $(MOBJ1) $(MOBJ1x) $(MOBJ2) $(COBJS)
96
 
97
all: $(OBJS) $(LIBC)
98
 
99
$(LIBC): ar-target subdirs
100
 
101
ar-target: $(OBJS)
102
        $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
103
 
104
$(MOBJ): $(MSRC)
105
        $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
106
        $(STRIPTOOL) -x -R .note -R .comment $*.o
107
 
108
$(MOBJx): $(MSRC)
109
        $(CC) $(CFLAGS) -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
110
        $(STRIPTOOL) -x -R .note -R .comment $*.o
111
 
112
$(MOBJ1): $(MSRC1)
113
        $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
114
        $(STRIPTOOL) -x -R .note -R .comment $*.o
115
 
116
$(MOBJ1x): $(MSRC1)
117
        $(CC) $(CFLAGS) -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
118
        $(STRIPTOOL) -x -R .note -R .comment $*.o
119
 
120
$(MOBJ2): $(MSRC2)
121
        $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
122
        $(STRIPTOOL) -x -R .note -R .comment $*.o
123
 
124
$(COBJS): %.o : %.c
125
        $(CC) $(CFLAGS) -c $< -o $@
126
        $(STRIPTOOL) -x -R .note -R .comment $*.o
127
 
128
$(OBJ): Makefile
129
 
130
subdirs: $(patsubst %, _dir_%, $(DIRS))
131
subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
132
 
133
$(patsubst %, _dir_%, $(DIRS)) : dummy
134
        $(MAKE) -C $(patsubst _dir_%, %, $@)
135
 
136
$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
137
        $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
138
 
139
clean: subdirs_clean
140
        $(RM) *.[oa] *~ core
141
 
142
.PHONY: dummy
143
 
144
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.