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