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