Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # libc/sysdeps/linux/v850/Makefile -- Makefile for v850 machine-dependent dir
  3. #
  4. # Copyright (C) 2001 NEC Corporation
  5. # Copyright (C) 2001 Miles Bader <miles@gnu.org>
  6. # Copyright (C) 2000 Lineo, inc.
  7. #
  8. # This file is subject to the terms and conditions of the GNU Library
  9. # General Public License. See the file COPYING.LIB in the main
  10. # directory of this archive for more details.
  11. #
  12. TOPDIR=../../../../
  13. include $(TOPDIR)Rules.mak
  14. ASFLAGS=$(CFLAGS)
  15. CFLAGS+= -I../ -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
  16. TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
  17. CRT0=crt0.S
  18. CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
  19. SSRC=setjmp.S longjmp.S vfork.S
  20. SOBJS=$(patsubst %.S,%.o, $(SSRC))
  21. CSRC=_mmap.c
  22. COBJS=$(patsubst %.c,%.o, $(CSRC))
  23. OBJS=$(SOBJS) $(MOBJ) $(COBJS)
  24. all: $(OBJS) $(LIBC)
  25. $(LIBC): ar-target
  26. ar-target: $(OBJS) $(CRT0_OBJ)
  27. $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
  28. cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
  29. $(CRT0_OBJ): %.o : %.S
  30. $(CC) $(CFLAGS) -c $< -o $@
  31. $(STRIPTOOL) -x -R .note -R .comment $*.o
  32. $(SOBJS): %.o : %.S
  33. $(CC) $(CFLAGS) -c $< -o $@
  34. $(STRIPTOOL) -x -R .note -R .comment $*.o
  35. $(COBJS): %.o : %.c
  36. $(CC) $(CFLAGS) -c $< -o $@
  37. $(STRIPTOOL) -x -R .note -R .comment $*.o
  38. headers:
  39. @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h )
  40. clean:
  41. rm -f *.[oa] *~ core