OSDN Git Service

Update my email address. I am no longer andersen@lineo.com
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / m68k / Makefile
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000 by Lineo, inc.
4 # Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
5 #
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
9 # later version.
10 #
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
14 # details.
15 #
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
19 #
20 # Derived in part from the Linux-8086 C library, the GNU C Library, and several
21 # other sundry sources.  Files within this library are copyright by their
22 # respective copyright holders.
23
24 TOPDIR=../../../../
25 include $(TOPDIR)Rules.mak
26 ASFLAGS=$(CFLAGS)
27
28 # If you're looking for vfork(), it is defined in include/unistd.h
29
30
31 ifeq ($(HAS_MMU),true)
32 CRT0=crt0.c
33 CRT0_OBJ=$(patsubst %.c,%.o, $(CRT0))
34 else
35 CRT0=crt0.S
36 CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
37 endif
38
39 SSRC=setjmp.S vfork.S # longjmp.S _start.S clone.S
40 SOBJS=$(patsubst %.S,%.o, $(SSRC))
41
42 CSRC=ptrace.c
43 COBJS=$(patsubst %.c,%.o, $(CSRC))
44
45 OBJS=$(SOBJS) $(MOBJ) $(COBJS)
46
47
48
49 all: $(OBJS) $(LIBC)
50
51 $(LIBC): ar-target 
52
53 ar-target: $(OBJS) $(CRT0_OBJ)
54         $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
55         cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
56
57 ifeq ($(HAS_MMU),true)
58 $(CRT0_OBJ): %.o : %.c
59 else
60 $(CRT0_OBJ): %.o : %.S
61 endif
62         $(CC) $(CFLAGS) -c $< -o $@
63         $(STRIPTOOL) -x -R .note -R .comment $*.o
64
65 $(SOBJS): %.o : %.S
66         $(CC) $(CFLAGS) -c $< -o $@
67         $(STRIPTOOL) -x -R .note -R .comment $*.o
68
69 $(COBJS): %.o : %.c
70         $(CC) $(CFLAGS) -c $< -o $@
71         $(STRIPTOOL) -x -R .note -R .comment $*.o
72
73 headers:
74         @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) 
75         cd $(TOPDIR)/include/sys;ln -fs ../../libc/sysdeps/linux/m68k/reg.h .
76 ifeq ($(strip $(HAVE_ELF)),false)
77         echo "Working around compiler bug in the m68k-pic-coff toolchain"
78         cd $(TOPDIR)/include;ln -fs ../libc/sysdeps/linux/m68k/float.h .
79 endif
80
81
82 clean:
83         rm -f *.[oa] *~ core
84 ifeq ($(strip $(HAVE_ELF)),false)
85         rm -f $(TOPDIR)/include/float.h
86 endif
87