]> git.ipfire.org Git - thirdparty/gcc.git/blame - fixincludes/Makefile.in
configure: Implement --enable-host-pie
[thirdparty/gcc.git] / fixincludes / Makefile.in
CommitLineData
71b5d516 1# Makefile for fixincludes.
4839149c 2#
90d04a44 3# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010, 2012
ad643a75 4# Free Software Foundation, Inc.
0083c904 5
71b5d516 6#This file is part of fixincludes.
0083c904 7
71b5d516 8#fixincludes is free software; you can redistribute it and/or modify
0083c904 9#it under the terms of the GNU General Public License as published by
748086b7 10#the Free Software Foundation; either version 3, or (at your option)
0083c904
BK
11#any later version.
12
71b5d516 13#fixincludes is distributed in the hope that it will be useful,
0083c904
BK
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
748086b7
JJ
19#along with fixincludes; see the file COPYING3. If not see
20#<http://www.gnu.org/licenses/>.
0083c904 21
b41e09a7 22SHELL=@SHELL@
d577781c 23
d9835ae8
MM
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.
27STAMP = echo timestamp >
28
71b5d516
PB
29CC = @CC@
30CFLAGS = @CFLAGS@
87fbb651 31WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
71b5d516 32LDFLAGS = @LDFLAGS@
251c72a6
MP
33PICFLAG = @PICFLAG@
34LD_PICFLAG = @LD_PICFLAG@
71b5d516
PB
35INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
36FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
0083c904 37
0083c904
BK
38# Directory where sources are, from where we are.
39srcdir = @srcdir@
4839149c 40VPATH = $(srcdir)
0083c904 41
53c7ffe7
GK
42# Directory in which to put the directories used by the compiler.
43libdir = @libdir@
44# Directory in which GCC puts its executables.
45libexecdir = @libexecdir@
46
0083c904
BK
47# End of variables for you to override.
48
53c7ffe7
GK
49# The target that we're configured for.
50target = @target@
51target_noncanonical:=@target_noncanonical@
52
53# The version of GCC in this tree
3c36aa6b 54gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
53c7ffe7
GK
55
56# Directory in which the compiler finds libraries etc.
90ee1368 57libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
53c7ffe7
GK
58# Directory in which the compiler finds executables
59libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
60# Where our executable files go
61itoolsdir = $(libexecsubdir)/install-tools
62# Where our data files go
63itoolsdatadir = $(libsubdir)/install-tools
64
65# Locate mkinstalldirs.
66mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
67
6efbd53f
RW
68AUTOCONF = autoconf
69AUTOHEADER = autoheader
70ACLOCAL = aclocal
678abdd9 71ACLOCAL_AMFLAGS = -I .. -I ../config
6efbd53f 72
35dfe415 73default : all
0083c904
BK
74
75# Now figure out from those variables how to compile and link.
76
0083c904 77.c.o:
251c72a6 78 $(CC) -c $(CFLAGS) $(PICFLAG) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
0083c904
BK
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##
0083c904
BK
90## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
91
251c72a6 92ifeq ($(PICFLAG),)
71b5d516 93LIBIBERTY=../libiberty/libiberty.a
251c72a6
MP
94else
95LIBIBERTY=../libiberty/pic/libiberty.a
96endif
2629a114
BK
97
98ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
ad643a75 99 fixlib.o fixopts.o
5abc1f74 100
ad643a75
PB
101TESTOBJ = fixincl.o fixlib.o fixtests.o fixopts.o
102FIXOBJ = fixfixes.o fixlib.o fixopts.o
0083c904 103
89b8abbf 104HDR = server.h fixlib.h
71b5d516
PB
105FI = fixincl@EXEEXT@
106AF = applyfix@EXEEXT@
0083c904 107
53c7ffe7 108all : @TARGET@ fixinc.sh mkheaders
42cfed37 109gen : $(srcdir)/fixincl.x
0083c904 110
71b5d516 111
2629a114
BK
112oneprocess : full-stamp
113twoprocess : test-stamp $(AF)
114
71b5d516 115full-stamp : $(ALLOBJ) $(LIBIBERTY)
251c72a6 116 $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
d9835ae8 117 $(STAMP) $@
2629a114 118
71b5d516 119test-stamp : $(TESTOBJ) $(LIBIBERTY)
251c72a6 120 $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
d9835ae8 121 $(STAMP) $@
2629a114 122
71b5d516 123$(AF): $(FIXOBJ) $(LIBIBERTY)
251c72a6 124 $(CC) $(CFLAGS) $(PICFLAG) $(LDFLAGS) $(LD_PICFLAG) -o $@ $(FIXOBJ) $(LIBIBERTY)
0083c904 125
2629a114
BK
126$(ALLOBJ) : $(HDR)
127fixincl.o : fixincl.c $(srcdir)/fixincl.x
35dfe415 128fixtests.o : fixtests.c
2629a114 129fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
35dfe415
BK
130server.o : server.c
131procopen.o : procopen.c
35dfe415 132fixlib.o : fixlib.c
7d7f30cf 133
53c7ffe7
GK
134fixinc.sh : fixinc.in mkfixinc.sh Makefile
135 srcdir="$(srcdir)" $(SHELL) $(srcdir)/mkfixinc.sh $(target)
136
86251d81 137$(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def
89b8abbf 138 cd $(srcdir) ; $(SHELL) ./genfixes
35dfe415 139
ea595d4f
GK
140mostlyclean :
141 rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh
e1e0c658 142
54f88091 143clean: mostlyclean
90ee1368 144 rm -f mkheaders mkheaders.almost
54f88091
PB
145
146distclean: clean
147 rm -f Makefile config.h config.log config.status stamp-h
148
149maintainer-clean: distclean
e1e0c658 150 rm -f $(srcdir)/fixincl.x
0083c904 151
ea595d4f
GK
152distclean : clean
153
71b5d516
PB
154Makefile: $(srcdir)/Makefile.in config.status
155 $(SHELL) ./config.status Makefile
156
90ee1368
ZW
157mkheaders.almost: $(srcdir)/mkheaders.in config.status
158 CONFIG_FILES=mkheaders.almost:mkheaders.in \
159 CONFIG_HEADERS= ./config.status
160
161mkheaders: mkheaders.almost $(srcdir)/../gcc/BASE-VER
162 sed -e 's/@gcc_version@/$(gcc_version)/' < $< > $@T
163 mv -f $@T $@
53c7ffe7 164
71b5d516
PB
165config.h: stamp-h
166stamp-h: $(srcdir)/config.h.in config.status
167 $(SHELL) ./config.status config.h
168
169config.status: $(srcdir)/configure
170 $(SHELL) ./config.status --recheck
171
deb984e6 172$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
6efbd53f 173 cd $(srcdir) && $(AUTOCONF)
71b5d516
PB
174
175$(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
6efbd53f 176 cd $(srcdir) && $(AUTOHEADER)
71b5d516 177
deb984e6 178$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/configure.ac
6efbd53f 179 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
71b5d516
PB
180
181check : all
380c5d40 182 autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
1b813bfe
BK
183 $(SHELL) ./check.sh $(srcdir)/tests/base
184 @rm -f ./check.sh
53c7ffe7
GK
185
186install : all
187 -rm -rf $(DESTDIR)$(itoolsdir)
5502f40b 188 $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
53c7ffe7
GK
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
5502f40b 193 $(INSTALL_PROGRAM) $(FI) $(DESTDIR)$(itoolsdir)/$(FI)
53c7ffe7 194 $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders
ea595d4f 195
455c8f48 196install-strip: install
5502f40b 197 test -z '$(STRIP)' || $(STRIP) $(DESTDIR)$(itoolsdir)/$(FI)
455c8f48
RW
198
199.PHONY: all check install install-strip
07f1ac6d 200.PHONY: dvi pdf info html install-pdf install-info install-html
ae022d32 201
ea595d4f 202dvi :
b5422ad7 203pdf :
ea595d4f 204info :
251089a0 205html :
b31f8484 206install-pdf :
07f1ac6d 207install-info :
ae022d32 208install-html :
ea595d4f 209installcheck :