]> git.ipfire.org Git - thirdparty/gcc.git/blob - libobjc/Makefile.in
In libobjc/:
[thirdparty/gcc.git] / libobjc / Makefile.in
1 # Makefile for GNU Objective C runtime library.
2 # Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
4
5 #This file is part of GCC.
6
7 #GCC 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 3, or (at your option)
10 #any later version.
11
12 #GCC 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 GCC; see the file COPYING3. If not see
19 #<http://www.gnu.org/licenses/>.
20
21 #This was cribbed from the libchill, libiberty and libstdc++
22 #Makefile.in files. Some of this stuff may be unnecessary and
23 #worthless.
24
25 SHELL = @SHELL@
26 MAKEOVERRIDES=
27
28 #### Start of system configuration section. ####
29
30 srcdir = @glibcpp_srcdir@
31 VPATH = @glibcpp_srcdir@
32 prefix = @prefix@
33 exec_prefix = @exec_prefix@
34 target_noncanonical = @target_noncanonical@
35 gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
36 host_subdir = @host_subdir@
37 top_srcdir = @top_srcdir@
38 multi_basedir = @multi_basedir@
39 toolexecdir = @toolexecdir@
40 # Toolexecdir is used only by toolexeclibdir
41 toolexeclibdir = @toolexeclibdir@
42
43 includedirname = @includedirname@
44 libsuffix = @libsuffix@
45
46 extra_ldflags_libobjc = @extra_ldflags_libobjc@
47
48 top_builddir = .
49
50 -include ../boehm-gc/threads.mk
51
52 libdir = $(exec_prefix)/lib
53 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
54
55 # Multilib support variables.
56 MULTISRCTOP =
57 MULTIBUILDTOP =
58 MULTIDIRS =
59 MULTISUBDIR =
60 MULTIDO = true
61 MULTICLEAN = true
62
63 # Not configured per top-level version, since that doesn't get passed
64 # down at configure time, but overrridden by the top-level install
65 # target.
66 INSTALL = @INSTALL@
67 INSTALL_PROGRAM = @INSTALL_PROGRAM@
68 INSTALL_DATA = @INSTALL_DATA@
69
70 AR = @AR@
71 AR_FLAGS = rc
72
73 RANLIB = @RANLIB@
74
75 CC = @CC@
76 CFLAGS = @CFLAGS@
77 WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
78 ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
79 -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
80
81 # Libtool
82 # The following strings describe the version of the obj-C library
83 # begin compiled and compatibility issues.
84 # Please refer to Libtool documentation about how to manage these
85 # numbers.
86 LIBOBJC_VERSION = @VERSION@
87 LIBOBJC_GC_VERSION = @VERSION@
88 LIBTOOL = @LIBTOOL@ $(LIBTOOLFLAGS)
89 LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
90 LIBTOOL_LINK = $(LIBTOOL) --mode=link
91 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
92 LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
93 #LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
94
95 OBJC_GCFLAGS=-DOBJC_WITH_GC=1
96 OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
97 OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
98 OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
99
100 INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
101 -I$(srcdir)/$(MULTISRCTOP)../gcc/config \
102 -I$(MULTIBUILDTOP)../../$(host_subdir)/gcc \
103 -I$(srcdir)/$(MULTISRCTOP)../include \
104 $(OBJC_BOEHM_GC_INCLUDES)
105
106
107 .SUFFIXES:
108 .SUFFIXES: .c .m .lo
109
110 .c.lo:
111 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
112
113 .m.lo:
114 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
115
116 # Flags to pass to a recursive make.
117 FLAGS_TO_PASS = \
118 "AR=$(AR)" \
119 "AR_FLAGS=$(AR_FLAGS)" \
120 "CC=$(CC)" \
121 "CFLAGS=$(CFLAGS)" \
122 "DESTDIR=$(DESTDIR)" \
123 "LIBCFLAGS=$(LIBCFLAGS)" \
124 "EXTRA_OFILES=$(EXTRA_OFILES)" \
125 "HDEFINES=$(HDEFINES)" \
126 "INSTALL=$(INSTALL)" \
127 "INSTALL_DATA=$(INSTALL_DATA)" \
128 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
129 "LDFLAGS=$(LDFLAGS)" \
130 "LIBTOOL=$(LIBTOOL)" \
131 "LOADLIBES=$(LOADLIBES)" \
132 "PICFLAG=$(PICFLAG)" \
133 "RANLIB=$(RANLIB)" \
134 "SHELL=$(SHELL)" \
135 "prefix=$(prefix)" \
136 "exec_prefix=$(exec_prefix)" \
137 "libdir=$(libdir)" \
138 "libsubdir=$(libsubdir)" \
139 "tooldir=$(tooldir)"
140
141 all: libobjc$(libsuffix).la $(OBJC_BOEHM_GC)
142 : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
143
144 # User-visible header files, from the objc/ directory
145
146 OBJC_H = \
147 objc.h \
148 objc-exception.h \
149 \
150 NXConstStr.h \
151 Object.h \
152 Protocol.h \
153 encoding.h \
154 hash.h \
155 message.h \
156 objc-api.h \
157 objc-decls.h \
158 objc-list.h \
159 sarray.h \
160 thr.h \
161 typedstream.h
162
163 # User-visible header files containing deprecated APIs, from the
164 # objc/deprecated directory
165
166 OBJC_DEPRECATED_H = \
167 MetaClass.h \
168 Object.h \
169 STR.h \
170 objc_error.h \
171 objc_malloc.h \
172 objc_unexpected_exception.h \
173 objc_valloc.h \
174 struct_objc_class.h \
175 struct_objc_protocol.h \
176 struct_objc_selector.h \
177 typedstream.h
178
179 # Modules that comprise the runtime library.
180
181 OBJS = \
182 NXConstStr.lo \
183 Object.lo \
184 Protocol.lo \
185 archive.lo \
186 class.lo \
187 encoding.lo \
188 error.lo \
189 gc.lo \
190 hash.lo \
191 init.lo \
192 linking.lo \
193 memory.lo \
194 nil_method.lo \
195 objects.lo \
196 sarray.lo \
197 selector.lo \
198 sendmsg.lo \
199 thr.lo \
200 exception.lo
201
202 OBJS_GC = \
203 NXConstStr_gc.lo \
204 Object_gc.lo \
205 Protocol_gc.lo \
206 archive_gc.lo \
207 class_gc.lo \
208 encoding_gc.lo \
209 error_gc.lo \
210 gc_gc.lo \
211 hash_gc.lo \
212 init_gc.lo \
213 linking_gc.lo \
214 memory_gc.lo \
215 nil_method_gc.lo \
216 objects_gc.lo \
217 sarray_gc.lo \
218 selector_gc.lo \
219 sendmsg_gc.lo \
220 thr_gc.lo \
221 exception_gc.lo
222
223 runtime-info.h:
224 echo "" > tmp-runtime.m
225 echo "/* This file is automatically generated */" > $@
226 $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@
227 rm -f tmp-runtime.m tmp-runtime.s
228
229 archive_gc.lo: archive.c
230 $(LIBTOOL_COMPILE) $(CC) -Wno-deprecated-declarations -c -o $@ $(ALL_CFLAGS) \
231 $(OBJC_GCFLAGS) $(INCLUDES) $<
232
233 archive.lo: archive.c
234 $(LIBTOOL_COMPILE) $(CC) -Wno-deprecated-declarations -c $(ALL_CFLAGS) \
235 $(INCLUDES) $<
236
237 class_gc.lo: class.c
238 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
239 $(INCLUDES) $<
240
241 encoding_gc.lo: encoding.c
242 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
243 $(INCLUDES) $<
244
245 error_gc.lo: error.c
246 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
247 $(INCLUDES) $<
248
249 gc.lo: gc.c
250 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
251
252 gc_gc.lo: gc.c
253 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
254 $(INCLUDES) $<
255
256 hash_gc.lo: hash.c
257 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
258 $(INCLUDES) $<
259
260 init_gc.lo: init.c
261 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
262 $(INCLUDES) $<
263
264 linking.lo: linking.m
265 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
266 $(INCLUDES) $<
267
268 linking_gc.lo: linking.m
269 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
270 $(OBJC_GCFLAGS) $(INCLUDES) $<
271
272 memory_gc.lo: memory.c
273 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
274 $(INCLUDES) $<
275
276 nil_method_gc.lo: nil_method.c
277 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
278 $(INCLUDES) $<
279
280 NXConstStr.lo: NXConstStr.m
281 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
282 $(INCLUDES) $<
283
284 NXConstStr_gc.lo: NXConstStr.m
285 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
286 $(OBJC_GCFLAGS) $(INCLUDES) $<
287
288 # -Wno-deprecated-declarations is for the objc/typedstream.h functions.
289 Object.lo: Object.m
290 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
291 -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
292
293 # -Wno-deprecated-declarations is for the objc/typedstream.h functions.
294 Object_gc.lo: Object.m
295 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
296 -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
297
298 objects_gc.lo: objects.c
299 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
300 $(INCLUDES) $<
301
302 Protocol.lo: Protocol.m
303 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
304 $(INCLUDES) $<
305
306 Protocol_gc.lo: Protocol.m
307 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
308 $(OBJC_GCFLAGS) $(INCLUDES) $<
309
310 sarray_gc.lo: sarray.c
311 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
312 $(INCLUDES) $<
313
314 selector_gc.lo: selector.c
315 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
316 $(INCLUDES) $<
317
318 sendmsg.lo: sendmsg.c runtime-info.h
319 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
320
321 sendmsg_gc.lo: sendmsg.c runtime-info.h
322 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
323 $(INCLUDES) $<
324
325 thr_gc.lo: thr.c
326 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
327 $(INCLUDES) $<
328
329 # -Wno-deprecated-declarations is to silence warnings from using
330 # _objc_unexpected_exception.
331 exception.lo: exception.c
332 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) \
333 -fexceptions -Wno-deprecated-declarations $(INCLUDES) $<
334
335 exception_gc.lo: exception.c
336 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
337 -fexceptions -Wno-deprecated-declarations $(INCLUDES) $<
338
339 doc: info dvi pdf html
340
341 # No install-html or install-pdf support
342 .PHONY: install-html install-pdf install-info
343 install-html:
344 install-pdf:
345 install-info:
346
347 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
348
349 libobjc$(libsuffix).la: $(OBJS)
350 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
351 -rpath $(toolexeclibdir) \
352 -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc) \
353 $(LTLDFLAGS)
354
355 libobjc_gc$(libsuffix).la: $(OBJS_GC)
356 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) $(OBJC_BOEHM_GC_LIBS) \
357 -rpath $(toolexeclibdir) \
358 -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \
359 $(LTLDFLAGS)
360
361 info:
362 dvi:
363 pdf:
364 html:
365
366 Makefile: Makefile.in config.status
367 $(SHELL) config.status
368
369 config.status: configure
370 rm -f config.cache
371 CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
372 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
373
374 AUTOCONF = autoconf
375 ACLOCAL = aclocal
376 ACLOCAL_AMFLAGS = -I ../config -I ..
377 aclocal_deps = \
378 $(srcdir)/../config/multi.m4 \
379 $(srcdir)/../config/override.m4 \
380 $(srcdir)/../config/proginstall.m4 \
381 $(srcdir)/../ltoptions.m4 \
382 $(srcdir)/../ltsugar.m4 \
383 $(srcdir)/../ltversion.m4 \
384 $(srcdir)/../lt~obsolete.m4 \
385 $(srcdir)/acinclude.m4
386
387 $(srcdir)/configure: @MAINT@ configure.ac $(srcdir)/aclocal.m4
388 rm -f config.cache
389 cd $(srcdir) && $(AUTOCONF)
390
391 $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps)
392 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
393
394 install: install-libs install-headers
395
396 install-libs: installdirs
397 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir)
398 $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libsuffix).la $(DESTDIR)$(toolexeclibdir);
399 if [ "$(OBJC_BOEHM_GC)" ]; then \
400 $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libsuffix).la \
401 $(DESTDIR)$(toolexeclibdir);\
402 fi
403 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
404 @-$(LIBTOOL) --mode=finish $(DESTDIR)$(toolexeclibdir)
405
406 # Copy Objective C headers to installation include directory.
407 install-headers:
408 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc
409 for file in $(OBJC_H); do \
410 realfile=$(srcdir)/objc/$${file}; \
411 $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc; \
412 done
413 $(multi_basedir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc/deprecated
414 for file in $(OBJC_DEPRECATED_H); do \
415 realfile=$(srcdir)/objc/deprecated/$${file}; \
416 $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc/deprecated; \
417 done
418
419 check uninstall install-strip dist installcheck installdirs:
420
421 mostlyclean:
422 -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo
423 -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
424 fflags *.aux *.cp *.dvi *.pdf *.fn *.info *.ky *.log *.pg \
425 *.toc *.tp *.vr *.html libobj.exp
426 @$(MULTICLEAN) multi-clean DO=mostlyclean
427
428 clean: mostlyclean
429 rm -f config.log
430 @$(MULTICLEAN) multi-clean DO=clean
431
432 distclean: clean
433 @$(MULTICLEAN) multi-clean DO=distclean
434 rm -f config.cache config.status Makefile configure
435
436 maintainer-clean realclean: distclean
437
438 .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
439 install-strip dist installcheck installdirs
440
441 # Don't export variables to the environment, in order to not confuse
442 # configure.
443 .NOEXPORT: