Commit | Line | Data |
---|---|---|
c906108c | 1 | # Makefile template for Configure for simulator common directory |
c5a57081 | 2 | # Copyright (C) 1996-1997, 2007-2012 Free Software Foundation, Inc. |
c906108c SS |
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 | |
4744ac1b | 6 | # the Free Software Foundation; either version 3 of the License, or |
c906108c | 7 | # (at your option) any later version. |
4744ac1b | 8 | # |
c906108c SS |
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. | |
4744ac1b | 13 | # |
c906108c | 14 | # You should have received a copy of the GNU General Public License |
4744ac1b | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
c906108c SS |
16 | |
17 | default: all | |
18 | ||
19 | VPATH = @srcdir@ | |
20 | srcdir = @srcdir@ | |
96cdfef0 MF |
21 | abs_srcdir = @abs_srcdir@ |
22 | srcroot = $(abs_srcdir)/../.. | |
c906108c SS |
23 | |
24 | prefix = @prefix@ | |
25 | exec_prefix = @exec_prefix@ | |
26 | ||
27 | host_alias = @host_alias@ | |
28 | target_alias = @target_alias@ | |
29 | program_transform_name = @program_transform_name@ | |
30 | bindir = @bindir@ | |
31 | ||
32 | libdir = @libdir@ | |
33 | tooldir = $(libdir)/$(target_alias) | |
34 | ||
96e946ca | 35 | datarootdir = @datarootdir@ |
c906108c SS |
36 | datadir = @datadir@ |
37 | mandir = @mandir@ | |
38 | man1dir = $(mandir)/man1 | |
39 | infodir = @infodir@ | |
40 | includedir = @includedir@ | |
41 | ||
42 | SHELL = /bin/sh | |
43 | ||
44 | INSTALL = @INSTALL@ | |
45 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
46 | INSTALL_DATA = @INSTALL_DATA@ | |
47 | ||
48 | CC = @CC@ | |
49 | CC_FOR_BUILD = @CC_FOR_BUILD@ | |
50 | CFLAGS = @CFLAGS@ | |
51 | SIM_CFLAGS = @sim_cflags@ | |
52 | ||
53 | # These are used to rebuild nltvals.def. | |
54 | CPP_FOR_TARGET = @CPP_FOR_TARGET@ | |
55 | TARGET_SUBDIR = @TARGET_SUBDIR@ | |
56 | ||
57 | HDEFINES = @HDEFINES@ | |
58 | TDEFINES = | |
59 | ||
60 | CONFIG_CFLAGS = @DEFS@ $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) | |
61 | CSEARCH = -I. -I$(srcdir) -I$(srcroot)/include | |
62 | ALL_CFLAGS = $(CFLAGS) $(CONFIG_CFLAGS) $(CSEARCH) | |
63 | BUILD_CFLAGS = -g -O $(CSEARCH) | |
64 | ||
65 | AR = @AR@ | |
66 | AR_FLAGS = rc | |
67 | RANLIB = @RANLIB@ | |
68 | MAKEINFO = makeinfo | |
69 | ||
70 | .NOEXPORT: | |
71 | MAKEOVERRIDES= | |
72 | ||
73 | all: | |
74 | ||
46a19b74 | 75 | # Generate nltvals.def for newlib/libgloss using devo and build tree. |
c906108c | 76 | # This file is shipped with distributions so we build in the source dir. |
c906108c | 77 | # Use `make headers' to rebuild. |
46a19b74 AC |
78 | # Note: If gdb releases begin to contain target header files (not a good idea, |
79 | # but if they did ...), targ-vals.def coud be generated at build time. | |
80 | # An alternative is to slurp in the tables at runtime. | |
c906108c | 81 | .PHONY: headers |
46a19b74 | 82 | headers: |
c906108c SS |
83 | rootme=`pwd` ; \ |
84 | cd $(srcdir) ; \ | |
85 | rm -f nltvals.new ; \ | |
96cdfef0 | 86 | $(SHELL) $(abs_srcdir)/gennltvals.sh $(SHELL) $(srcroot) "$(CPP_FOR_TARGET)" > nltvals.new ; \ |
c906108c SS |
87 | $(SHELL) $(srcroot)/move-if-change nltvals.new nltvals.def |
88 | ||
89 | .c.o: | |
90 | $(CC) -c $< $(ALL_CFLAGS) | |
91 | ||
92 | check: | |
93 | ||
94 | info: | |
95 | clean-info: | |
96 | install-info: | |
97 | ||
98 | tags etags: TAGS | |
99 | ||
100 | # Macros like EXTERN_SIM_CORE confuse tags. | |
101 | # And the sim-n-foo.h files create functions that can't be found either. | |
102 | TAGS: force | |
103 | cd $(srcdir) && \ | |
adf40b2e JM |
104 | etags --regex '/^\([a-z_]+\) (/\1/' --regex '/^.*\/[*] TAGS: .*/' \ |
105 | *.c *.h | |
c906108c SS |
106 | |
107 | clean: | |
108 | rm -f *.[oa] *~ core | |
c906108c SS |
109 | |
110 | distclean mostlyclean maintainer-clean realclean: clean | |
111 | rm -f TAGS | |
112 | rm -f Makefile config.cache config.log config.status | |
ab42ee12 | 113 | rm -f cconfig.h config.h stamp-h |
c906108c SS |
114 | |
115 | # Dummy target to force execution of dependent targets. | |
116 | force: | |
117 | ||
118 | # Copy the files into directories where they will be run. | |
fab307a2 | 119 | install: install-man |
c906108c SS |
120 | |
121 | install-man: installdirs | |
122 | n=`echo run | sed '$(program_transform_name)'`; \ | |
5a645dc5 | 123 | $(INSTALL_DATA) $(srcdir)/run.1 $(DESTDIR)$(man1dir)/$$n.1 |
c906108c SS |
124 | |
125 | installdirs: | |
5a645dc5 | 126 | $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir) |
c906108c SS |
127 | |
128 | Makefile: Makefile.in config.status | |
129 | $(SHELL) ./config.status | |
130 | ||
131 | config.status: configure | |
132 | $(SHELL) ./config.status --recheck | |
133 | ||
134 | config.h: stamp-h ; @true | |
135 | stamp-h: config.in config.status | |
136 | CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status |