Mark ChangeLog
[official-gcc.git] / libobjc / Makefile.in
blob46e5ce56beeeda7e11725c9f17456552c76980e2
1 # Makefile for GNU Objective C runtime library.
2 # Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
3 # 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 2, 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 COPYING. If not, write to
19 #the Free Software Foundation, 59 Temple Place - Suite 330,
20 #Boston, MA 02111-1307, USA. */
22 #This was cribbed from the libchill, libiberty and libstdc++
23 #Makefile.in files. Some of this stuff may be unnecessary and
24 #worthless.
26 SHELL = @SHELL@
27 MAKEOVERRIDES=
29 #### Start of system configuration section. ####
31 srcdir = @glibcpp_srcdir@
32 VPATH = @glibcpp_srcdir@
33 prefix = @prefix@
34 exec_prefix = @exec_prefix@
35 target_noncanonical = @target_noncanonical@
36 gcc_version = @gcc_version@
37 top_srcdir = @top_srcdir@
38 toplevel_srcdir = @toplevel_srcdir@
39 toolexecdir = @toolexecdir@
40 # Toolexecdir is used only by toolexeclibdir
41 toolexeclibdir = @toolexeclibdir@
43 includedirname = @includedirname@
44 libext = @libext@
46 top_builddir = .
48 libdir = $(exec_prefix)/lib
49 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
51 # Multilib support variables.
52 MULTISRCTOP =
53 MULTIBUILDTOP =
54 MULTIDIRS =
55 MULTISUBDIR =
56 MULTIDO = true
57 MULTICLEAN = true
59 # Not configured per top-level version, since that doesn't get passed
60 # down at configure time, but overrridden by the top-level install
61 # target.
62 INSTALL = @INSTALL@
63 INSTALL_PROGRAM = @INSTALL_PROGRAM@
64 INSTALL_DATA = @INSTALL_DATA@
66 AR = @AR@
67 AR_FLAGS = rc
69 RANLIB = @RANLIB@
71 CC = @CC@
72 CFLAGS = @CFLAGS@
73 WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
74 GTHREAD_FLAGS=@GTHREAD_FLAGS@
75 ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
76 $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing
78 # Libtool
79 # The following strings describe the version of the obj-C library
80 # begin compiled and compatibility issues.
81 # Please refer to Libtool documentation about how to manage these
82 # numbers.
83 LIBOBJC_VERSION = @VERSION@
84 LIBOBJC_GC_VERSION = @VERSION@
85 LIBTOOL = @LIBTOOL@
86 LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
87 LIBTOOL_LINK = $(LIBTOOL) --mode=link
88 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
89 LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
90 #LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
92 INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
93 -I$(srcdir)/$(MULTISRCTOP)../gcc/config -I$(MULTIBUILDTOP)../../gcc \
94 -I$(srcdir)/$(MULTISRCTOP)../include
96 OBJC_GCFLAGS=-DOBJC_WITH_GC=1
97 OBJC_THREAD_FILE=thr-objc
98 OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
100 .SUFFIXES:
101 .SUFFIXES: .c .m .lo
103 .c.lo:
104 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
106 .m.lo:
107 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
109 # Flags to pass to a recursive make.
110 FLAGS_TO_PASS = \
111 "AR=$(AR)" \
112 "AR_FLAGS=$(AR_FLAGS)" \
113 "CC=$(CC)" \
114 "CFLAGS=$(CFLAGS)" \
115 "DESTDIR=$(DESTDIR)" \
116 "LIBCFLAGS=$(LIBCFLAGS)" \
117 "EXTRA_OFILES=$(EXTRA_OFILES)" \
118 "HDEFINES=$(HDEFINES)" \
119 "INSTALL=$(INSTALL)" \
120 "INSTALL_DATA=$(INSTALL_DATA)" \
121 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
122 "LDFLAGS=$(LDFLAGS)" \
123 "LIBTOOL=$(LIBTOOL)" \
124 "LOADLIBES=$(LOADLIBES)" \
125 "PICFLAG=$(PICFLAG)" \
126 "RANLIB=$(RANLIB)" \
127 "SHELL=$(SHELL)" \
128 "prefix=$(prefix)" \
129 "exec_prefix=$(exec_prefix)" \
130 "libdir=$(libdir)" \
131 "libsubdir=$(libsubdir)" \
132 "tooldir=$(tooldir)"
134 all: libobjc$(libext).la $(OBJC_BOEHM_GC)
135 : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
137 # User-visible header files.
139 OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \
140 NXConstStr.h Object.h Protocol.h encoding.h typedstream.h \
141 thr.h objc-decls.h
143 # Modules that comprise the runtime library.
145 OBJS = archive.lo class.lo encoding.lo gc.lo hash.lo init.lo linking.lo \
146 misc.lo nil_method.lo NXConstStr.lo Object.lo objects.lo \
147 Protocol.lo sarray.lo selector.lo sendmsg.lo thr.lo \
148 $(OBJC_THREAD_FILE).lo exception.lo hash_compat.lo
150 OBJS_GC = archive_gc.lo class_gc.lo encoding_gc.lo gc_gc.lo hash_gc.lo \
151 init_gc.lo linking_gc.lo misc_gc.lo nil_method_gc.lo \
152 NXConstStr_gc.lo Object_gc.lo objects_gc.lo Protocol_gc.lo \
153 sarray_gc.lo selector_gc.lo sendmsg_gc.lo thr_gc.lo \
154 $(OBJC_THREAD_FILE)_gc.lo exception_gc.lo hash_compat_gc.lo
156 runtime-info.h:
157 echo "" > tmp-runtime.m
158 echo "/* This file is automatically generated */" > $@
159 $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@
160 rm -f tmp-runtime.m tmp-runtime.s
162 archive_gc.lo: archive.c
163 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
164 $(INCLUDES) $<
166 class_gc.lo: class.c
167 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
168 $(INCLUDES) $<
170 encoding_gc.lo: encoding.c
171 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
172 $(INCLUDES) $<
174 gc.lo: gc.c
175 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
177 gc_gc.lo: gc.c
178 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
179 $(INCLUDES) $<
181 hash_gc.lo: hash.c
182 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
183 $(INCLUDES) $<
185 hash_compat_gc.lo: hash_compat.c
186 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
187 $(INCLUDES) $<
189 init_gc.lo: init.c
190 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
191 $(INCLUDES) $<
193 linking.lo: linking.m
194 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
195 $(INCLUDES) $<
197 linking_gc.lo: linking.m
198 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
199 $(OBJC_GCFLAGS) $(INCLUDES) $<
201 misc_gc.lo: misc.c
202 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
203 $(INCLUDES) $<
205 nil_method_gc.lo: nil_method.c
206 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
207 $(INCLUDES) $<
209 NXConstStr.lo: NXConstStr.m
210 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
211 $(INCLUDES) $<
213 NXConstStr_gc.lo: NXConstStr.m
214 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
215 $(OBJC_GCFLAGS) $(INCLUDES) $<
217 Object.lo: Object.m
218 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
219 $(INCLUDES) $<
221 Object_gc.lo: Object.m
222 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
223 $(OBJC_GCFLAGS) $(INCLUDES) $<
225 objects_gc.lo: objects.c
226 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
227 $(INCLUDES) $<
229 Protocol.lo: Protocol.m
230 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
231 $(INCLUDES) $<
233 Protocol_gc.lo: Protocol.m
234 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
235 $(OBJC_GCFLAGS) $(INCLUDES) $<
237 sarray_gc.lo: sarray.c
238 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
239 $(INCLUDES) $<
241 selector_gc.lo: selector.c
242 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
243 $(INCLUDES) $<
245 sendmsg.lo: sendmsg.c runtime-info.h
246 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
248 sendmsg_gc.lo: sendmsg.c runtime-info.h
249 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
250 $(INCLUDES) $<
252 thr_gc.lo: thr.c
253 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
254 $(INCLUDES) $<
256 $(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD_FILE).c
257 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
258 $(INCLUDES) $<
260 exception.lo: exception.c
261 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) \
262 -fexceptions $(INCLUDES) $<
264 exception_gc.lo: exception.c
265 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
266 -fexceptions $(INCLUDES) $<
268 doc: info dvi html
270 libobjc$(libext).la: $(OBJS)
271 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
272 -rpath $(toolexeclibdir) \
273 -version-info $(LIBOBJC_VERSION)
275 libobjc_gc$(libext).la: $(OBJS_GC)
276 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
277 -rpath $(toolexeclibdir) \
278 -version-info $(LIBOBJC_GC_VERSION)
281 # FIXME -- The following part does not fit in the libtool context.
282 # Libtool is supposed to [going to] be able to create a win 32 DLL
283 # without extra code but since I don't have a win machine to test
284 # if it already works, I leave the old code here.
286 libobjc_s.a: libobjc.la
287 mv libobjc.a libobjc_s.a
289 # Create a relocatable DLL
290 libobjc.dll: libobjc_s.a libobjc_entry.o
291 $(CC) -mdll -Wl,--base-file -Wl,libobjc.base \
292 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
293 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
294 --base-file libobjc.base --output-exp libobjc.exp
295 $(GCC_FOR_TARGET) -mdll -Wl,--base-file libobjc.base libobjc.exp \
296 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
297 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
298 --base-file libobjc.base --output-exp libobjc.exp
299 $(GCC_FOR_TARGET) libobjc.exp -mdll \
300 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
301 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
302 --output-lib libobjc.a
309 info:
310 dvi:
311 html:
313 Makefile: Makefile.in config.status
314 $(SHELL) config.status
316 config.status: configure
317 rm -f config.cache
318 CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
319 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
321 ${srcdir}/configure: @MAINT@ configure.ac
322 rm -f config.cache
323 cd ${srcdir} && autoconf
325 install: install-libs install-headers
327 install-libs: installdirs
328 $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir)
329 $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libext).la $(DESTDIR)$(toolexeclibdir);
330 if [ "$(OBJC_BOEHM_GC)" ]; then \
331 $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libext).la \
332 $(DESTDIR)$(toolexeclibdir);\
334 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
335 @-$(LIBTOOL) --mode=finish $(DESTDIR)$(toolexeclibdir)
337 # Copy Objective C headers to installation include directory.
338 install-headers:
339 $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc
340 for file in $(OBJC_H); do \
341 realfile=$(srcdir)/objc/$${file}; \
342 $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc; \
343 done
345 check uninstall install-strip dist installcheck installdirs:
347 mostlyclean:
348 -$(LIBTOOL_CLEAN) rm -f libobjc$(libext).la libobjc_gc$(libext).la *.lo
349 -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
350 fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \
351 *.toc *.tp *.vr *.html libobj.exp
352 @$(MULTICLEAN) multi-clean DO=mostlyclean
354 clean: mostlyclean
355 rm -f config.log
356 @$(MULTICLEAN) multi-clean DO=clean
358 distclean: clean
359 @$(MULTICLEAN) multi-clean DO=distclean
360 rm -f config.cache config.status Makefile configure
362 maintainer-clean realclean: distclean
364 .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
365 install-strip dist installcheck installdirs
367 # Don't export variables to the environment, in order to not confuse
368 # configure.
369 .NOEXPORT: