1 | # Copyright (c) 2001, 2005 Red Hat, Inc. |
---|
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 | |
---|
13 | # Makefile for libgloss/mt. This is the board support for the Morpho mt. |
---|
14 | |
---|
15 | VPATH = @srcdir@ @srcdir@/.. |
---|
16 | srcdir = @srcdir@ |
---|
17 | objdir = . |
---|
18 | srcroot = $(srcdir)/../.. |
---|
19 | objroot = $(objdir)/../.. |
---|
20 | |
---|
21 | prefix = @prefix@ |
---|
22 | exec_prefix = @exec_prefix@ |
---|
23 | |
---|
24 | host_alias = @host_alias@ |
---|
25 | target_alias = @target_alias@ |
---|
26 | |
---|
27 | bindir = @bindir@ |
---|
28 | libdir = @libdir@ |
---|
29 | tooldir = $(exec_prefix)/$(target_alias) |
---|
30 | |
---|
31 | # Multilib support variables. |
---|
32 | # TOP is used instead of MULTI{BUILD,SRC}TOP. |
---|
33 | MULTIDIRS = |
---|
34 | MULTISUBDIR = |
---|
35 | MULTIDO = true |
---|
36 | MULTICLEAN = true |
---|
37 | |
---|
38 | INSTALL = @INSTALL@ |
---|
39 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
---|
40 | INSTALL_DATA = @INSTALL_DATA@ |
---|
41 | |
---|
42 | SHELL = /bin/sh |
---|
43 | |
---|
44 | CC = @CC@ |
---|
45 | |
---|
46 | AS = @AS@ |
---|
47 | AR = @AR@ |
---|
48 | LD = @LD@ |
---|
49 | RANLIB = @RANLIB@ |
---|
50 | AR_FLAGS = rc |
---|
51 | |
---|
52 | OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ |
---|
53 | then echo ${objroot}/../binutils/objdump ; \ |
---|
54 | else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` |
---|
55 | OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ |
---|
56 | then echo ${objroot}/../binutils/objcopy ; \ |
---|
57 | else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` |
---|
58 | |
---|
59 | SCRIPTS = 16-002.ld 16-003.ld 64-001.ld ms2.ld |
---|
60 | CRT0 = crt0.o crt0-64-001.o crt0-16-002.o crt0-16-003.o crt0-ms2.o \ |
---|
61 | startup-64-001.o startup-16-002.o startup-16-003.o startup-ms2.o \ |
---|
62 | exit.o exit-64-001.o exit-16-002.o exit-16-003.o exit-ms2.o |
---|
63 | |
---|
64 | SIM_BSP = libsim.a |
---|
65 | SIM_OBJS = access.o chmod.o close.o \ |
---|
66 | fstat.o getpid.o gettime.o isatty.o kill.o lseek.o open.o \ |
---|
67 | read.o sbrk.o stat.o time.o times.o trap.o unlink.o utime.o write.o |
---|
68 | |
---|
69 | #### Host specific Makefile fragment comes in here. |
---|
70 | @host_makefile_frag@ |
---|
71 | |
---|
72 | all: $(CRT0) $(SIM_BSP) |
---|
73 | |
---|
74 | $(SIM_BSP): $(SIM_OBJS) |
---|
75 | $(AR) $(ARFLAGS) $@ $? |
---|
76 | $(RANLIB) $@ |
---|
77 | |
---|
78 | access.o: $(srcdir)/access.c |
---|
79 | chmod.o: $(srcdir)/chmod.c |
---|
80 | close.o: $(srcdir)/close.c |
---|
81 | fstat.o: $(srcdir)/fstat.c |
---|
82 | getpid.o: $(srcdir)/getpid.c |
---|
83 | gettime.o: $(srcdir)/gettime.c |
---|
84 | isatty.o: $(srcdir)/isatty.c |
---|
85 | kill.o: $(srcdir)/kill.c |
---|
86 | lseek.o: $(srcdir)/lseek.c |
---|
87 | open.o: $(srcdir)/open.c |
---|
88 | read.o: $(srcdir)/read.c |
---|
89 | sbrk.o: $(srcdir)/sbrk.c |
---|
90 | stat.o: $(srcdir)/stat.c |
---|
91 | time.o: $(srcdir)/time.c |
---|
92 | times.o: $(srcdir)/times.c |
---|
93 | unlink.o: $(srcdir)/unlink.c |
---|
94 | utime.o: $(srcdir)/utime.c |
---|
95 | write.o: $(srcdir)/write.c |
---|
96 | crt0.o: $(srcdir)/crt0.S |
---|
97 | crt0-16-002.o: $(srcdir)/crt0-16-002.S |
---|
98 | crt0-16-003.o: $(srcdir)/crt0-16-003.S |
---|
99 | crt0-64-001.o: $(srcdir)/crt0-64-001.S |
---|
100 | crt0-ms2.o: $(srcdir)/crt0-ms2.S |
---|
101 | |
---|
102 | trap.o: $(srcdir)/trap.S |
---|
103 | |
---|
104 | install: $($(CPU)_INSTALL) |
---|
105 | for c in $(CRT0); do \ |
---|
106 | $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ; \ |
---|
107 | done; |
---|
108 | $(INSTALL_DATA) $(SIM_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP) |
---|
109 | for c in $(SCRIPTS); do \ |
---|
110 | $(INSTALL_DATA) $(srcdir)/$$c $(DESTDIR)$(tooldir)/lib/$$c ; \ |
---|
111 | done; |
---|
112 | |
---|
113 | clean mostlyclean: |
---|
114 | rm -f *.o *.a |
---|
115 | |
---|
116 | distclean maintainer-clean realclean: clean |
---|
117 | rm -f Makefile config.cache config.log config.status |
---|
118 | |
---|
119 | .PHONY: info dvi doc install-info clean-info |
---|
120 | info doc dvi: |
---|
121 | install-info: |
---|
122 | clean-info: |
---|
123 | |
---|
124 | Makefile: Makefile.in config.status @host_makefile_frag_path@ |
---|
125 | $(SHELL) config.status |
---|
126 | |
---|
127 | config.status: configure |
---|
128 | $(SHELL) config.status --recheck |
---|