source: trunk/libs/newlib/src/libgloss/sparc/libsys/Makefile.in @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 4.1 KB
Line 
1# Makefile for libgloss/sparc/libsys
2# Copyright (c) 1996 Cygnus Support.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# at Cygnus Support, Inc.  Cygnus Support, Inc. may not be used to
11# endorse or promote products derived from this software without
12# specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16
17DESTDIR =
18VPATH = @srcdir@
19srcdir = @srcdir@
20objdir = .
21srcroot = $(srcdir)/../..
22objroot = $(objdir)/../..
23
24prefix = @prefix@
25exec_prefix = @exec_prefix@
26
27host_alias = @host_alias@
28target_alias = @target_alias@
29
30bindir = @bindir@
31libdir = @libdir@
32tooldir = $(exec_prefix)/$(target_alias)
33
34INSTALL = @INSTALL@
35INSTALL_PROGRAM = @INSTALL_PROGRAM@
36INSTALL_DATA = @INSTALL_DATA@
37
38SHELL = /bin/sh
39
40CC = @CC@
41
42AS = @AS@
43AR = @AR@
44LD = @LD@
45RANLIB = @RANLIB@
46
47# _r.o is for the reentrant syscall stubs.
48# The .S_r.o/.c_r.o rules are from host/any.
49
50.SUFFIXES: .c .S .o _r.o
51
52.S_r.o:
53        $(CC) $(CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS) -DREENT $(INCLUDES) -c $< -o $@
54.c_r.o:
55        $(CC) $(CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS) -DREENT $(INCLUDES) -c $< -o $@
56
57# CFILES_R, SFILES_R, and TEMPLATE_SFILES_R define those system calls that are
58# needed by the ANSI C part of newlib when REENTRANT_SYSCALLS_PROVIDED is
59# defined.
60
61CFILES = isatty.c
62
63CFILES_R =
64
65SFILES = cerror.S _exit.S
66
67SFILES_R = sbrk.S
68
69# List of files built from template.S (with an '_' suffix).
70
71TEMPLATE_SFILES = chdir_ lstat_
72
73TEMPLATE_SFILES_R = close_ fstat_ getpid_ kill_ \
74        lseek_ open_ read_ stat_ unlink_ write_
75
76# If newlib defines REENTRANT_SYSCALLS_PROVIDED, then these are used as well.
77REENTRANT_OFILES = $(SFILES_R:.S=_r.o) $(TEMPLATE_SFILES_R:_=_r.o) \
78        $(CFILES_R:.c=_r.o)
79
80OFILES = $(SFILES:.S=.o) $(SFILES_R:.S=.o) \
81        $(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) \
82        $(CFILES:.c=.o) $(CFILES_R:.c=.o) \
83        $(REENTRANT_OFILES)
84
85#### Host specific Makefile fragment comes in here.
86@host_makefile_frag@
87
88all: libsys.a libsys-crt0.o
89
90libsys.a: $(OFILES)
91        rm -f $@
92        $(AR) $(AR_FLAGS) $@ $(OFILES)
93
94install:
95        $(INSTALL_DATA) libsys-crt0.o $(DESTDIR)$(tooldir)/lib/libsys-crt0.o
96        $(INSTALL_DATA) libsys.a $(DESTDIR)$(tooldir)/lib/libsys.a
97
98doc:
99
100.PHONY: info install-info clean-info
101info:
102install-info:
103clean-info:
104
105clean mostlyclean:
106        rm -f *.o *.a *.s stamp-srcs
107
108distclean maintainer-clean realclean: clean
109        rm -f Makefile config.status
110
111Makefile: Makefile.in config.status @host_makefile_frag_path@
112        $(SHELL) config.status
113
114config.status: configure
115        $(SHELL) config.status --recheck
116
117stamp-srcs: Makefile template.S template_r.S
118        for f in $(TEMPLATE_SFILES:_=) ; \
119        do \
120                $(CC) -E -Dfunc=$$f \
121                $(CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS) $(INCLUDES) \
122                $(srcdir)/template.S >$$f.S ; \
123        done
124        for f in $(TEMPLATE_SFILES_R:_=) ; \
125        do \
126                $(CC) -E -Dfunc=$$f \
127                $(CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS) $(INCLUDES) \
128                $(srcdir)/template_r.S | sed -e 's/^_/#/' >$$f.S ; \
129        done
130        touch stamp-srcs
131
132# Make a dependency for each file built from a template.
133
134$(TEMPLATE_SFILES:_=.S) $(TEMPLATE_SFILES_R:_=.S): stamp-srcs
135
136# To support SunOS broken VPATH (sigh).
137
138_exit.o: _exit.S
139cerror.o: cerror.S
140chdir.o: chdir.S
141close.o: close.S
142fstat.o: fstat.S
143getpid.o: getpid.S
144isatty.o: isatty.c
145kill.o: kill.S
146libsys-crt0.o: libsys-crt0.S
147lseek.o: lseek.S
148lstat.o: lstat.S
149open.o: open.S
150read.o: read.S
151sbrk.o: sbrk.S
152stat.o: stat.S
153write.o: write.S
154
155# Reentrant versions ...
156# These are all needed to support the ANSI C library routines.
157
158close_r.o: close.S
159fstat_r.o: fstat.S
160getpid_r.o: getpid.S
161kill_r.o: kill.S
162lseek_r.o: lseek.S
163open_r.o: open.S
164read_r.o: read.S
165sbrk_r.o: sbrk.S
166stat_r.o: stat.S
167unlink_r.o: unlink.S
168write_r.o: write.S
Note: See TracBrowser for help on using the repository browser.