source: trunk/libs/newlib/src/libgloss/iq2000/Makefile.in @ 536

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

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

File size: 3.8 KB
Line 
1# Copyright (c) 2000, Cygnus Solutions, A Red Hat Company
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
13DESTDIR =
14VPATH = @srcdir@
15srcdir = @srcdir@
16objdir = .
17srcroot = $(srcdir)/../..
18objroot = $(objdir)/../..
19
20prefix = @prefix@
21exec_prefix = @exec_prefix@
22
23host_alias = @host_alias@
24target_alias = @target_alias@
25program_transform_name = @program_transform_name@
26
27bindir = @bindir@
28libdir = @libdir@
29tooldir = $(exec_prefix)/$(target_alias)
30
31# Multilib support variables.
32# TOP is used instead of MULTI{BUILD,SRC}TOP.
33MULTIDIRS =
34MULTISUBDIR =
35MULTIDO = true
36MULTICLEAN = true
37
38INSTALL = @INSTALL@
39INSTALL_PROGRAM = @INSTALL_PROGRAM@
40INSTALL_DATA = @INSTALL_DATA@
41
42SHELL = /bin/sh
43
44CC = @CC@
45
46#AS = @AS@
47AS = `if [ -f ${objroot}/../gas/as.new ] ; \
48        then echo ${objroot}/../gas/as.new ; \
49        else echo as ; fi`
50
51AR = @AR@
52
53#LD = @LD@
54LD = `if [ -f ${objroot}/../ld/ld.new ] ; \
55        then echo ${objroot}/../ld/ld.new ; \
56        else echo ld ; fi`
57
58RANLIB = @RANLIB@
59
60OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
61        then echo ${objroot}/../binutils/objdump ; \
62        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
63OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
64        then echo ${objroot}/../binutils/objcopy ; \
65        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
66
67CRT0 = crt0.o
68
69# Generic object files common to all targets.
70GENOBJS = _exit.o access.o chmod.o close.o crt1.o \
71        fstat.o getpid.o gettime.o isatty.o \
72        kill.o lseek.o open.o read.o \
73        sbrk.o stat.o time.o trap.o unlink.o utime.o write.o
74
75# Object files specific to particular targets.
76EVALOBJS = ${GENOBJS}
77
78CFLAGS = -g
79
80GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
81        then echo -L${objroot}/../gcc ; fi`
82
83SCRIPTS = sim
84BSP = libeval.a
85
86# Host specific makefile fragment comes in here.
87@host_makefile_frag@
88
89#
90# build a test program for each target board. Just trying to get
91# it to link is a good test, so we ignore all the errors for now.
92#
93
94all: ${CRT0} test.o ${BSP}
95
96#
97# here's where we build the board support packages for each target
98#
99
100libeval.a: $(EVALOBJS)
101        ${AR} ${ARFLAGS} $@ $(EVALOBJS)
102        ${RANLIB} $@
103
104
105# compile a fully linked binary. The -Wl,-T*.ld is for the linker
106# script. By using -Wl, the linker script is put on the proper place
107# in the comand line for ld, and all the symbols will get fully
108# resolved.
109
110test: $(CRT0) test.o
111        ${CC} $(CFLAGS_FOR_TARGET) -L${srcdir} -L${objdir} \
112        test.o -o $@ $(NEWLIB_LDFLAGS)
113        @echo Done...
114
115doc:   
116
117clean mostlyclean:
118        rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x
119
120distclean maintainer-clean realclean: clean
121        rm -f Makefile config.status a.out
122
123.PHONY: install info install-info clean-info
124install:
125        $(INSTALL_PROGRAM) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
126        @for bsp in ${BSP}; do\
127         $(INSTALL_PROGRAM) $${bsp} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
128        done
129        @for script in ${SCRIPTS}; do\
130         $(INSTALL_DATA) $(srcdir)/$${script}.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${script}.ld; \
131        done
132
133info:
134install-info:
135clean-info:
136
137test.o: ${srcdir}/test.c
138
139# these are for the BSPs
140${CRT0}: ${srcdir}/crt0.S
141
142# target specific makefile fragment comes in here.
143@target_makefile_frag@
144
145Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
146        $(SHELL) config.status
147
148config.status: configure
149        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.