source: trunk/libs/newlib/src/libgloss/cr16/Makefile.in @ 679

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

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

File size: 3.5 KB
Line 
1#
2#
3
4DESTDIR =
5
6VPATH = @srcdir@ @srcdir@/..
7srcdir = @srcdir@
8objdir = .
9srcroot = $(srcdir)/../..
10objroot = $(objdir)/../..
11
12prefix = @prefix@
13exec_prefix = @exec_prefix@
14
15host_alias = @host_alias@
16target_alias = @target_alias@
17
18bindir = @bindir@
19libdir = @libdir@
20tooldir = $(exec_prefix)/$(target_alias)
21
22INSTALL = @INSTALL@
23INSTALL_PROGRAM = @INSTALL_PROGRAM@
24INSTALL_DATA = @INSTALL_DATA@
25
26# Multilib support variables.
27# TOP is used instead of MULTI{BUILD,SRC}TOP.
28MULTIDIRS =
29MULTISUBDIR =
30
31SHELL = /bin/sh
32
33CC = @CC@
34
35AS = @AS@
36AR = @AR@
37LD = @LD@
38RANLIB = @RANLIB@
39
40OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
41        then echo ${objroot}/../binutils/objdump ; \
42        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
43OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
44        then echo ${objroot}/../binutils/objcopy ; \
45        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
46
47# Here is all of the handlers stuff
48H_SCRIPTS       =
49H_BSP   = libh.a
50H_OBJS  = intable.o dvz_hndl.o flg_hndl.o iad_hndl.o svc_hndl.o und_hndl.o
51H_TEST  = hndl-test
52H_INSTALL       = install-hndl
53
54# Here is all of the simulator stuff
55SIM_SCRIPTS     = sim.ld
56SIM_BSP = libsim.a
57SIM_OBJS = _exit.o close.o _getenv.o lseek.o open.o read.o \
58        _rename.o sbrk.o time.o unlink.o write.o \
59        stat.o putnum.o kill.o getpid.o isatty.o fstat.o
60SIM_TEST        = sim-test
61SIM_INSTALL     = install-sim
62
63# Here is all of the CRT stuff
64CRT     = crti.o crtn.o crt1.o
65CRT_INSTALL = install-crt
66
67# Host specific makefile fragment comes in here.
68@host_makefile_frag@
69
70#
71# build a test program for each target board. Just trying to get
72# it to link is a good test, so we ignore all the errors for now.
73#
74all: ${CRT} ${SIM_BSP} ${H_BSP}
75
76#
77# here's where we build the board support packages for each target
78#
79${H_BSP}: ${H_OBJS}
80        ${AR} ${ARFLAGS} ${H_BSP} ${H_OBJS}
81        ${RANLIB} ${H_BSP}
82
83${SIM_BSP}: ${SIM_OBJS}
84        ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS}
85        ${RANLIB} ${SIM_BSP}
86
87#
88# here's where we build the test programs for each target
89#
90.PHONY: test
91test:   ${SIM_TEST} ${H_TEST}
92
93hndl-test:      hndl-test.x hndl-test.dis
94
95hndl-test.x:    test.o ${H_BSP}
96        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
97        test.o \
98        -o hndl-test.x ${LIBS_FOR_TARGET} -lc ${H_BSP} -Wl,-T${SIM_SCRIPTS}
99
100hndl-test.dis:  hndl-test.x
101        ${OBJDUMP} -d hndl-test.x > hndl-test.dis
102
103
104sim-test:       sim-test.x sim-test.dis
105
106sim-test.x:     test.o ${SIM_BSP}
107        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
108        test.o \
109        -o sim-test.x ${LIBS_FOR_TARGET} -lc ${SIM_BSP} -Wl,-T${SIM_SCRIPTS}
110
111sim-test.dis:   sim-test.x
112        ${OBJDUMP} -d sim-test.x > sim-test.dis
113
114#
115#
116#
117.c.S:
118        ${CC} ${CFLAGS_FOR_TARGET} -c $<
119
120clean mostlyclean:
121        rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(H_BSP)
122
123distclean maintainer-clean realclean: clean
124        rm -f Makefile config.status *~
125
126.PHONY: install info install-info clean-info
127install: ${CRT_INSTALL} ${SIM_INSTALL} ${H_INSTALL}
128
129install-crt:
130        set -e; for x in ${CRT} ; do\
131          ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
132        done
133
134install-sim:
135        for x in ${SIM_BSP} ; do\
136         ${INSTALL_PROGRAM} $${x} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
137        done
138        for x in ${SIM_SCRIPTS}; do\
139         ${INSTALL_DATA} ${srcdir}/$${x} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
140        done
141
142install-hndl:
143        for x in ${H_BSP}; do\
144         ${INSTALL_PROGRAM} $${x} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
145        done
146
147doc:
148info:
149install-info:
150clean-info:
151
152Makefile: Makefile.in config.status @host_makefile_frag_path@
153        $(SHELL) config.status
154
155config.status: configure
156        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.