OSDN Git Service

Update my email address. I am no longer andersen@lineo.com
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / v850 / Makefile
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2001  NEC Corporation
4 # Copyright (C) 2001  Miles Bader <miles@gnu.org>
5 # Copyright (C) 2000  Lineo, inc.
6 #
7 # This program is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU Library General Public License as published by the Free
9 # Software Foundation; either version 2 of the License, or (at your option) any
10 # later version.
11 #
12 # This program is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
15 # details.
16 #
17 # You should have received a copy of the GNU Library General Public License
18 # along with this program; if not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #
21 # Derived in part from the Linux-8086 C library, the GNU C Library, and several
22 # other sundry sources.  Files within this library are copyright by their
23 # respective copyright holders.
24
25 TOPDIR=../../../../
26 include $(TOPDIR)Rules.mak
27 ASFLAGS=$(CFLAGS)
28
29 CFLAGS+= -I../ -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
30
31 TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
32
33 CRT0=crt0.S
34 CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
35
36 SSRC=setjmp.S longjmp.S vfork.S
37 SOBJS=$(patsubst %.S,%.o, $(SSRC))
38
39 CSRC=_mmap.c
40 COBJS=$(patsubst %.c,%.o, $(CSRC))
41
42 OBJS=$(SOBJS) $(MOBJ) $(COBJS)
43
44
45 all: $(OBJS) $(LIBC)
46
47 $(LIBC): ar-target 
48
49 ar-target: $(OBJS) $(CRT0_OBJ)
50         $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
51         cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
52
53 $(CRT0_OBJ): %.o : %.S
54         $(CC) $(CFLAGS) -c $< -o $@
55         $(STRIPTOOL) -x -R .note -R .comment $*.o
56
57 $(SOBJS): %.o : %.S
58         $(CC) $(CFLAGS) -c $< -o $@
59         $(STRIPTOOL) -x -R .note -R .comment $*.o
60
61 $(COBJS): %.o : %.c
62         $(CC) $(CFLAGS) -c $< -o $@
63         $(STRIPTOOL) -x -R .note -R .comment $*.o
64
65 headers:
66         @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) 
67
68 clean:
69         rm -f *.[oa] *~ core