target-supports.exp (check_effective_target_arm_dsp): New.
[official-gcc.git] / libobjc / Makefile.in
blob02443327058132aa0b24b4e99227bd371c2778f5
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, 2010 Free Software Foundation, Inc.
5 #This file is part of GCC.
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.
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.
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/>.
21 #This was cribbed from the libchill, libiberty and libstdc++
22 #Makefile.in files. Some of this stuff may be unnecessary and
23 #worthless.
25 SHELL = @SHELL@
26 MAKEOVERRIDES=
28 #### Start of system configuration section. ####
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@
43 includedirname = @includedirname@
44 libsuffix = @libsuffix@
46 lt_host_flags = @lt_host_flags@
47 extra_ldflags_libobjc = @extra_ldflags_libobjc@
49 top_builddir = .
51 -include ../boehm-gc/threads.mk
53 libdir = $(exec_prefix)/lib
54 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
56 # Multilib support variables.
57 MULTISRCTOP =
58 MULTIBUILDTOP =
59 MULTIDIRS =
60 MULTISUBDIR =
61 MULTIDO = true
62 MULTICLEAN = true
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@
71 AR = @AR@
72 AR_FLAGS = rc
74 RANLIB = @RANLIB@
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
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
96 OBJC_GCFLAGS=@OBJC_GCFLAGS@
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)
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)
108 ## The list of header/source files
111 # User-visible header files, from the objc/ directory
112 OBJC_H = \
113 objc.h \
114 objc-exception.h \
115 objc-sync.h \
117 NXConstStr.h \
118 Object.h \
119 Protocol.h \
120 message.h \
121 objc-decls.h \
122 runtime.h \
123 thr.h
125 # Objective-C source files to compile
126 OBJC_SOURCE_FILES = \
127 NXConstStr.m \
128 Object.m \
129 Protocol.m \
130 accessors.m \
131 linking.m
133 # C source files to compile
134 C_SOURCE_FILES = \
135 class.c \
136 encoding.c \
137 error.c \
138 gc.c \
139 hash.c \
140 init.c \
141 ivars.c \
142 memory.c \
143 methods.c \
144 nil_method.c \
145 objc-foreach.c \
146 objc-sync.c \
147 objects.c \
148 protocols.c \
149 sarray.c \
150 selector.c \
151 sendmsg.c \
152 thr.c \
153 exception.c
155 # Object files to link (when the library is linked with no GC (Garbage Collection))
156 OBJS = \
157 $(patsubst %.m,%.lo,$(OBJC_SOURCE_FILES)) \
158 $(patsubst %.c,%.lo,$(C_SOURCE_FILES))
160 # Object files to link (when the library is linked with GC (Garbage Collection))
161 OBJS_GC = \
162 $(patsubst %.m,%_gc.lo,$(OBJC_SOURCE_FILES)) \
163 $(patsubst %.c,%_gc.lo,$(C_SOURCE_FILES))
167 ## The rules to build
170 # Flags to pass to a recursive make.
171 FLAGS_TO_PASS = \
172 "AR=$(AR)" \
173 "AR_FLAGS=$(AR_FLAGS)" \
174 "CC=$(CC)" \
175 "CFLAGS=$(CFLAGS)" \
176 "DESTDIR=$(DESTDIR)" \
177 "LIBCFLAGS=$(LIBCFLAGS)" \
178 "EXTRA_OFILES=$(EXTRA_OFILES)" \
179 "HDEFINES=$(HDEFINES)" \
180 "INSTALL=$(INSTALL)" \
181 "INSTALL_DATA=$(INSTALL_DATA)" \
182 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
183 "LDFLAGS=$(LDFLAGS)" \
184 "LIBTOOL=$(LIBTOOL)" \
185 "LOADLIBES=$(LOADLIBES)" \
186 "PICFLAG=$(PICFLAG)" \
187 "RANLIB=$(RANLIB)" \
188 "SHELL=$(SHELL)" \
189 "prefix=$(prefix)" \
190 "exec_prefix=$(exec_prefix)" \
191 "libdir=$(libdir)" \
192 "libsubdir=$(libsubdir)" \
193 "tooldir=$(tooldir)"
195 # The 'all' rule must be the first one so that it is executed if
196 # nothing is specified on the command-line.
197 all: libobjc$(libsuffix).la $(OBJC_BOEHM_GC)
198 : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
200 .SUFFIXES:
201 .SUFFIXES: .c .m .lo
203 %.lo: %.c
204 $(LIBTOOL_COMPILE) $(CC) $< -c \
205 $(ALL_CFLAGS) $(INCLUDES) \
206 -o $@
208 %_gc.lo: %.c
209 $(LIBTOOL_COMPILE) $(CC) $< -c \
210 $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) \
211 -o $@
213 %.lo: %.m
214 $(LIBTOOL_COMPILE) $(CC) $< -c \
215 $(ALL_CFLAGS) $(INCLUDES) -fgnu-runtime \
216 -o $@
218 %_gc.lo: %.m
219 $(LIBTOOL_COMPILE) $(CC) $< -c \
220 $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fgnu-runtime \
221 -o $@
223 # sendmsg has a special rule because it depends on runtime-info.h.
224 runtime-info.h:
225 echo "" > tmp-runtime.m
226 echo "/* This file is automatically generated */" > $@
227 $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@
228 rm -f tmp-runtime.m tmp-runtime.s
230 sendmsg.lo: sendmsg.c runtime-info.h
231 $(LIBTOOL_COMPILE) $(CC) $< -c \
232 $(ALL_CFLAGS) $(INCLUDES) \
233 -o $@
235 sendmsg_gc.lo: sendmsg.c runtime-info.h
236 $(LIBTOOL_COMPILE) $(CC) $< -c \
237 $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) \
238 -o $@
240 # These files have separate rules because they require special
241 # compiler flags.
243 exception.lo: exception.c
244 $(LIBTOOL_COMPILE) $(CC) $< -c \
245 $(ALL_CFLAGS) $(INCLUDES) -fexceptions \
246 -o $@
248 exception_gc.lo: exception.c
249 $(LIBTOOL_COMPILE) $(CC) $< -c \
250 $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fexceptions \
251 -o $@
253 doc: info dvi pdf html
255 # No install-html or install-pdf support
256 .PHONY: install-html install-pdf install-info
257 install-html:
258 install-pdf:
259 install-info:
261 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
263 libobjc$(libsuffix).la: $(OBJS)
264 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
265 -Wc,-shared-libgcc -rpath $(toolexeclibdir) \
266 -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc) \
267 $(LTLDFLAGS)
269 libobjc_gc$(libsuffix).la: $(OBJS_GC)
270 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) $(OBJC_BOEHM_GC_LIBS) \
271 -Wc,-shared-libgcc -rpath $(toolexeclibdir) \
272 -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \
273 $(LTLDFLAGS)
275 info:
276 dvi:
277 pdf:
278 html:
280 Makefile: Makefile.in config.status
281 $(SHELL) config.status
283 config.status: configure
284 rm -f config.cache
285 CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
286 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
288 AUTOCONF = autoconf
289 ACLOCAL = aclocal
290 ACLOCAL_AMFLAGS = -I ../config -I ..
291 aclocal_deps = \
292 $(srcdir)/../config/multi.m4 \
293 $(srcdir)/../config/override.m4 \
294 $(srcdir)/../config/proginstall.m4 \
295 $(srcdir)/../ltoptions.m4 \
296 $(srcdir)/../ltsugar.m4 \
297 $(srcdir)/../ltversion.m4 \
298 $(srcdir)/../lt~obsolete.m4 \
299 $(srcdir)/acinclude.m4
301 $(srcdir)/configure: @MAINT@ configure.ac $(srcdir)/aclocal.m4
302 rm -f config.cache
303 cd $(srcdir) && $(AUTOCONF)
305 $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps)
306 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
308 install: install-libs install-headers
310 install-libs: installdirs
311 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir)
312 $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libsuffix).la $(DESTDIR)$(toolexeclibdir);
313 if [ "$(OBJC_BOEHM_GC)" ]; then \
314 $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libsuffix).la \
315 $(DESTDIR)$(toolexeclibdir);\
317 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
318 @-$(LIBTOOL) --mode=finish $(DESTDIR)$(toolexeclibdir)
320 # Copy Objective-C headers to installation include directory.
321 install-headers:
322 $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc
323 for file in $(OBJC_H); do \
324 realfile=$(srcdir)/objc/$${file}; \
325 $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc; \
326 done
328 check uninstall install-strip dist installcheck installdirs:
330 mostlyclean:
331 -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo
332 -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
333 fflags *.aux *.cp *.dvi *.pdf *.fn *.info *.ky *.log *.pg \
334 *.toc *.tp *.vr *.html libobj.exp
335 @$(MULTICLEAN) multi-clean DO=mostlyclean
337 clean: mostlyclean
338 rm -f config.log
339 @$(MULTICLEAN) multi-clean DO=clean
341 distclean: clean
342 @$(MULTICLEAN) multi-clean DO=distclean
343 rm -f config.cache config.status Makefile configure
345 maintainer-clean realclean: distclean
347 .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
348 install-strip dist installcheck installdirs
350 # Don't export variables to the environment, in order to not confuse
351 # configure.
352 .NOEXPORT: