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