]> git.ipfire.org Git - thirdparty/gcc.git/blame - libobjc/Makefile.in
* intrinsics/pack_generic.c (pack): Add missing return and fix whitespace.
[thirdparty/gcc.git] / libobjc / Makefile.in
CommitLineData
61a0eea4 1# Makefile for GNU Objective C runtime library.
e23e7a91 2# Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
6bc9506f 3# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
265ab036 4
893d9197 5#This file is part of GCC.
265ab036 6
893d9197 7#GCC is free software; you can redistribute it and/or modify
265ab036 8#it under the terms of the GNU General Public License as published by
6bc9506f 9#the Free Software Foundation; either version 3, or (at your option)
265ab036 10#any later version.
11
893d9197 12#GCC is distributed in the hope that it will be useful,
265ab036 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
6bc9506f 18#along with GCC; see the file COPYING3. If not see
19#<http://www.gnu.org/licenses/>.
265ab036 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
c86bfe45 25SHELL = @SHELL@
6ed57656 26MAKEOVERRIDES=
265ab036 27
28#### Start of system configuration section. ####
29
6ed57656 30srcdir = @glibcpp_srcdir@
31VPATH = @glibcpp_srcdir@
265ab036 32prefix = @prefix@
33exec_prefix = @exec_prefix@
9c4e05bc 34target_noncanonical = @target_noncanonical@
32ee7eb8 35gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
c1eb9e31 36host_subdir = @host_subdir@
6ed57656 37top_srcdir = @top_srcdir@
ff434425 38multi_basedir = @multi_basedir@
57a4c641 39toolexecdir = @toolexecdir@
85fe910a 40# Toolexecdir is used only by toolexeclibdir
7fc7cb73 41toolexeclibdir = @toolexeclibdir@
6ed57656 42
ce716239 43includedirname = @includedirname@
f90c9f0e 44libsuffix = @libsuffix@
166e6519 45
a16ff609 46extra_ldflags_libobjc = @extra_ldflags_libobjc@
47
6ed57656 48top_builddir = .
265ab036 49
cec41e68 50-include ../boehm-gc/threads.mk
7170e5e2 51
265ab036 52libdir = $(exec_prefix)/lib
9c4e05bc 53libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
265ab036 54
55# Multilib support variables.
56MULTISRCTOP =
57MULTIBUILDTOP =
58MULTIDIRS =
59MULTISUBDIR =
60MULTIDO = true
61MULTICLEAN = 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.
66INSTALL = @INSTALL@
67INSTALL_PROGRAM = @INSTALL_PROGRAM@
68INSTALL_DATA = @INSTALL_DATA@
69
70AR = @AR@
71AR_FLAGS = rc
72
73RANLIB = @RANLIB@
74
75CC = @CC@
76CFLAGS = @CFLAGS@
c86bfe45 77WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
c86bfe45 78ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
7f0dae42 79 -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
265ab036 80
0f72a548 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.
f01fd551 86LIBOBJC_VERSION = @VERSION@
87LIBOBJC_GC_VERSION = @VERSION@
60598a3a 88LIBTOOL = @LIBTOOL@ $(LIBTOOLFLAGS)
0f72a548 89LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
90LIBTOOL_LINK = $(LIBTOOL) --mode=link
91LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
92LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
93#LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
94
e23e7a91 95OBJC_GCFLAGS=-DOBJC_WITH_GC=1
e23e7a91 96OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
97OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
7170e5e2 98OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
e23e7a91 99
09fa2580 100INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
c1eb9e31 101 -I$(srcdir)/$(MULTISRCTOP)../gcc/config \
102 -I$(MULTIBUILDTOP)../../$(host_subdir)/gcc \
e23e7a91 103 -I$(srcdir)/$(MULTISRCTOP)../include \
104 $(OBJC_BOEHM_GC_INCLUDES)
265ab036 105
265ab036 106
107.SUFFIXES:
0f72a548 108.SUFFIXES: .c .m .lo
265ab036 109
0f72a548 110.c.lo:
111 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
265ab036 112
0f72a548 113.m.lo:
114 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
265ab036 115
7ca6de5f 116# Flags to pass to a recursive make.
117FLAGS_TO_PASS = \
118 "AR=$(AR)" \
119 "AR_FLAGS=$(AR_FLAGS)" \
120 "CC=$(CC)" \
121 "CFLAGS=$(CFLAGS)" \
71aad3b8 122 "DESTDIR=$(DESTDIR)" \
7ca6de5f 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)" \
0f72a548 130 "LIBTOOL=$(LIBTOOL)" \
7ca6de5f 131 "LOADLIBES=$(LOADLIBES)" \
132 "PICFLAG=$(PICFLAG)" \
133 "RANLIB=$(RANLIB)" \
f92ff492 134 "SHELL=$(SHELL)" \
135 "prefix=$(prefix)" \
136 "exec_prefix=$(exec_prefix)" \
137 "libdir=$(libdir)" \
138 "libsubdir=$(libsubdir)" \
139 "tooldir=$(tooldir)"
7ca6de5f 140
f90c9f0e 141all: libobjc$(libsuffix).la $(OBJC_BOEHM_GC)
5f7912d8 142 : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
265ab036 143
01eb761e 144# User-visible header files, from the objc/ directory
265ab036 145
344bfd09 146OBJC_H = \
147 objc.h \
148 objc-exception.h \
149 \
344bfd09 150 NXConstStr.h \
151 Object.h \
152 Protocol.h \
153 encoding.h \
c3a945cd 154 hash.h \
155 message.h \
156 objc-api.h \
157 objc-decls.h \
158 objc-list.h \
159 sarray.h \
344bfd09 160 thr.h \
c3a945cd 161 typedstream.h
265ab036 162
01eb761e 163# User-visible header files containing deprecated APIs, from the
164# objc/deprecated directory
165
344bfd09 166OBJC_DEPRECATED_H = \
167 MetaClass.h \
168 Object.h \
169 STR.h \
c3a945cd 170 objc_error.h \
bb882a43 171 objc_malloc.h \
344bfd09 172 objc_unexpected_exception.h \
bb882a43 173 objc_valloc.h \
344bfd09 174 struct_objc_class.h \
175 struct_objc_protocol.h \
176 struct_objc_selector.h \
177 typedstream.h
01eb761e 178
265ab036 179# Modules that comprise the runtime library.
180
c3a945cd 181OBJS = \
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
202OBJS_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
265ab036 222
fa757077 223runtime-info.h:
ad911efc 224 echo "" > tmp-runtime.m
0f72a548 225 echo "/* This file is automatically generated */" > $@
5148359d 226 $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@
ad911efc 227 rm -f tmp-runtime.m tmp-runtime.s
265ab036 228
0f72a548 229archive_gc.lo: archive.c
aaba593f 230 $(LIBTOOL_COMPILE) $(CC) -Wno-deprecated-declarations -c -o $@ $(ALL_CFLAGS) \
231 $(OBJC_GCFLAGS) $(INCLUDES) $<
232
233archive.lo: archive.c
234 $(LIBTOOL_COMPILE) $(CC) -Wno-deprecated-declarations -c $(ALL_CFLAGS) \
0f72a548 235 $(INCLUDES) $<
265ab036 236
0f72a548 237class_gc.lo: class.c
238 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
239 $(INCLUDES) $<
265ab036 240
0f72a548 241encoding_gc.lo: encoding.c
242 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
243 $(INCLUDES) $<
265ab036 244
c3a945cd 245error_gc.lo: error.c
246 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
247 $(INCLUDES) $<
248
0f72a548 249gc.lo: gc.c
250 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
265ab036 251
0f72a548 252gc_gc.lo: gc.c
253 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
254 $(INCLUDES) $<
265ab036 255
0f72a548 256hash_gc.lo: hash.c
257 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
258 $(INCLUDES) $<
265ab036 259
0f72a548 260init_gc.lo: init.c
261 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
262 $(INCLUDES) $<
265ab036 263
0f72a548 264linking.lo: linking.m
265 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
266 $(INCLUDES) $<
265ab036 267
0f72a548 268linking_gc.lo: linking.m
269 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
270 $(OBJC_GCFLAGS) $(INCLUDES) $<
265ab036 271
c3a945cd 272memory_gc.lo: memory.c
0f72a548 273 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
274 $(INCLUDES) $<
265ab036 275
0f72a548 276nil_method_gc.lo: nil_method.c
277 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
278 $(INCLUDES) $<
265ab036 279
0f72a548 280NXConstStr.lo: NXConstStr.m
281 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
282 $(INCLUDES) $<
265ab036 283
0f72a548 284NXConstStr_gc.lo: NXConstStr.m
285 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
286 $(OBJC_GCFLAGS) $(INCLUDES) $<
265ab036 287
aaba593f 288# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
0f72a548 289Object.lo: Object.m
aaba593f 290 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
291 -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
265ab036 292
aaba593f 293# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
0f72a548 294Object_gc.lo: Object.m
aaba593f 295 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
296 -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
265ab036 297
0f72a548 298objects_gc.lo: objects.c
299 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
300 $(INCLUDES) $<
265ab036 301
0f72a548 302Protocol.lo: Protocol.m
303 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
304 $(INCLUDES) $<
265ab036 305
0f72a548 306Protocol_gc.lo: Protocol.m
307 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
308 $(OBJC_GCFLAGS) $(INCLUDES) $<
265ab036 309
0f72a548 310sarray_gc.lo: sarray.c
311 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
312 $(INCLUDES) $<
265ab036 313
0f72a548 314selector_gc.lo: selector.c
315 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
316 $(INCLUDES) $<
265ab036 317
0f72a548 318sendmsg.lo: sendmsg.c runtime-info.h
319 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
265ab036 320
0f72a548 321sendmsg_gc.lo: sendmsg.c runtime-info.h
322 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
323 $(INCLUDES) $<
265ab036 324
0f72a548 325thr_gc.lo: thr.c
326 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
327 $(INCLUDES) $<
265ab036 328
a5974a58 329# -Wno-deprecated-declarations is to silence warnings from using
330# _objc_unexpected_exception.
2c5cfd29 331exception.lo: exception.c
98fde024 332 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) \
a5974a58 333 -fexceptions -Wno-deprecated-declarations $(INCLUDES) $<
98fde024 334
335exception_gc.lo: exception.c
2c5cfd29 336 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
a5974a58 337 -fexceptions -Wno-deprecated-declarations $(INCLUDES) $<
2c5cfd29 338
51f93521 339doc: info dvi pdf html
265ab036 340
cbb90fc8 341# No install-html or install-pdf support
e0f44d87 342.PHONY: install-html install-pdf install-info
ba0c10ab 343install-html:
cbb90fc8 344install-pdf:
e0f44d87 345install-info:
ba0c10ab 346
ac051731 347LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
348
f90c9f0e 349libobjc$(libsuffix).la: $(OBJS)
6ed57656 350 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
7fc7cb73 351 -rpath $(toolexeclibdir) \
ac051731 352 -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc) \
353 $(LTLDFLAGS)
265ab036 354
f90c9f0e 355libobjc_gc$(libsuffix).la: $(OBJS_GC)
7170e5e2 356 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) $(OBJC_BOEHM_GC_LIBS) \
7fc7cb73 357 -rpath $(toolexeclibdir) \
ac051731 358 -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \
359 $(LTLDFLAGS)
265ab036 360
6b515411 361info:
362dvi:
51f93521 363pdf:
6b515411 364html:
265ab036 365
366Makefile: Makefile.in config.status
367 $(SHELL) config.status
368
369config.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
a2655af1 374AUTOCONF = autoconf
375ACLOCAL = aclocal
376ACLOCAL_AMFLAGS = -I ../config -I ..
377aclocal_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
265ab036 388 rm -f config.cache
a2655af1 389 cd $(srcdir) && $(AUTOCONF)
390
391$(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps)
392 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
265ab036 393
6ed57656 394install: install-libs install-headers
265ab036 395
396install-libs: installdirs
ff434425 397 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir)
f90c9f0e 398 $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libsuffix).la $(DESTDIR)$(toolexeclibdir);
0f72a548 399 if [ "$(OBJC_BOEHM_GC)" ]; then \
f90c9f0e 400 $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libsuffix).la \
7fc7cb73 401 $(DESTDIR)$(toolexeclibdir);\
0f72a548 402 fi
6ed57656 403 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
7fc7cb73 404 @-$(LIBTOOL) --mode=finish $(DESTDIR)$(toolexeclibdir)
265ab036 405
406# Copy Objective C headers to installation include directory.
6ed57656 407install-headers:
ff434425 408 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc
265ab036 409 for file in $(OBJC_H); do \
3c3646e7 410 realfile=$(srcdir)/objc/$${file}; \
ce716239 411 $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc; \
265ab036 412 done
01eb761e 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
265ab036 418
419check uninstall install-strip dist installcheck installdirs:
420
421mostlyclean:
f90c9f0e 422 -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo
0f72a548 423 -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
51f93521 424 fflags *.aux *.cp *.dvi *.pdf *.fn *.info *.ky *.log *.pg \
265ab036 425 *.toc *.tp *.vr *.html libobj.exp
426 @$(MULTICLEAN) multi-clean DO=mostlyclean
427
428clean: mostlyclean
429 rm -f config.log
430 @$(MULTICLEAN) multi-clean DO=clean
431
432distclean: clean
433 @$(MULTICLEAN) multi-clean DO=distclean
434 rm -f config.cache config.status Makefile configure
435
436maintainer-clean realclean: distclean
437
438.PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
439 install-strip dist installcheck installdirs
428b4753 440
441# Don't export variables to the environment, in order to not confuse
442# configure.
443.NOEXPORT: