* integrate.h (struct inline_remap): Add leaf_reg_map table.
[official-gcc.git] / libobjc / Makefile.in
blob9c21b0c13764abeba2d2491b62bbbe37bda4f039
1 #Makefile for GNU Objective C runtime library.
2 #Copyright (C) 1993, 95-98, 1999, 2001 Free Software Foundation, Inc.
4 #This file is part of GNU CC.
6 #GNU CC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
9 #any later version.
11 #GNU CC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GNU CC; see the file COPYING. If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330,
19 #Boston, MA 02111-1307, USA. */
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 = /bin/sh
27 #### Start of system configuration section. ####
29 srcdir = @srcdir@
30 VPATH = @srcdir@
31 prefix = @prefix@
32 exec_prefix = @exec_prefix@
33 target_alias = @target_alias@
34 gcc_version = @gcc_version@
35 gcc_version_trigger = @gcc_version_trigger@
37 libdir = $(exec_prefix)/lib
38 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
39 incinstalldir = $(libsubdir)/include
41 # Multilib support variables.
42 MULTISRCTOP =
43 MULTIBUILDTOP =
44 MULTIDIRS =
45 MULTISUBDIR =
46 MULTIDO = true
47 MULTICLEAN = true
49 # Not configured per top-level version, since that doesn't get passed
50 # down at configure time, but overrridden by the top-level install
51 # target.
52 INSTALL = @INSTALL@
53 INSTALL_PROGRAM = @INSTALL_PROGRAM@
54 INSTALL_DATA = @INSTALL_DATA@
56 AR = @AR@
57 AR_FLAGS = rc
59 RANLIB = @RANLIB@
61 CC = @CC@
62 CFLAGS = @CFLAGS@
63 GTHREAD_FLAGS=@GTHREAD_FLAGS@
64 ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) \
65 $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS
67 # Libtool
68 # The following strings describe the version of the obj-C library
69 # begin compiled and compatibility issues.
70 # Please refer to Libtool documentation about how to manage these
71 # numbers.
72 LIBOBJC_VERSION = 1:0:0
73 LIBOBJC_GC_VERSION = 1:0:0
74 # @LIBTOOL@ does not get it right, so we hack it in - FIXME
75 LIBTOOL = ./libtool
76 LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
77 LIBTOOL_LINK = $(LIBTOOL) --mode=link
78 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
79 LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
80 #LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
83 # Define the cc1obj in terms of the CC that is passed on from higher
84 # level make. This is needed to make sure we can create runtime-info.h
85 # when doing canadian cross builds where running ../../gcc/cc1obj
86 # does not make any sense.
88 CC1OBJ = `$(CC) -print-prog-name=cc1obj`
90 INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
91 -I$(srcdir)/$(MULTISRCTOP)../gcc/config -I$(MULTIBUILDTOP)../../gcc \
92 -I$(srcdir)/$(MULTISRCTOP)../include
94 OBJC_GCFLAGS=-DOBJC_WITH_GC=1
95 OBJC_THREAD_FILE=thr-objc
96 OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
98 .SUFFIXES:
99 .SUFFIXES: .c .m .lo
101 .c.lo:
102 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
104 .m.lo:
105 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
107 # Flags to pass to a recursive make.
108 FLAGS_TO_PASS = \
109 "AR=$(AR)" \
110 "AR_FLAGS=$(AR_FLAGS)" \
111 "CC=$(CC)" \
112 "CFLAGS=$(CFLAGS)" \
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)" \
120 "LIBTOOL=$(LIBTOOL)" \
121 "LOADLIBES=$(LOADLIBES)" \
122 "PICFLAG=$(PICFLAG)" \
123 "RANLIB=$(RANLIB)" \
124 "SHELL=$(SHELL)" \
125 "prefix=$(prefix)" \
126 "exec_prefix=$(exec_prefix)" \
127 "libdir=$(libdir)" \
128 "libsubdir=$(libsubdir)" \
129 "tooldir=$(tooldir)"
131 all: libobjc.la $(OBJC_BOEHM_GC)
132 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
134 # User-visible header files.
136 OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \
137 NXConstStr.h Object.h Protocol.h encoding.h typedstream.h \
138 thr.h
140 # Modules that comprise the runtime library.
142 OBJS = 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
147 OBJS_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
153 runtime-info.h:
154 echo "" > tmp-runtime
155 echo "/* This file is automatically generated */" > $@
156 $(CC1OBJ) -print-objc-runtime-info tmp-runtime >> $@
157 rm -f tmp-runtime
159 archive_gc.lo: archive.c
160 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
161 $(INCLUDES) $<
163 class_gc.lo: class.c
164 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
165 $(INCLUDES) $<
167 encoding_gc.lo: encoding.c
168 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
169 $(INCLUDES) $<
171 gc.lo: gc.c
172 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
174 gc_gc.lo: gc.c
175 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
176 $(INCLUDES) $<
178 hash_gc.lo: hash.c
179 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
180 $(INCLUDES) $<
182 init_gc.lo: init.c
183 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
184 $(INCLUDES) $<
186 linking.lo: linking.m
187 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
188 $(INCLUDES) $<
190 linking_gc.lo: linking.m
191 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
192 $(OBJC_GCFLAGS) $(INCLUDES) $<
194 misc_gc.lo: misc.c
195 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
196 $(INCLUDES) $<
198 nil_method_gc.lo: nil_method.c
199 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
200 $(INCLUDES) $<
202 NXConstStr.lo: NXConstStr.m
203 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
204 $(INCLUDES) $<
206 NXConstStr_gc.lo: NXConstStr.m
207 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
208 $(OBJC_GCFLAGS) $(INCLUDES) $<
210 Object.lo: Object.m
211 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
212 $(INCLUDES) $<
214 Object_gc.lo: Object.m
215 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
216 $(OBJC_GCFLAGS) $(INCLUDES) $<
218 objects_gc.lo: objects.c
219 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
220 $(INCLUDES) $<
222 Protocol.lo: Protocol.m
223 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
224 $(INCLUDES) $<
226 Protocol_gc.lo: Protocol.m
227 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
228 $(OBJC_GCFLAGS) $(INCLUDES) $<
230 sarray_gc.lo: sarray.c
231 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
232 $(INCLUDES) $<
234 selector_gc.lo: selector.c
235 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
236 $(INCLUDES) $<
238 sendmsg.lo: sendmsg.c runtime-info.h
239 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
241 sendmsg_gc.lo: sendmsg.c runtime-info.h
242 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
243 $(INCLUDES) $<
245 thr_gc.lo: thr.c
246 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
247 $(INCLUDES) $<
249 $(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD_FILE).c
250 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
251 $(INCLUDES) $<
253 doc: info dvi html
255 libobjc.la: $(OBJS)
256 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) -rpath $(libsubdir) \
257 -version-info $(LIBOBJC_VERSION)
259 libobjc_gc.la: $(OBJS_GC)
260 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) -rpath $(libsubdir) \
261 -version-info $(LIBOBJC_GC_VERSION)
264 # FIXME -- The following part does not fit in the libtool context.
265 # Libtool is supposed to [going to] be able to create a win 32 DLL
266 # without extra code but since I don't have a win machine to test
267 # if it already works, I leave the old code here.
269 libobjc_s.a: libobjc.la
270 mv libobjc.a libobjc_s.a
272 # Create a relocatable DLL
273 libobjc.dll: libobjc_s.a libobjc_entry.o
274 $(CC) -mdll -Wl,--base-file -Wl,libobjc.base \
275 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
276 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
277 --base-file libobjc.base --output-exp libobjc.exp
278 $(GCC_FOR_TARGET) -mdll -Wl,--base-file libobjc.base libobjc.exp \
279 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
280 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
281 --base-file libobjc.base --output-exp libobjc.exp
282 $(GCC_FOR_TARGET) libobjc.exp -mdll \
283 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
284 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
285 --output-lib libobjc.a
292 info: objc-features.info
293 dvi: objc-features.dvi
294 html: objc-features_toc.html
296 objc-features.info: $(srcdir)/objc-features.texi
297 makeinfo -I$(srcdir) $(srcdir)/objc-features.texi
299 objc-features.dvi: $(srcdir)/objc-features.texi
300 TEXINPUTS="$(srcdir):${TEXINPUTS}" texi2dvi $(srcdir)/objc-features.texi
302 objc-features_toc.html: objc-features.texi
303 texi2html -split_node $(srcdir)/objc-features.texi
305 Makefile: Makefile.in config.status
306 $(SHELL) config.status
308 config.status: configure
309 rm -f config.cache
310 CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
311 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
313 ${srcdir}/configure: configure.in
314 rm -f config.cache
315 cd ${srcdir} && autoconf
317 install: install-libs copy-headers
319 install-libs: installdirs
320 $(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc.la $(libsubdir)/libobjc.la;
321 if [ "$(OBJC_BOEHM_GC)" ]; then \
322 $(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc_gc.la \
323 $(libsubdir)/libobjc_gc.la;\
326 # Copy Objective C headers to installation include directory.
327 copy-headers:
328 -rm -rf $(incinstalldir)/objc
329 -mkdir $(incinstalldir)/objc
330 -chmod a+rx $(incinstalldir)/objc
331 for file in $(OBJC_H); do \
332 realfile=$(srcdir)/objc/$${file}; \
333 cp $${realfile} $(incinstalldir)/objc; \
334 chmod a+r $(incinstalldir)/objc/$${file}; \
335 done
337 check uninstall install-strip dist installcheck installdirs:
339 mostlyclean:
340 -$(LIBTOOL_CLEAN) rm -f libobjc.la libobjc_gc.la *.lo
341 -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
342 fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \
343 *.toc *.tp *.vr *.html libobj.exp
344 @$(MULTICLEAN) multi-clean DO=mostlyclean
346 clean: mostlyclean
347 rm -f config.log
348 @$(MULTICLEAN) multi-clean DO=clean
350 distclean: clean
351 @$(MULTICLEAN) multi-clean DO=distclean
352 rm -f config.cache config.status Makefile configure
354 maintainer-clean realclean: distclean
356 .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
357 install-strip dist installcheck installdirs