]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/common/Makefile.in
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / sim / common / Makefile.in
CommitLineData
58b72d7e
DE
1# Makefile template for Configure for simulator common parts
2# Copyright (C) 1996 Free Software Foundation, Inc.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18default: all
19
20VPATH = @srcdir@
21srcdir = @srcdir@
22srcroot = $(srcdir)/../..
23
24prefix = @prefix@
25exec_prefix = @exec_prefix@
26
27host_alias = @host_alias@
28target_alias = @target_alias@
29program_transform_name = @program_transform_name@
30bindir = @bindir@
31
32libdir = @libdir@
33tooldir = $(libdir)/$(target_alias)
34
35datadir = @datadir@
36mandir = @mandir@
37man1dir = $(mandir)/man1
38infodir = @infodir@
39includedir = @includedir@
40
41SHELL = /bin/sh
42
43INSTALL = $(srcroot)/install.sh -c
44INSTALL_PROGRAM = @INSTALL_PROGRAM@
45INSTALL_DATA = @INSTALL_DATA@
46INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
47INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
48
49CC = @CC@
50CC_FOR_BUILD = @CC_FOR_BUILD@
51CPP = @CPP@
52CPP_FOR_TARGET = @CPP_FOR_TARGET@
53TARGET_SUBDIR = @TARGET_SUBDIR@
54CFLAGS = @CFLAGS@
55SIM_CFLAGS = @sim_cflags@
56
57HDEFINES = @HDEFINES@
58TDEFINES =
59
60CONFIG_CFLAGS = @DEFS@ $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES)
61CSEARCH = -I. -I$(srcdir) -I$(srcroot)/include
62ALL_CFLAGS = $(CFLAGS) $(CONFIG_CFLAGS) $(CSEARCH)
63BUILD_CFLAGS = -g -O $(CSEARCH)
64
65AR = @AR@
66AR_FLAGS = rc
67RANLIB = @RANLIB@
68MAKEINFO = makeinfo
69
70.NOEXPORT:
71MAKEOVERRIDES=
72
73all: libcommon.a
74
75LIB_OBJS = callback.o targ-map.o
76
77# FIXME: Ideally, callback.o and friends live in a library outside of
78# both the gdb and simulator source trees (e.g. devo/remote. Not
79# devo/libremote because this directory would contain more than just
80# a library).
81
82libcommon.a: $(LIB_OBJS)
83 rm -f libcommon.a
84 $(AR) $(ARFLAGS) libcommon.a $(LIB_OBJS)
85 $(RANLIB) libcommon.a
86
87callback.o: callback.c targ-vals.h $(srcroot)/include/callback.h
88
89targ-map.o: targ-map.c targ-vals.h
90
91# Generate TARG_VALS_H for newlib using devo and build tree.
92# This file is shipped with distributions so we build in the source dir.
93# This is built in srcdir so putting dependencies here is risky.
94# Use `make headers' to rebuild.
95headers: nltvals.def
96.PHONY: headers
97
98# Note: If gdb releases begin to contain target header files, generate
99# targ-vals.def at build time.
100
101nltvals.def: Makefile gentvals.sh
102 rootme=`pwd` ; \
103 cd $(srcdir) ; \
104 rm -f nltvals.new ; \
105 echo '/* Newlib macro values needed by simulator. */' >nltvals.new ; \
106 echo '/* This file is machine generated by gentvalh.sh. */' >>nltvals.new ; \
107 $(SHELL) $(srcdir)/gentvals.sh errno $(srcroot)/newlib/libc/include \
108 "errno.h sys/errno.h" 'E[A-Z0-9]*' "$(CPP_FOR_TARGET)" >>nltvals.new ; \
109 $(SHELL) $(srcdir)/gentvals.sh signal $(srcroot)/newlib/libc/include \
110 "signal.h sys/signal.h" 'SIG[A-Z0-9]*' "$(CPP_FOR_TARGET)" >>nltvals.new ; \
111 $(SHELL) $(srcdir)/gentvals.sh open $(srcroot)/newlib/libc/include \
112 "fcntl.h sys/fcntl.h" 'O_[A-Z0-9]*' "$(CPP_FOR_TARGET)" >>nltvals.new ; \
113 $(srcroot)/move-if-change nltvals.new nltvals.def
114
115gentmap: Makefile gentmap.c
116 $(CC_FOR_BUILD) $(srcdir)/gentmap.c -o gentmap $(BUILD_CFLAGS)
117
118targ-vals.h: Makefile gentmap
119 rm -f targ-vals.h
120 ./gentmap -h >targ-vals.h
121
122targ-map.c: Makefile gentmap
123 rm -f targ-map.c
124 ./gentmap -c >targ-map.c
125
126.c.o:
127 $(CC) -c $< $(ALL_CFLAGS)
128
129check:
130
131info:
132clean-info:
133install-info:
134
135tags etags: TAGS
136
137TAGS: force
138 etags *.c *.h
139
140clean:
141 rm -f *.[oa] *~ core gentmap
142 rm -f $(ALL)
143
144distclean mostlyclean maintainer-clean realclean: clean
145 rm -f TAGS
146 rm -f Makefile config.cache config.log config.status
147 rm -f config.h stamp-h
148
149# Dummy target to force execution of dependent targets.
150force:
151
152# Copy the files into directories where they will be run.
153install:
154
155install-man:
156 $(INSTALL_XFORM1) $(srcdir)/run.1 $(man1dir)/run.1
157
158Makefile: Makefile.in config.status
159 $(SHELL) ./config.status
160
161config.status: configure
162 $(SHELL) ./config.status --recheck
163
164# We can't add dependencies to configure because it causes too much trouble
165# to end users if configure's timestamp is out of sync.
166.PHONY: run-autoconf
167run-autoconf:
168 cd $(srcdir) && autoconf
169
170config.h: stamp-h ; @true
171stamp-h: config.in config.status
172 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status