1 | # |
---|
2 | # |
---|
3 | |
---|
4 | DESTDIR = |
---|
5 | VPATH = @srcdir@ @srcdir@/.. |
---|
6 | srcdir = @srcdir@ |
---|
7 | objdir = . |
---|
8 | srcroot = $(srcdir)/../.. |
---|
9 | objroot = $(objdir)/../.. |
---|
10 | |
---|
11 | prefix = @prefix@ |
---|
12 | exec_prefix = @exec_prefix@ |
---|
13 | |
---|
14 | host_alias = @host_alias@ |
---|
15 | target_alias = @target_alias@ |
---|
16 | |
---|
17 | bindir = @bindir@ |
---|
18 | libdir = @libdir@ |
---|
19 | tooldir = $(exec_prefix)/$(target_alias) |
---|
20 | |
---|
21 | INSTALL = @INSTALL@ |
---|
22 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
---|
23 | INSTALL_DATA = @INSTALL_DATA@ |
---|
24 | |
---|
25 | # Multilib support variables. |
---|
26 | # TOP is used instead of MULTI{BUILD,SRC}TOP. |
---|
27 | MULTIDIRS = |
---|
28 | MULTISUBDIR = |
---|
29 | |
---|
30 | SHELL = /bin/sh |
---|
31 | |
---|
32 | CC = @CC@ |
---|
33 | |
---|
34 | AS = @AS@ |
---|
35 | AR = @AR@ |
---|
36 | LD = @LD@ |
---|
37 | RANLIB = @RANLIB@ |
---|
38 | |
---|
39 | OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ |
---|
40 | then echo ${objroot}/../binutils/objdump ; \ |
---|
41 | else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` |
---|
42 | OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ |
---|
43 | then echo ${objroot}/../binutils/objcopy ; \ |
---|
44 | else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` |
---|
45 | |
---|
46 | OBJS = putnum.o unlink.o |
---|
47 | CFLAGS = -g |
---|
48 | SCRIPTS = |
---|
49 | |
---|
50 | # Here is all of the simulator stuff |
---|
51 | SIM_SCRIPTS = |
---|
52 | SIM_LDFLAGS = |
---|
53 | SIM_BSP = libsim.a |
---|
54 | SIM_CRT0 = crt0.o |
---|
55 | SIM_OBJS = syscalls.o |
---|
56 | SIM_TEST = sim-test |
---|
57 | SIM_INSTALL = install-sim |
---|
58 | |
---|
59 | # Here is all of the mon960 stuff |
---|
60 | MON_LDFLAGS = |
---|
61 | MON_BSP = libmon960.a |
---|
62 | MON_CRT0 = crt0.o |
---|
63 | MON_OBJS = |
---|
64 | MON_SCRIPTS = mon960.ld |
---|
65 | MON_TEST = |
---|
66 | MON_INSTALL = install-mon |
---|
67 | |
---|
68 | # Host specific makefile fragment comes in here. |
---|
69 | @host_makefile_frag@ |
---|
70 | |
---|
71 | # |
---|
72 | # build a test program for each target board. Just trying to get |
---|
73 | # it to link is a good test, so we ignore all the errors for now. |
---|
74 | # |
---|
75 | # all: ${MON_CRT0} ${MON_BSP} |
---|
76 | all: ${SIM_CRT0} ${SIM_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 |
---|
93 | test: ${SIM_TEST} ${MVME_TEST} ${EVM_TEST} |
---|
94 | |
---|
95 | sim-test: sim-test.x sim-test.dis |
---|
96 | |
---|
97 | sim-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 | |
---|
102 | sim-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} -c $< |
---|
111 | |
---|
112 | simulator.o: simulator.S |
---|
113 | sim-crt0.o: sim-crt0.S |
---|
114 | mvme-crt0.o: mvme-crt0.S |
---|
115 | mvme-exit.o: mvme-exit.S |
---|
116 | mvme-inbyte.o: mvme-inbyte.S |
---|
117 | mvme-outbyte.o: mvme-outbyte.S |
---|
118 | |
---|
119 | clean mostlyclean: |
---|
120 | rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(MON_BSP) |
---|
121 | |
---|
122 | distclean maintainer-clean realclean: clean |
---|
123 | rm -f Makefile config.status *~ |
---|
124 | |
---|
125 | .PHONY: install info install-info clean-info |
---|
126 | install: ${SIM_INSTALL} |
---|
127 | |
---|
128 | install-mon: |
---|
129 | set -e; for x in ${MON_CRT0} ${MON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done |
---|
130 | set -e; for x in ${MON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done |
---|
131 | |
---|
132 | install-sim: |
---|
133 | set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib/$$x; done |
---|
134 | |
---|
135 | doc: |
---|
136 | info: |
---|
137 | install-info: |
---|
138 | clean-info: |
---|
139 | |
---|
140 | Makefile: Makefile.in config.status @host_makefile_frag_path@ |
---|
141 | $(SHELL) config.status |
---|
142 | |
---|
143 | config.status: configure |
---|
144 | $(SHELL) config.status --recheck |
---|