OSDN Git Service

8a860f18837b4b432ebf8abe37497d9aa388829a
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / cris / Makefile
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000-2003 Erik Andersen <andersen@uclibc.org>
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 ASFLAGS=$(CFLAGS)
22
23 CRT0_SRC = crt0.c
24 CRT0_OBJ = crt0.o crt1.o
25
26 SSRC= setjmp.S __longjmp.S clone.S sysdep.S syscall.S
27 ifeq ($(UNIFIED_SYSCALL),y)
28         SSRC += __uClibc_syscall.S
29 endif
30 SOBJS=$(patsubst %.S,%.o, $(SSRC))
31
32 CSRC= __init_brk.c brk.c sbrk.c vfork.c
33 COBJS=$(patsubst %.c,%.o, $(CSRC))
34
35 OBJS=$(SOBJS) $(COBJS)
36
37
38 all: $(OBJS) $(LIBC)
39
40 $(LIBC): ar-target 
41
42 ar-target: $(OBJS) $(CRT0_OBJ)
43         $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
44         cp $(CRT0_OBJ) $(TOPDIR)lib/
45
46 $(CRT0_OBJ): $(CRT0_SRC)
47         $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
48         $(STRIPTOOL) -x -R .note -R .comment $*.o
49
50 $(SOBJS): %.o : %.S
51         $(CC) $(CFLAGS) -c $< -o $@
52         $(STRIPTOOL) -x -R .note -R .comment $*.o
53
54 $(COBJS): %.o : %.c
55         $(CC) $(CFLAGS) -c $< -o $@
56         $(STRIPTOOL) -x -R .note -R .comment $*.o
57
58 headers:
59
60 clean:
61         rm -f *.[oa] *~ core
62