]> git.ipfire.org Git - thirdparty/gcc.git/blob - fixincludes/Makefile.in
configure: Implement --enable-host-pie
[thirdparty/gcc.git] / fixincludes / Makefile.in
1 # Makefile for fixincludes.
2 #
3 # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010, 2012
4 # Free Software Foundation, Inc.
5
6 #This file is part of fixincludes.
7
8 #fixincludes is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 3, or (at your option)
11 #any later version.
12
13 #fixincludes is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
17
18 #You should have received a copy of the GNU General Public License
19 #along with fixincludes; see the file COPYING3. If not see
20 #<http://www.gnu.org/licenses/>.
21
22 SHELL=@SHELL@
23
24 # Some versions of `touch' (such as the version on Solaris 2.8)
25 # do not correctly set the timestamp due to buggy versions of `utime'
26 # in the kernel. So, we use `echo' instead.
27 STAMP = echo timestamp >
28
29 CC = @CC@
30 CFLAGS = @CFLAGS@
31 WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
32 LDFLAGS = @LDFLAGS@
33 PICFLAG = @PICFLAG@
34 LD_PICFLAG = @LD_PICFLAG@
35 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
36 FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
37
38 # Directory where sources are, from where we are.
39 srcdir = @srcdir@
40 VPATH = $(srcdir)
41
42 # Directory in which to put the directories used by the compiler.
43 libdir = @libdir@
44 # Directory in which GCC puts its executables.
45 libexecdir = @libexecdir@
46
47 # End of variables for you to override.
48
49 # The target that we're configured for.
50 target = @target@
51 target_noncanonical:=@target_noncanonical@
52
53 # The version of GCC in this tree
54 gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
55
56 # Directory in which the compiler finds libraries etc.
57 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
58 # Directory in which the compiler finds executables
59 libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
60 # Where our executable files go
61 itoolsdir = $(libexecsubdir)/install-tools
62 # Where our data files go
63 itoolsdatadir = $(libsubdir)/install-tools
64
65 # Locate mkinstalldirs.
66 mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
67
68 AUTOCONF = autoconf
69 AUTOHEADER = autoheader
70 ACLOCAL = aclocal
71 ACLOCAL_AMFLAGS = -I .. -I ../config
72
73 default : all
74
75 # Now figure out from those variables how to compile and link.
76
77 .c.o:
78 $(CC) -c $(CFLAGS) $(PICFLAG) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
79
80 # The only suffixes we want for implicit rules are .c and .o.
81 .SUFFIXES:
82 .SUFFIXES: .c .o
83
84 #\f
85
86 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
87 ##
88 ## Makefile for constructing the "best" include fixer we can
89 ##
90 ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
91
92 ifeq ($(PICFLAG),)
93 LIBIBERTY=../libiberty/libiberty.a
94 else
95 LIBIBERTY=../libiberty/pic/libiberty.a
96 endif
97
98 ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
99 fixlib.o fixopts.o
100
101 TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
102 FIXOBJ = fixfixes.o fixlib.o fixopts.o
103
104 HDR = server.h fixlib.h
105 FI = fixincl@EXEEXT@
106 AF = applyfix@EXEEXT@
107
108 all : @TARGET@ fixinc.sh mkheaders
109 gen : $(srcdir)/fixincl.x
110
111
112 oneprocess : full-stamp
113 twoprocess : test-stamp $(AF)
114
115 full-stamp : $(ALLOBJ) $(LIBIBERTY)
116 $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
117 $(STAMP) $@
118
119 test-stamp : $(TESTOBJ) $(LIBIBERTY)
120 $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
121 $(STAMP) $@
122
123 $(AF): $(FIXOBJ) $(LIBIBERTY)
124 $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $@ $(FIXOBJ) $(LIBIBERTY)
125
126 $(ALLOBJ) : $(HDR)
127 fixincl.o : fixincl.c $(srcdir)/fixincl.x
128 fixtests.o : fixtests.c
129 fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
130 server.o : server.c
131 procopen.o : procopen.c
132 fixlib.o : fixlib.c
133
134 fixinc.sh : fixinc.in mkfixinc.sh Makefile
135 srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
136
137 $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
138 cd $(srcdir) ; $(SHELL) ./genfixes
139
140 mostlyclean :
141 rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
142
143 clean: mostlyclean
144 rm -f mkheaders mkheaders.almost
145
146 distclean: clean
147 rm -f Makefile config.h config.log config.status stamp-h
148
149 maintainer-clean: distclean
150 rm -f $(srcdir)/fixincl.x
151
152 distclean : clean
153
154 Makefile: $(srcdir)/Makefile.in config.status
155 $(SHELL) ./config.status Makefile
156
157 mkheaders.almost: $(srcdir)/mkheaders.in config.status
158 CONFIG_FILES=mkheaders.almost:mkheaders.in \
159 CONFIG_HEADERS= ./config.status
160
161 mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
162 sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
163 mv -f $@T $@
164
165 config.h: stamp-h
166 stamp-h: $(srcdir)/config.h.in config.status
167 $(SHELL) ./config.status config.h
168
169 config.status: $(srcdir)/configure
170 $(SHELL) ./config.status --recheck
171
172 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
173 cd $(srcdir) && $(AUTOCONF)
174
175 $(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
176 cd $(srcdir) && $(AUTOHEADER)
177
178 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/configure.ac
179 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
180
181 check : all
182 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
183 $(SHELL) ./check.sh $(srcdir)/tests/base
184 @rm -f ./check.sh
185
186 install : all
187 -rm -rf $(DESTDIR)$(itoolsdir)
188 $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
189 $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
190 $(INSTALL_DATA) $(srcdir)/README-fixinc \
191 $(DESTDIR)$(itoolsdatadir)/include/README
192 $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh
193 $(INSTALL_PROGRAM) $(FI) $(DESTDIR)$(itoolsdir)/$(FI)
194 $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
195
196 install-strip: install
197 test -z '$(STRIP)' || $(STRIP) $(DESTDIR)$(itoolsdir)/$(FI)
198
199 .PHONY: all check install install-strip
200 .PHONY: dvi pdf info html install-pdf install-info install-html
201
202 dvi :
203 pdf :
204 info :
205 html :
206 install-pdf :
207 install-info :
208 install-html :
209 installcheck :