1 # Makefile template for Configure for the erc32sim library.
2 # Copyright (C) 1993 Free Software Foundation, Inc.
3 # Written by Cygnus Support
4 # Modified by J.Gaisler ESA/ESTEC
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 exec_prefix = @
exec_prefix@
26 host_alias
= @host_alias@
27 target_alias
= @target_alias@
28 program_transform_name
= @program_transform_name@
31 tooldir
= $(exec_prefix)/$(target_alias
)
35 man1dir = $(mandir)/man1
36 man2dir = $(mandir)/man2
37 man3dir = $(mandir)/man3
38 man4dir = $(mandir)/man4
39 man5dir = $(mandir)/man5
40 man6dir = $(mandir)/man6
41 man7dir = $(mandir)/man7
42 man8dir = $(mandir)/man8
43 man9dir = $(mandir)/man9
45 includedir = @
includedir@
50 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
51 INSTALL_DATA
= @INSTALL_DATA@
52 INSTALL_XFORM
= $(INSTALL
) -t
='$(program_transform_name)'
53 INSTALL_XFORM1
= $(INSTALL_XFORM
) -b
=.1
61 CC_FOR_BUILD
= @CC_FOR_BUILD@
64 # UARTS run at about 115200 baud (simulator time). Add -DFAST_UART to
65 # CFLAGS if faster (infinite) UART speed is desired. Might affect the
66 # behaviour of UART interrupt routines ...
69 CFLAGS2
= -g
-O3
-DSTAT
-DFAST_UART
-DIUREV0
-DMECREV0
71 INCDIR
= $(srcdir)/..
/..
/include
72 CSEARCH
= -I.
-I
$(srcdir) -I
$(INCDIR
) -I..
/..
/bfd
-I
$(srcdir)/..
/..
/bfd \
73 -I
$(srcdir)/..
/..
/gdb
-I
$(srcdir)/..
/..
/gdb
/config
79 CFILES
= sis.c exec.c erc32.c interf.c run.c help.c float.c
80 OFILES
= exec.o erc32.o func.o help.o float.o
83 all: end.h sis run
$(TARGETLIB
)
86 $(CC_FOR_BUILD
) $(srcdir)/end.c
-o end
92 $(CC
) $(CFLAGS
) $(CLAGS2
) -o sis sis.o
$(OFILES
) \
93 ..
/..
/opcodes
/libopcodes.a ..
/..
/readline
/libreadline.a \
94 ..
/..
/bfd
/libbfd.a ..
/..
/libiberty
/libiberty.a \
97 run
: run.o interf.o
$(OFILES
)
98 $(CC
) $(CFLAGS
) $(CLAGS2
) -o run run.o interf.o
$(OFILES
) \
99 ..
/..
/opcodes
/libopcodes.a ..
/..
/readline
/libreadline.a \
100 ..
/..
/bfd
/libbfd.a ..
/..
/libiberty
/libiberty.a \
104 rm -f
*.o libsim.a sis run end end.h config.log
107 rm -rf Makefile config.status sysdep.h
109 #### host and target dependent Makefile fragments come in here.
113 "against=$(against)" \
115 "AR_FLAGS=$(AR_FLAGS)" \
119 "MAKEINFO=$(MAKEINFO)" \
120 "INSTALL=$(INSTALL)" \
121 "INSTALL_DATA=$(INSTALL_DATA)" \
122 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
125 $(OFILES
) sis.o interf.o
: end.h sis.h
128 $(CC
) -c
$(CFLAGS
) $(CFLAGS2
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
131 # C source files that correspond to .o's.
133 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
146 # HDEPFILES comes from the host config; TDEPFILES from the target config.
149 $(TARGETLIB
): $(OFILES
) interf.o
151 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
) interf.o
152 $(RANLIB
) $(TARGETLIB
)
154 # Circumvent Sun Make bug with VPATH.
155 sparc-opc.o
: sparc-opc.c
160 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
163 sis.o
: sis.c sis.h end.h
164 exec.o
: exec.c sis.h end.h
165 erc32.o
: erc32.c sis.h end.h
166 interf.o
: interf.c sis.h end.h
169 float.o
: float.c sis.h end.h
171 # Mark everything as depending on config.status, since the timestamp on
172 # sysdep.h might actually move backwards if we reconfig and relink it
173 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
174 RECONFIG
= config.status
176 # Dummy target to force execution of dependent targets.
180 # Copy the files into directories where they will be run.
182 $(INSTALL_XFORM
) sis
$(bindir)/sis
; \
183 n
=`echo sis | sed '$(program_transform_name)'`; \
184 rm -f
$(bindir)/sis
; \
185 ln
$(bindir)/$$n $(bindir)/sis \
186 ||
$(INSTALL_PROGRAM
) sis
$(bindir)/sis
; \
187 test -d
$(tooldir
) || mkdir
$(tooldir
); \
188 test -d
$(tooldir
)/bin || mkdir
$(tooldir
)/bin
; \
189 rm -f
$(tooldir
)/bin
/sis
; \
190 ln
$(bindir)/$$n $(tooldir
)/bin
/sis \
191 ||
$(INSTALL_PROGRAM
) sis
$(tooldir
)/bin
/sis
; \
194 Makefile
: $(srcdir)/Makefile.in
195 $(SHELL
) .
/config.status