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