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