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