]>
Commit | Line | Data |
---|---|---|
e856060f | 1 | # Makefile template for Configure for the sim library. |
1ffd292b | 2 | # Copyright (C) 1993, 1995 Free Software Foundation, Inc. |
e856060f SC |
3 | # Written by Cygnus Support. |
4 | # | |
5 | # This file is part of BFD, the Binary File Descriptor library. | |
6 | # | |
7 | # This program is free software; you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License as published by | |
9 | # the Free Software Foundation; either version 2 of the License, or | |
10 | # (at your option) any later version. | |
11 | # | |
12 | # This program is distributed in the hope that it will be useful, | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
18 | # along with this program; if not, write to the Free Software | |
9fc3ba75 | 19 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
e856060f | 20 | |
1ffd292b C |
21 | VPATH = @srcdir@ |
22 | srcdir = @srcdir@ | |
e856060f | 23 | |
1ffd292b C |
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@ | |
27b9abfd DE |
30 | bindir = @bindir@ |
31 | libdir = @libdir@ | |
1ffd292b | 32 | tooldir = $(libdir)/$(target_alias) |
e856060f | 33 | |
27b9abfd DE |
34 | datadir = @datadir@ |
35 | mandir = @mandir@ | |
e856060f SC |
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 | |
27b9abfd DE |
45 | infodir = @infodir@ |
46 | includedir = @includedir@ | |
e856060f SC |
47 | |
48 | SHELL = /bin/sh | |
49 | ||
27b9abfd DE |
50 | INSTALL = @INSTALL@ |
51 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
52 | INSTALL_DATA = @INSTALL_DATA@ | |
becbe1c3 | 53 | |
9fc3ba75 | 54 | AR = @AR@ |
e856060f | 55 | AR_FLAGS = rc |
9fc3ba75 MM |
56 | CC = @CC@ |
57 | CFLAGS = @CFLAGS@ | |
58 | CC_FOR_BUILD = @CC_FOR_BUILD@ | |
e856060f | 59 | MAKEINFO = makeinfo |
9fc3ba75 | 60 | RANLIB = @RANLIB@ |
e856060f | 61 | |
1ffd292b C |
62 | SUBDIRS = @subdirs@ |
63 | ||
64 | .NOEXPORT: | |
becbe1c3 RP |
65 | MAKEOVERRIDES= |
66 | ||
1ffd292b | 67 | |
e856060f SC |
68 | INCDIR = $(srcdir)/../include |
69 | CSEARCH = -I. -I$(srcdir) -I$(INCDIR) | |
70 | DEP = mkdep | |
71 | ||
9fc3ba75 MM |
72 | # compilers to use to create programs which must be run in the build |
73 | # environment. | |
74 | CC_FOR_BUILD = $(CC) | |
47dba87a | 75 | |
1ffd292b C |
76 | #### Makefile fragments come in here. |
77 | # @target_makefile_frag@ | |
e856060f SC |
78 | ### |
79 | ||
80 | FLAGS_TO_PASS = \ | |
81 | "prefix=$(prefix)" \ | |
82 | "exec_prefix=$(exec_prefix)" \ | |
83 | "against=$(against)" \ | |
84 | "AR=$(AR)" \ | |
85 | "AR_FLAGS=$(AR_FLAGS)" \ | |
86 | "CC=$(CC)" \ | |
9fc3ba75 | 87 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
e856060f SC |
88 | "CFLAGS=$(CFLAGS)" \ |
89 | "RANLIB=$(RANLIB)" \ | |
90 | "MAKEINFO=$(MAKEINFO)" \ | |
91 | "INSTALL=$(INSTALL)" \ | |
92 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
9fc3ba75 MM |
93 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" |
94 | ||
95 | all: | |
c8cd6f23 | 96 | @rootme=`pwd` ; export rootme ; \ |
c8cd6f23 ILT |
97 | for dir in . ${SUBDIRS}; do \ |
98 | if [ "$$dir" = "." ]; then \ | |
99 | true; \ | |
100 | elif [ -d $$dir ]; then \ | |
101 | (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \ | |
102 | else true; fi; \ | |
103 | done | |
9fc3ba75 MM |
104 | |
105 | clean mostlyclean: | |
c8cd6f23 | 106 | @rootme=`pwd` ; export rootme ; \ |
c8cd6f23 ILT |
107 | for dir in . ${SUBDIRS}; do \ |
108 | if [ "$$dir" = "." ]; then \ | |
109 | true; \ | |
110 | elif [ -d $$dir ]; then \ | |
111 | (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@); \ | |
112 | else true; fi; \ | |
113 | done | |
9fc3ba75 MM |
114 | |
115 | distclean maintainer-clean realclean: | |
c8cd6f23 | 116 | @rootme=`pwd` ; export rootme ; \ |
c8cd6f23 ILT |
117 | for dir in . ${SUBDIRS}; do \ |
118 | if [ "$$dir" = "." ]; then \ | |
119 | true; \ | |
120 | elif [ -d $$dir ]; then \ | |
121 | (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@); \ | |
122 | else true; fi; \ | |
123 | done | |
1ffd292b | 124 | rm -f Makefile config.cache config.log config.status |
68dd3014 | 125 | |
9fc3ba75 | 126 | install: |
c8cd6f23 | 127 | @rootme=`pwd` ; export rootme ; \ |
c8cd6f23 ILT |
128 | for dir in . ${SUBDIRS}; do \ |
129 | if [ "$$dir" = "." ]; then \ | |
27b9abfd | 130 | true; \ |
c8cd6f23 ILT |
131 | elif [ -d $$dir ]; then \ |
132 | (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \ | |
133 | else true; fi; \ | |
134 | done | |
9fc3ba75 | 135 | |
a86ea03f SC |
136 | info: |
137 | install-info: | |
b23eaace | 138 | dvi: |
e856060f | 139 | |
68dd3014 JK |
140 | ### |
141 | ### | |
47dba87a | 142 | |
68dd3014 JK |
143 | .PHONY: check installcheck |
144 | check: | |
145 | installcheck: | |
ad5fcc62 | 146 | |
1ffd292b C |
147 | TAGS: |
148 | ||
e856060f SC |
149 | force: |
150 | ||
9fc3ba75 | 151 | Makefile: Makefile.in config.status |
e856060f | 152 | $(SHELL) ./config.status |
1ffd292b C |
153 | |
154 | config.status: configure | |
155 | $(SHELL) ./config.status --recheck | |
27b9abfd DE |
156 | |
157 | # Utility to run autoconf in each directory that uses the common framework. | |
158 | # This is intended to be invoked in $srcdir as | |
159 | # "make -f Makefile.in autoconf-common". | |
160 | .PHONY: autoconf-common | |
161 | autoconf-common: | |
162 | for d in * ; \ | |
163 | do \ | |
164 | if [ -d $$d -a -f $$d/configure.in ] ; \ | |
165 | then \ | |
166 | if grep SIM_AC_COMMON $$d/configure.in >/dev/null ; \ | |
167 | then \ | |
168 | echo "Running autoconf in $$d ..." ; \ | |
169 | (cd $$d && autoconf) ; \ | |
170 | fi ; \ | |
171 | fi ; \ | |
172 | done |