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.
22 srcroot
= $(srcdir)/..
/..
/
25 exec_prefix = @
exec_prefix@
27 host_alias
= @host_alias@
28 target_alias
= @target_alias@
29 program_transform_name
= @program_transform_name@
30 bindir = $(exec_prefix)/bin
31 libdir = $(exec_prefix)/lib
32 tooldir
= $(exec_prefix)/$(target_alias
)
34 datadir = $(prefix)/lib
35 mandir = $(prefix)/man
36 man1dir = $(mandir)/man1
37 man2dir = $(mandir)/man2
38 man3dir = $(mandir)/man3
39 man4dir = $(mandir)/man4
40 man5dir = $(mandir)/man5
41 man6dir = $(mandir)/man6
42 man7dir = $(mandir)/man7
43 man8dir = $(mandir)/man8
44 man9dir = $(mandir)/man9
45 infodir = $(prefix)/info
46 includedir = $(prefix)/include
48 docdir
= $(srcdir)/doc
52 INSTALL
= $${srcroot}/install.sh
-c
53 INSTALL_PROGRAM
= $(INSTALL
)
54 INSTALL_DATA
= $(INSTALL
)
55 INSTALL_XFORM
= $(INSTALL
) -t
='$(program_transform_name)'
56 INSTALL_XFORM1
= $(INSTALL_XFORM
) -b
=.1
66 # UARTS run at about 115200 baud (simulator time). Add -DFAST_UART to
67 # CFLAGS if faster (infinite) UART speed is desired. Might affect the
68 # behaviour of UART interrupt routines ...
73 CFLAGS2
= -g
-O3
-DSTAT
-DFAST_UART
-DIUREV0
-DMECREV0
79 INCDIR
= $(srcdir)/..
/..
/include
80 CSEARCH
= -I.
-I
$(srcdir) -I
$(INCDIR
) -I..
/..
/bfd
-I
$(srcdir)/..
/..
/bfd \
81 -I
$(srcdir)/..
/..
/gdb
-I
$(srcdir)/..
/..
/gdb
/config
87 CFILES
= sis.c exec.c erc32.c interf.c run.c help.c float.c
88 OFILES
= exec.o erc32.o func.o help.o float.o
91 all: end.h sis run
$(TARGETLIB
)
94 $(CC
) $(srcdir)/end.c
-o end
100 $(CC
) $(CFLAGS
) $(CLAGS2
) -o sis sis.o
$(OFILES
) \
101 ..
/..
/opcodes
/libopcodes.a ..
/..
/readline
/libreadline.a \
102 ..
/..
/bfd
/libbfd.a ..
/..
/libiberty
/libiberty.a \
105 run
: run.o interf.o
$(OFILES
)
106 $(CC
) $(CFLAGS
) $(CLAGS2
) -o run run.o interf.o
$(OFILES
) \
107 ..
/..
/opcodes
/libopcodes.a ..
/..
/readline
/libreadline.a \
108 ..
/..
/bfd
/libbfd.a ..
/..
/libiberty
/libiberty.a \
112 rm -f
*.o libsim.a sis run end end.h
115 rm -rf Makefile config.status sysdep.h
117 #### host and target dependent Makefile fragments come in here.
121 "against=$(against)" \
123 "AR_FLAGS=$(AR_FLAGS)" \
127 "MAKEINFO=$(MAKEINFO)" \
128 "INSTALL=$(INSTALL)" \
129 "INSTALL_DATA=$(INSTALL_DATA)" \
130 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
133 $(OFILES
) sis.o interf.o
: end.h sis.h
136 $(CC
) -c
$(CFLAGS
) $(CFLAGS2
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
139 # C source files that correspond to .o's.
141 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
154 # HDEPFILES comes from the host config; TDEPFILES from the target config.
157 $(TARGETLIB
): $(OFILES
) interf.o
159 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
) interf.o
160 $(RANLIB
) $(TARGETLIB
)
162 # Circumvent Sun Make bug with VPATH.
163 sparc-opc.o
: sparc-opc.c
168 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
171 sis.o
: sis.c sis.h end.h
172 exec.o
: exec.c sis.h end.h
173 erc32.o
: erc32.c sis.h end.h
174 interf.o
: interf.c sis.h end.h
177 float.o
: float.c sis.h end.h
179 # Mark everything as depending on config.status, since the timestamp on
180 # sysdep.h might actually move backwards if we reconfig and relink it
181 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
182 RECONFIG
= config.status
184 # Dummy target to force execution of dependent targets.
188 # Copy the files into directories where they will be run.
190 srcroot
=`cd $(srcroot); pwd`; export srcroot
; \
191 $(INSTALL_XFORM
) sis
$(bindir)/sis
; \
192 n
=`echo sis | sed '$(program_transform_name)'`; \
193 if
[ -d
$(tooldir
) ] ; then \
194 if
[ -d
$(tooldir
)/bin
] ; then true
; else mkdir
$(tooldir
)/bin
; fi
; \
195 rm -f
$(tooldir
)/bin
/sis
; \
196 ln
$(bindir)/$$n $(bindir)/sis \
197 ||
$(INSTALL_PROGRAM
) sis
$(bindir)/sis
; \
198 ln
$(bindir)/$$n $(tooldir
)/bin
/sis \
199 ||
$(INSTALL_PROGRAM
) sis
$(tooldir
)/bin
/sis
; \
203 Makefile
: $(srcdir)/Makefile.in
204 $(SHELL
) .
/config.status