Changes for 4.5.0 snapshot
[newlib-cygwin.git] / libgloss / crx / Makefile.in
blob1ac3086975912c9fa25fecc9c34694235187140e
4 DESTDIR =
6 VPATH = @srcdir@ @srcdir@/..
7 srcdir = @srcdir@
8 objdir = .
9 srcroot = $(srcdir)/../..
10 objroot = $(objdir)/../..
12 prefix = @prefix@
13 exec_prefix = @exec_prefix@
15 host_alias = @host_alias@
16 target_alias = @target_alias@
18 bindir = @bindir@
19 libdir = @libdir@
20 tooldir = $(exec_prefix)/$(target_alias)
22 INSTALL = @INSTALL@
23 INSTALL_PROGRAM = @INSTALL_PROGRAM@
24 INSTALL_DATA = @INSTALL_DATA@
26 # Multilib support variables.
27 # TOP is used instead of MULTI{BUILD,SRC}TOP.
28 MULTIDIRS =
29 MULTISUBDIR =
31 SHELL = /bin/sh
33 mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs
35 CC = @CC@
37 AS = @AS@
38 AR = @AR@
39 LD = @LD@
40 RANLIB = @RANLIB@
42 OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
43 then echo ${objroot}/../binutils/objdump ; \
44 else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
45 OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
46 then echo ${objroot}/../binutils/objcopy ; \
47 else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
49 # Here is all of the handlers stuff
50 H_SCRIPTS =
51 H_BSP = libh.a
52 H_OBJS = intable.o dvz_hndl.o flg_hndl.o iad_hndl.o svc_hndl.o und_hndl.o
53 H_TEST = hndl-test
54 H_INSTALL = install-hndl
56 # Here is all of the simulator stuff
57 SIM_SCRIPTS = sim.ld
58 SIM_BSP = libsim.a
59 SIM_OBJS = _exit.o close.o _getenv.o lseek.o open.o read.o \
60 _rename.o sbrk.o time.o unlink.o write.o \
61 stat.o putnum.o kill.o getpid.o isatty.o fstat.o
62 SIM_TEST = sim-test
63 SIM_INSTALL = install-sim
65 # Here is all of the CRT stuff
66 CRT = crti.o crtn.o crt0.o
67 CRT_INSTALL = install-crt
69 # Host specific makefile fragment comes in here.
70 @host_makefile_frag@
73 # build a test program for each target board. Just trying to get
74 # it to link is a good test, so we ignore all the errors for now.
76 all: ${CRT} ${SIM_BSP} ${H_BSP}
79 # here's where we build the board support packages for each target
81 ${H_BSP}: ${H_OBJS}
82 ${AR} ${ARFLAGS} ${H_BSP} ${H_OBJS}
83 ${RANLIB} ${H_BSP}
85 ${SIM_BSP}: ${SIM_OBJS}
86 ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS}
87 ${RANLIB} ${SIM_BSP}
90 # here's where we build the test programs for each target
92 .PHONY: test
93 test: ${SIM_TEST} ${H_TEST}
95 hndl-test: hndl-test.x hndl-test.dis
97 hndl-test.x: test.o ${H_BSP}
98 ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
99 test.o \
100 -o hndl-test.x ${LIBS_FOR_TARGET} -lc ${H_BSP} -Wl,-T${SIM_SCRIPTS}
102 hndl-test.dis: hndl-test.x
103 ${OBJDUMP} -d hndl-test.x > hndl-test.dis
106 sim-test: sim-test.x sim-test.dis
108 sim-test.x: test.o ${SIM_BSP}
109 ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
110 test.o \
111 -o sim-test.x ${LIBS_FOR_TARGET} -lc ${SIM_BSP} -Wl,-T${SIM_SCRIPTS}
113 sim-test.dis: sim-test.x
114 ${OBJDUMP} -d sim-test.x > sim-test.dis
119 .c.S:
120 ${CC} ${CFLAGS_FOR_TARGET} -c $<
122 clean mostlyclean:
123 rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(H_BSP)
125 distclean maintainer-clean realclean: clean
126 rm -f Makefile *~
128 .PHONY: install info install-info clean-info
129 install: ${CRT_INSTALL} ${SIM_INSTALL} ${H_INSTALL}
131 install-crt:
132 ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
133 set -e; for x in ${CRT} ; do\
134 ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
135 done
137 install-sim:
138 ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
139 for x in ${SIM_BSP} ; do\
140 ${INSTALL_PROGRAM} $${x} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
141 done
142 for x in ${SIM_SCRIPTS}; do\
143 ${INSTALL_DATA} ${srcdir}/$${x} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
144 done
146 install-hndl:
147 ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
148 for x in ${H_BSP}; do\
149 ${INSTALL_PROGRAM} $${x} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
150 done
152 doc:
153 info:
154 install-info:
155 clean-info:
157 Makefile: Makefile.in ../config.status
158 cd .. && $(SHELL) config.status