3 # Copyright (C) 2001 NEC Corporation
4 # Copyright (C) 2001 Miles Bader <miles@gnu.org>
5 # Copyright (C) 2000 Lineo, inc.
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
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
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
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.
26 include $(TOPDIR)Rules.mak
29 CFLAGS+= -I../ -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
31 TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
34 CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
36 SSRC=setjmp.S longjmp.S vfork.S
37 SOBJS=$(patsubst %.S,%.o, $(SSRC))
40 COBJS=$(patsubst %.c,%.o, $(CSRC))
42 OBJS=$(SOBJS) $(MOBJ) $(COBJS)
49 ar-target: $(OBJS) $(CRT0_OBJ)
50 $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
51 cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
53 $(CRT0_OBJ): %.o : %.S
54 $(CC) $(CFLAGS) -c $< -o $@
55 $(STRIPTOOL) -x -R .note -R .comment $*.o
58 $(CC) $(CFLAGS) -c $< -o $@
59 $(STRIPTOOL) -x -R .note -R .comment $*.o
62 $(CC) $(CFLAGS) -c $< -o $@
63 $(STRIPTOOL) -x -R .note -R .comment $*.o
66 @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h )