]> git.ipfire.org Git - thirdparty/gcc.git/blame - libobjc/Makefile.in
re PR testsuite/39696 (gcc.dg/tree-ssa/ssa-ccp-25.c scan-tree-dump doesn't work on...
[thirdparty/gcc.git] / libobjc / Makefile.in
CommitLineData
05dcec66 1# Makefile for GNU Objective C runtime library.
8c3e5222 2# Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
a0ed5099 3# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
bce1b489 4
6c82ad25 5#This file is part of GCC.
bce1b489 6
6c82ad25 7#GCC is free software; you can redistribute it and/or modify
bce1b489
BE
8#it under the terms of the GNU General Public License as published by
9#the Free Software Foundation; either version 2, or (at your option)
10#any later version.
11
6c82ad25 12#GCC is distributed in the hope that it will be useful,
bce1b489
BE
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
6c82ad25 18#along with GCC; see the file COPYING. If not, write to
f9d09c43
KC
19#the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20#Boston, MA 02110-1301, USA. */
bce1b489
BE
21
22#This was cribbed from the libchill, libiberty and libstdc++
23#Makefile.in files. Some of this stuff may be unnecessary and
24#worthless.
25
9aa338ec 26SHELL = @SHELL@
b150efee 27MAKEOVERRIDES=
bce1b489
BE
28
29#### Start of system configuration section. ####
30
b150efee
FS
31srcdir = @glibcpp_srcdir@
32VPATH = @glibcpp_srcdir@
bce1b489
BE
33prefix = @prefix@
34exec_prefix = @exec_prefix@
9c01f395 35target_noncanonical = @target_noncanonical@
2b37e3d5 36gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
215c351a 37host_subdir = @host_subdir@
b150efee 38top_srcdir = @top_srcdir@
5b043f08 39multi_basedir = @multi_basedir@
eb01299a 40toolexecdir = @toolexecdir@
a42a57cb 41# Toolexecdir is used only by toolexeclibdir
608e1e0c 42toolexeclibdir = @toolexeclibdir@
b150efee 43
7d34a5a9 44includedirname = @includedirname@
45d5f86c 45libsuffix = @libsuffix@
ff65de76 46
a5a813f8
AP
47extra_ldflags_libobjc = @extra_ldflags_libobjc@
48
b150efee 49top_builddir = .
bce1b489 50
920d063d 51-include ../boehm-gc/threads.mk
785fad0a 52
bce1b489 53libdir = $(exec_prefix)/lib
9c01f395 54libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
bce1b489
BE
55
56# Multilib support variables.
57MULTISRCTOP =
58MULTIBUILDTOP =
59MULTIDIRS =
60MULTISUBDIR =
61MULTIDO = true
62MULTICLEAN = true
63
64# Not configured per top-level version, since that doesn't get passed
65# down at configure time, but overrridden by the top-level install
66# target.
67INSTALL = @INSTALL@
68INSTALL_PROGRAM = @INSTALL_PROGRAM@
69INSTALL_DATA = @INSTALL_DATA@
70
71AR = @AR@
72AR_FLAGS = rc
73
74RANLIB = @RANLIB@
75
76CC = @CC@
77CFLAGS = @CFLAGS@
9aa338ec 78WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
9aa338ec 79ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
84fd360d 80 -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
bce1b489 81
c161c99b
NP
82# Libtool
83# The following strings describe the version of the obj-C library
84# begin compiled and compatibility issues.
85# Please refer to Libtool documentation about how to manage these
86# numbers.
68a1af87
MH
87LIBOBJC_VERSION = @VERSION@
88LIBOBJC_GC_VERSION = @VERSION@
435317e2 89LIBTOOL = @LIBTOOL@
c161c99b
NP
90LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
91LIBTOOL_LINK = $(LIBTOOL) --mode=link
92LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
93LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
94#LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
95
8c3e5222
DA
96OBJC_GCFLAGS=-DOBJC_WITH_GC=1
97OBJC_THREAD_FILE=thr-objc
98OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
99OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
785fad0a 100OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
8c3e5222 101
5e2f657b 102INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
215c351a
PB
103 -I$(srcdir)/$(MULTISRCTOP)../gcc/config \
104 -I$(MULTIBUILDTOP)../../$(host_subdir)/gcc \
8c3e5222
DA
105 -I$(srcdir)/$(MULTISRCTOP)../include \
106 $(OBJC_BOEHM_GC_INCLUDES)
bce1b489 107
bce1b489
BE
108
109.SUFFIXES:
c161c99b 110.SUFFIXES: .c .m .lo
bce1b489 111
c161c99b
NP
112.c.lo:
113 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
bce1b489 114
c161c99b
NP
115.m.lo:
116 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
bce1b489 117
4102f627
RL
118# Flags to pass to a recursive make.
119FLAGS_TO_PASS = \
120 "AR=$(AR)" \
121 "AR_FLAGS=$(AR_FLAGS)" \
122 "CC=$(CC)" \
123 "CFLAGS=$(CFLAGS)" \
90e5b39f 124 "DESTDIR=$(DESTDIR)" \
4102f627
RL
125 "LIBCFLAGS=$(LIBCFLAGS)" \
126 "EXTRA_OFILES=$(EXTRA_OFILES)" \
127 "HDEFINES=$(HDEFINES)" \
128 "INSTALL=$(INSTALL)" \
129 "INSTALL_DATA=$(INSTALL_DATA)" \
130 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
131 "LDFLAGS=$(LDFLAGS)" \
c161c99b 132 "LIBTOOL=$(LIBTOOL)" \
4102f627
RL
133 "LOADLIBES=$(LOADLIBES)" \
134 "PICFLAG=$(PICFLAG)" \
135 "RANLIB=$(RANLIB)" \
76632dd0
DJ
136 "SHELL=$(SHELL)" \
137 "prefix=$(prefix)" \
138 "exec_prefix=$(exec_prefix)" \
139 "libdir=$(libdir)" \
140 "libsubdir=$(libsubdir)" \
141 "tooldir=$(tooldir)"
4102f627 142
45d5f86c 143all: libobjc$(libsuffix).la $(OBJC_BOEHM_GC)
6c5d742e 144 : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
bce1b489
BE
145
146# User-visible header files.
147
148OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \
149 NXConstStr.h Object.h Protocol.h encoding.h typedstream.h \
435317e2 150 thr.h objc-decls.h
bce1b489
BE
151
152# Modules that comprise the runtime library.
153
c161c99b
NP
154OBJS = archive.lo class.lo encoding.lo gc.lo hash.lo init.lo linking.lo \
155 misc.lo nil_method.lo NXConstStr.lo Object.lo objects.lo \
156 Protocol.lo sarray.lo selector.lo sendmsg.lo thr.lo \
84700346 157 $(OBJC_THREAD_FILE).lo exception.lo
bce1b489 158
c161c99b
NP
159OBJS_GC = archive_gc.lo class_gc.lo encoding_gc.lo gc_gc.lo hash_gc.lo \
160 init_gc.lo linking_gc.lo misc_gc.lo nil_method_gc.lo \
161 NXConstStr_gc.lo Object_gc.lo objects_gc.lo Protocol_gc.lo \
162 sarray_gc.lo selector_gc.lo sendmsg_gc.lo thr_gc.lo \
84700346 163 $(OBJC_THREAD_FILE)_gc.lo exception_gc.lo
bce1b489 164
7af06410 165runtime-info.h:
54b98a47 166 echo "" > tmp-runtime.m
c161c99b 167 echo "/* This file is automatically generated */" > $@
7989e4dc 168 $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@
54b98a47 169 rm -f tmp-runtime.m tmp-runtime.s
bce1b489 170
c161c99b
NP
171archive_gc.lo: archive.c
172 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
173 $(INCLUDES) $<
bce1b489 174
c161c99b
NP
175class_gc.lo: class.c
176 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
177 $(INCLUDES) $<
bce1b489 178
c161c99b
NP
179encoding_gc.lo: encoding.c
180 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
181 $(INCLUDES) $<
bce1b489 182
c161c99b
NP
183gc.lo: gc.c
184 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
bce1b489 185
c161c99b
NP
186gc_gc.lo: gc.c
187 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
188 $(INCLUDES) $<
bce1b489 189
c161c99b
NP
190hash_gc.lo: hash.c
191 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
192 $(INCLUDES) $<
bce1b489 193
c161c99b
NP
194init_gc.lo: init.c
195 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
196 $(INCLUDES) $<
bce1b489 197
c161c99b
NP
198linking.lo: linking.m
199 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
200 $(INCLUDES) $<
bce1b489 201
c161c99b
NP
202linking_gc.lo: linking.m
203 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
204 $(OBJC_GCFLAGS) $(INCLUDES) $<
bce1b489 205
c161c99b
NP
206misc_gc.lo: misc.c
207 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
208 $(INCLUDES) $<
bce1b489 209
c161c99b
NP
210nil_method_gc.lo: nil_method.c
211 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
212 $(INCLUDES) $<
bce1b489 213
c161c99b
NP
214NXConstStr.lo: NXConstStr.m
215 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
216 $(INCLUDES) $<
bce1b489 217
c161c99b
NP
218NXConstStr_gc.lo: NXConstStr.m
219 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
220 $(OBJC_GCFLAGS) $(INCLUDES) $<
bce1b489 221
c161c99b
NP
222Object.lo: Object.m
223 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
224 $(INCLUDES) $<
bce1b489 225
c161c99b
NP
226Object_gc.lo: Object.m
227 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
228 $(OBJC_GCFLAGS) $(INCLUDES) $<
bce1b489 229
c161c99b
NP
230objects_gc.lo: objects.c
231 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
232 $(INCLUDES) $<
bce1b489 233
c161c99b
NP
234Protocol.lo: Protocol.m
235 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
236 $(INCLUDES) $<
bce1b489 237
c161c99b
NP
238Protocol_gc.lo: Protocol.m
239 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
240 $(OBJC_GCFLAGS) $(INCLUDES) $<
bce1b489 241
c161c99b
NP
242sarray_gc.lo: sarray.c
243 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
244 $(INCLUDES) $<
bce1b489 245
c161c99b
NP
246selector_gc.lo: selector.c
247 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
248 $(INCLUDES) $<
bce1b489 249
c161c99b
NP
250sendmsg.lo: sendmsg.c runtime-info.h
251 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
bce1b489 252
c161c99b
NP
253sendmsg_gc.lo: sendmsg.c runtime-info.h
254 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
255 $(INCLUDES) $<
bce1b489 256
c161c99b
NP
257thr_gc.lo: thr.c
258 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
259 $(INCLUDES) $<
bce1b489 260
c161c99b
NP
261$(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD_FILE).c
262 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
263 $(INCLUDES) $<
bce1b489 264
a776161b 265exception.lo: exception.c
5520b936
AM
266 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) \
267 -fexceptions $(INCLUDES) $<
268
269exception_gc.lo: exception.c
a776161b
RH
270 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
271 -fexceptions $(INCLUDES) $<
272
b5422ad7 273doc: info dvi pdf html
bce1b489 274
38593123 275# No install-html or install-pdf support
a0ed5099 276.PHONY: install-html install-pdf install-info
2788992b 277install-html:
38593123 278install-pdf:
a0ed5099 279install-info:
2788992b 280
7afa92c5
JB
281LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
282
45d5f86c 283libobjc$(libsuffix).la: $(OBJS)
b150efee 284 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
608e1e0c 285 -rpath $(toolexeclibdir) \
7afa92c5
JB
286 -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc) \
287 $(LTLDFLAGS)
bce1b489 288
45d5f86c 289libobjc_gc$(libsuffix).la: $(OBJS_GC)
785fad0a 290 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) $(OBJC_BOEHM_GC_LIBS) \
608e1e0c 291 -rpath $(toolexeclibdir) \
7afa92c5
JB
292 -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \
293 $(LTLDFLAGS)
bce1b489 294
c161c99b
NP
295#
296# FIXME -- The following part does not fit in the libtool context.
297# Libtool is supposed to [going to] be able to create a win 32 DLL
298# without extra code but since I don't have a win machine to test
299# if it already works, I leave the old code here.
300#
301libobjc_s.a: libobjc.la
bce1b489
BE
302 mv libobjc.a libobjc_s.a
303
304# Create a relocatable DLL
305libobjc.dll: libobjc_s.a libobjc_entry.o
306 $(CC) -mdll -Wl,--base-file -Wl,libobjc.base \
307 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
308 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
309 --base-file libobjc.base --output-exp libobjc.exp
310 $(GCC_FOR_TARGET) -mdll -Wl,--base-file libobjc.base libobjc.exp \
311 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
312 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
313 --base-file libobjc.base --output-exp libobjc.exp
314 $(GCC_FOR_TARGET) libobjc.exp -mdll \
315 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
316 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
317 --output-lib libobjc.a
c161c99b
NP
318#
319#
320#
321#
322#
bce1b489 323
10c179f3
JM
324info:
325dvi:
b5422ad7 326pdf:
10c179f3 327html:
bce1b489
BE
328
329Makefile: Makefile.in config.status
330 $(SHELL) config.status
331
332config.status: configure
333 rm -f config.cache
334 CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
335 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
336
dd365157 337${srcdir}/configure: @MAINT@ configure.ac
bce1b489
BE
338 rm -f config.cache
339 cd ${srcdir} && autoconf
340
b150efee 341install: install-libs install-headers
bce1b489
BE
342
343install-libs: installdirs
5b043f08 344 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir)
45d5f86c 345 $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libsuffix).la $(DESTDIR)$(toolexeclibdir);
c161c99b 346 if [ "$(OBJC_BOEHM_GC)" ]; then \
45d5f86c 347 $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libsuffix).la \
608e1e0c 348 $(DESTDIR)$(toolexeclibdir);\
c161c99b 349 fi
b150efee 350 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
608e1e0c 351 @-$(LIBTOOL) --mode=finish $(DESTDIR)$(toolexeclibdir)
bce1b489
BE
352
353# Copy Objective C headers to installation include directory.
b150efee 354install-headers:
5b043f08 355 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc
bce1b489 356 for file in $(OBJC_H); do \
789eb4f5 357 realfile=$(srcdir)/objc/$${file}; \
7d34a5a9 358 $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc; \
bce1b489
BE
359 done
360
361check uninstall install-strip dist installcheck installdirs:
362
363mostlyclean:
45d5f86c 364 -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo
c161c99b 365 -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
b5422ad7 366 fflags *.aux *.cp *.dvi *.pdf *.fn *.info *.ky *.log *.pg \
bce1b489
BE
367 *.toc *.tp *.vr *.html libobj.exp
368 @$(MULTICLEAN) multi-clean DO=mostlyclean
369
370clean: mostlyclean
371 rm -f config.log
372 @$(MULTICLEAN) multi-clean DO=clean
373
374distclean: clean
375 @$(MULTICLEAN) multi-clean DO=distclean
376 rm -f config.cache config.status Makefile configure
377
378maintainer-clean realclean: distclean
379
380.PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
381 install-strip dist installcheck installdirs
54b2f310
DJ
382
383# Don't export variables to the environment, in order to not confuse
384# configure.
385.NOEXPORT: