source: trunk/libs/newlib/src/libgloss/mcore/Makefile.in @ 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.3 KB
Line 
1#
2#
3
4DESTDIR =
5VPATH = @srcdir@ @srcdir@/..
6srcdir = @srcdir@
7objdir = .
8srcroot = $(srcdir)/../..
9objroot = $(objdir)/../..
10
11prefix = @prefix@
12exec_prefix = @exec_prefix@
13
14host_alias = @host_alias@
15target_alias = @target_alias@
16
17bindir = @bindir@
18libdir = @libdir@
19tooldir = $(exec_prefix)/$(target_alias)
20
21INSTALL = @INSTALL@
22INSTALL_PROGRAM = @INSTALL_PROGRAM@
23INSTALL_DATA = @INSTALL_DATA@
24
25# Multilib support variables.
26# TOP is used instead of MULTI{BUILD,SRC}TOP.
27MULTIDIRS =
28MULTISUBDIR =
29
30SHELL = /bin/sh
31
32CC = @CC@
33
34AS = @AS@
35AR = @AR@
36LD = @LD@
37RANLIB = @RANLIB@
38
39OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
40        then echo ${objroot}/../binutils/objdump ; \
41        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
42OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
43        then echo ${objroot}/../binutils/objcopy ; \
44        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
45
46OBJS            = fstat.o getpid.o isatty.o kill.o raise.o putnum.o stat.o unlink.o
47CFLAGS          = -g
48SCRIPTS         =
49
50# Here is all of the simulator stuff
51SIM_SCRIPTS     =
52SIM_LDFLAGS     =
53SIM_BSP         = libsim.a
54SIM_CRT0        = crt0.o
55SIM_OBJS        = syscalls.o
56SIM_TEST        = sim-test
57SIM_INSTALL     = install-sim
58
59# Here is all of the picobug on cmb stuff
60MON_PREFIX      = @bsp_prefix@
61MON_LDFLAGS     =
62MON_BSP         = libcmb.a
63MON_CRT0        = crt0.o
64MON_OBJS        = open.o close.o lseek.o sbrk.o read.o write.o print.o cmb-exit.o cmb-inbyte.o cmb-outbyte.o
65MON_SCRIPTS     = cmb.ld cmb.specs
66MON_TEST        =
67MON_INSTALL     = install-mon
68
69# Host specific makefile fragment comes in here.
70@host_makefile_frag@
71
72#
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.
75#
76all: ${SIM_CRT0} ${SIM_BSP} ${MON_BSP}
77
78#
79# here's where we build the board support packages for each target
80#
81${SIM_BSP}: ${OBJS} ${SIM_OBJS}
82        ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS} ${OBJS}
83        ${RANLIB} ${SIM_BSP}
84
85${MON_BSP}: ${OBJS} ${MON_OBJS}
86        ${AR} ${ARFLAGS} ${MON_BSP} ${MON_OBJS} ${OBJS}
87        ${RANLIB} ${MON_BSP}
88
89#
90# here's where we build the test programs for each target
91#
92.PHONY: test
93test:   ${SIM_TEST} ${MON_TEST}
94
95sim-test:       sim-test.x sim-test.dis
96
97sim-test.x:     test.o ${SIM_CRT0} ${SIM_BSP}
98        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
99        ${SIM_CRT0} test.o \
100        -o sim-test.x ${LIBS_FOR_TARGET} -lc ${SIM_BSP}
101
102sim-test.dis:   sim-test.x
103        ${OBJDUMP} -d sim-test.x > sim-test.dis
104
105
106#
107#
108#
109.c.S:
110        ${CC} ${CFLAGS_FOR_TARGET} $(INCLUDES) $(CFLAGS) -c $<
111
112simulator.o: simulator.S
113sim-crt0.o: sim-crt0.S
114cmb-exit.o: cmb-exit.c
115cmb-inbyte.o: cmb-inbyte.c
116cmb-outbyte.o: cmb-outbyte.c
117
118clean mostlyclean:
119        rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(MON_BSP)
120
121distclean maintainer-clean realclean: clean
122        rm -f Makefile config.status *~
123
124.PHONY: install info install-info clean-info
125install: ${SIM_INSTALL} ${MON_INSTALL}
126
127install-mon:
128        set -e; for x in ${MON_CRT0} ${MON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
129        set -e; for x in ${MON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${MON_PREFIX}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
130
131install-sim:
132        set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
133
134doc:
135info:
136install-info:
137clean-info:
138
139Makefile: Makefile.in config.status @host_makefile_frag_path@
140        $(SHELL) config.status
141
142config.status: configure
143        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.