source: trunk/libs/newlib/src/libgloss/spu/Makefile.in @ 453

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

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

File size: 5.0 KB
RevLine 
[444]1# Copyright (c) 1998 Cygnus Support
2#
3# The authors hereby grant permission to use, copy, modify, distribute,
4# and license this software and its documentation for any purpose, provided
5# that existing copyright notices are retained in all copies and that this
6# notice is included verbatim in any distributions. No written agreement,
7# license, or royalty fee is required for any of the authorized uses.
8# Modifications to this software may be copyrighted by their authors
9# and need not follow the licensing terms described here, provided that
10# the new terms are clearly indicated on the first page of each file where
11# they apply.
12
13VPATH = @srcdir@
14srcdir = @srcdir@
15objdir = .
16srcroot = $(srcdir)/../..
17objroot = $(objdir)/../..
18
19prefix = @prefix@
20exec_prefix = @exec_prefix@
21
22host_alias = @host_alias@
23target_alias = @target_alias@
24program_transform_name = @program_transform_name@
25
26bindir = @bindir@
27libdir = @libdir@
28tooldir = $(exec_prefix)/$(target_alias)
29
30# Multilib support variables.
31# TOP is used instead of MULTI{BUILD,SRC}TOP.
32MULTIDIRS =
33MULTISUBDIR =
34MULTIDO = true
35MULTICLEAN = true
36
37INSTALL = @INSTALL@
38INSTALL_PROGRAM = @INSTALL_PROGRAM@
39INSTALL_DATA = @INSTALL_DATA@
40
41SHELL = /bin/sh
42
43CC = @CC@
44
45AS = @AS@
46
47AR = @AR@
48
49LD = @LD@
50
51RANLIB = @RANLIB@
52
53OBJDUMP = `t='$(program_transform_name)'; echo objdump | sed -e $$t`
54OBJCOPY = `t='$(program_transform_name)'; echo objcopy | sed -e $$t`
55
56# object files needed
57OBJS = \
58        access.o chdir.o chmod.o chown.o close.o conv_stat.o dirfuncs.o dup.o \
59        dup2.o exit.o fchdir.o fchmod.o fchown.o fdatasync.o fstat.o fsync.o \
60        ftruncate.o getcwd.o getpagesize.o getpid.o gettimeofday.o isatty.o \
61        kill.o lchown.o  link.o linux_syscalls.o lockf.o lseek.o lstat.o mkdir.o \
62        mknod.o mkstemp.o mktemp.o mmap_eaddr.o mremap_eaddr.o msync_eaddr.o \
63        munmap_eaddr.o nanosleep.o open.o pread.o pwrite.o read.o readlink.o \
64        readv.o rmdir.o sbrk.o sched_yield.o shm_open.o shm_unlink.o stat.o \
65        symlink.o sync.o syscalls.o truncate.o umask.o unlink.o utime.o utimes.o \
66        write.o writev.o linux_getpid.o linux_gettid.o times.o getitimer.o \
67        setitimer.o
68
69# Object files specific to particular targets.
70EVALOBJS = ${OBJS}
71
72GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
73        then echo -L${objroot}/../gcc ; fi`
74
75CRTOBJS = crti.o crtn.o crt1.o crt2.o gcrt1.o gcrt2.o
76OUTPUTS = libgloss.a $(CRTOBJS)
77
78NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` -ffunction-sections -fdata-sections
79NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
80
81INCLUDES = -I. -I$(srcdir)/..
82
83# TODO: Once libspu is installed on the system we can remove this hack
84INCLUDES += -I${srcroot}/../libspu/include
85
86# Note that when building the library, ${MULTILIB} is not the way multilib
87# options are passed; they're passed in $(CFLAGS).
88CFLAGS_FOR_TARGET = ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
89LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
90AR_FLAGS = qc
91
92.c.o:
93        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
94
95.C.o:
96        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
97.s.o:
98        $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<
99
100#
101# GCC knows to run the preprocessor on .S files before it assembles them.
102#
103.S.o:
104        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
105
106#
107# this is a bogus target that'll produce an assembler from the
108# C source with the right compiler options. this is so we can
109# track down code generation or debug symbol bugs.
110#
111.c.s:
112        $(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $<
113
114all: ${OUTPUTS}
115
116#
117# here's where we build the library for each target
118#
119
120libgloss.a: $(EVALOBJS)
121        ${AR} ${ARFLAGS} $@ $(EVALOBJS)
122        ${RANLIB} $@
123
124# C Runtime Library startup code.
125crti.o: $(srcdir)/crti.S
126        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) $(srcdir)/crti.S -c -o crti.o
127
128crtn.o: $(srcdir)/crtn.S
129        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) $(srcdir)/crtn.S -c -o crtn.o
130
131crt1.o: $(srcdir)/crt0.S
132        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) $(srcdir)/crt0.S -c -o crt1.o
133
134crt2.o: $(srcdir)/crt0.S
135        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) $(srcdir)/crt0.S -D_STD_MAIN -c -o crt2.o
136
137gcrt1.o: $(srcdir)/crt0.S
138        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) $(srcdir)/crt0.S -D_PROFILE -c -o gcrt1.o
139
140gcrt2.o: $(srcdir)/crt0.S
141        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) $(srcdir)/crt0.S -D_PROFILE -D_STD_MAIN -c -o gcrt2.o
142
143doc:   
144
145clean mostlyclean:
146        rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x
147
148distclean maintainer-clean realclean: clean
149        rm -f Makefile config.status $(OUTPUTS)
150
151.PHONY: install info install-info clean-info
152install:
153        for outputs in ${OUTPUTS}; do\
154         ${INSTALL_DATA} $${outputs} $(DESTDIR)/${tooldir}/lib${MULTISUBDIR}/$${outputs}; \
155        done
156
157info:
158install-info:
159clean-info:
160
161Makefile: Makefile.in config.status @host_makefile_frag_path@
162        $(SHELL) config.status
163
164config.status: configure
165        $(SHELL) config.status --recheck
166
167syscalls.o close.o fstat.o lseek.o open.o read.o stat.o unlink.o write.o shm_open.o shm_unlink.o: jsre.h
Note: See TracBrowser for help on using the repository browser.