source: trunk/libs/newlib/src/newlib/libc/sys/sparc64/Makefile.am @ 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: 3.4 KB
Line 
1## Process this file with automake to generate Makefile.in
2
3AUTOMAKE_OPTIONS = cygnus
4
5INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
6
7AM_CCASFLAGS = $(INCLUDES)
8
9noinst_LIBRARIES = lib.a
10
11# _r.o is for the reentrant syscall stubs.
12
13SUFFIXES = _r.o
14
15.S_r.o:
16        $(COMPILE) -DREENT -c $< -o $@
17
18.c_r.o:
19        $(COMPILE) -DREENT -c $< -o $@
20
21# We no longer copy files out of /lib/libc.a.  This is kept around until
22# most of them have replacements.
23#
24#COPYOFILES = \
25#       Ovfork.o _sigvec.o abort.o access.o chown.o creat.o \
26#       errlst.o getdents.o getdtablesize.o getpid.o \
27#       getrusage.o gettimeofday.o ieee_globals.o ioctl.o isatty.o \
28#       kill.o popen.o sbrk.o sigblock.o sigpause.o sigsetmask.o \
29#       sigtramp.o sigvec.o sleep.o setitimer.o start_float.o \
30#       time.o times.o utime.o utimes.o wait3.o
31COPYOFILES =
32
33# These files are from Sun's libc.a but must be renamed because they
34# conflict with other library .o's. They are renamed to xxxS.o.
35# div.o is used by times.o. errno.o conflicts with libc/errno/errno.o.
36#COPYRENAMEOFILES = divS.o errnoS.o
37COPYRENAMEOFILES =
38
39#COPYOMFILES = ieee_flags.o
40COPYOMFILES =
41
42# CFILES_R, SFILES_R, and TEMPLATE_SFILES_R define those system calls that are
43# needed by the ANSI C part of newlib (and thus we must provide namespace
44# clean versions of them because we define REENTRANT_SYSCALLS_PROVIDED).
45
46CFILES = _main.c ieee.c \
47        closedir.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c \
48        telldir.c \
49        creat.c isatty.c utime2.c
50
51CFILES_R =
52
53SFILES = cerror.S crt0.S dup2.S execve.S _exit.S sigsetjmp.S utime.S
54
55SFILES_R = sbrk.S wait.S
56
57# List of files built from template.S (with an '_' suffix).
58
59TEMPLATE_SFILES = access_ chdir_ chmod_ chown_ dup_ fcntl_ \
60        lstat_ mkdir_ pipe_ rmdir_ times_ umask_ utimes_
61
62TEMPLATE_SFILES_R = close_ fork_ fstat_ getpid_ gettimeofday_ kill_ \
63        link_ lseek_ open_ read_ stat_ times_ unlink_ wait4_ write_
64
65OFILES = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) \
66        $(SFILES:.S=.o) $(SFILES_R:.S=.o) $(SFILES_R:.S=_r.o) \
67        $(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) $(TEMPLATE_SFILES_R:_=_r.o) \
68        $(CFILES:.c=.o) $(CFILES_R:.c=.o) $(CFILES_R:.c=_r.o)
69
70lib_a_SOURCES = $(SFILES) $(SFILES_R) $(CFILES) $(CFILES_R)
71lib_a_LIBADD = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) \
72        $(SFILES_R:.S=_r.o) \
73        $(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) \
74        $(TEMPLATE_SFILES_R:_=_r.o) \
75        $(CFILES_R:.c=_r.o)
76
77$(COPYOFILES):
78        $(AR) x /lib/libc.a $(COPYOFILES)
79
80$(COPYRENAMEOFILES):
81        $(AR) x /lib/libc.a $(COPYRENAMEOFILES:S.o=.o)
82        for f in $(COPYRENAMEOFILES); do mv `basename $$f S.o`.o $$f; done
83
84$(COPYOMFILES):
85        $(AR) x /lib/libm.a $(COPYOMFILES)
86
87stamp-srcs: Makefile template.S template_r.S
88        for f in $(TEMPLATE_SFILES:_=); do \
89          $(COMPILE) -E -Dfunc=$$f $(srcdir)/template.S >$$f.S; \
90        done
91        for f in $(TEMPLATE_SFILES_R:_=); do \
92          $(COMPILE) -E -Dfunc=$$f $(srcdir)/template_r.S | sed -e 's/^_/#/' >$$f.S; \
93        done
94        touch stamp-srcs
95
96# Make a dependency for each file built from a template.
97
98$(TEMPLATE_SFILES:_=.S) $(TEMPLATE_SFILES_R:_=.S): stamp-srcs
99
100all-local: crt0.o
101
102close_r.o: close.S
103fork_r.o: fork.S
104fstat_r.o: fstat.S
105getpid_r.o: getpid.S
106gettimeofday_r.o: gettimeofday.S
107kill_r.o: kill.S
108link_r.o: link.S
109lseek_r.o: lseek.S
110open_r.o: open.S
111read_r.o: read.S
112sbrk_r.o: sbrk.S
113stat_r.o: stat.S
114times_r.o: times.S
115unlink_r.o: unlink.S
116wait_r.o: wait.S
117wait4_r.o: wait4.S
118write_r.o: write.S
119
120ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
121CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
Note: See TracBrowser for help on using the repository browser.