3 # Copyright (C) 2000-2003 Erik Andersen <andersen@uclibc.org>
4 # ported to FR-V by Alexandre Oliva <aoliva@redhat.com>
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
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
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
21 include $(TOPDIR)Rules.mak
24 CRT0_OBJ = crt0.o crt1.o
25 SCRT0_OBJ = $(patsubst %,S%, $(CRT0_OBJ))
26 CRT0_DEPS=gmon-start.S
28 CTOR_TARGETS = crti.o crtn.o
30 SSRC=__longjmp.S setjmp.S clone.S vfork.S
31 SOBJS=$(patsubst %.S,%.o, $(SSRC))
33 CSRC=mmap.c sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
34 CSRC+=xstatconv.c stat.c stat64.c fstat.c fstat64.c lstat.c lstat64.c
35 COBJS=$(patsubst %.c,%.o, $(CSRC))
37 OBJS=$(SOBJS) $(COBJS)
39 OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
43 $(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS)
44 echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
45 $(INSTALL) -d $(TOPDIR)lib/
46 cp $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) $(TOPDIR)lib/
48 $(CRT0_OBJ): $(CRT0_SRC) crtreloc.o
49 $(CC) $(ASFLAGS) -DL_$* -r -nostdlib $< crtreloc.o -o $*.o
50 $(STRIPTOOL) -x -R .note -R .comment $*.o
52 crtreloc.o: crtreloc.c
53 $(CC) $(CFLAGS) -c $< -o $@
55 $(SCRT0_OBJ): $(CRT0_SRC) Scrtreloc.o
56 $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $< Scrtreloc.o -o $*.o
57 $(STRIPTOOL) -x -R .note -R .comment $*.o
59 Scrtreloc.o: crtreloc.c
60 $(CC) $(CFLAGS) $(PIEFLAG) -c $< -o $@
62 $(CTOR_TARGETS): %.o : %.S
63 $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
64 $(STRIPTOOL) -x -R .note -R .comment $*.o
67 $(CC) $(ASFLAGS) -c $< -o $@
68 $(STRIPTOOL) -x -R .note -R .comment $*.o
71 $(CC) $(CFLAGS) -c $< -o $@
72 $(STRIPTOOL) -x -R .note -R .comment $*.o
75 $(LN) -fs ../libc/sysdeps/linux/frv/link.h $(TOPDIR)/include/
79 $(RM) $(TOPDIR)/include/link.h