OSDN Git Service

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