source: trunk/src/gcc/libobjc/Makefile.in@ 1036

Last change on this file since 1036 was 64, checked in by bird, 22 years ago

OS/2 workaround for the parallel build workaround ': $(MAKE) ; $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do'.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 10.6 KB
Line 
1#Makefile for GNU Objective C runtime library.
2#Copyright (C) 1993, 95-98, 1999, 2001 Free Software Foundation, Inc.
3
4#This file is part of GNU CC.
5
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.
10
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.
15
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. */
20
21#This was cribbed from the libchill, libiberty and libstdc++
22#Makefile.in files. Some of this stuff may be unnecessary and
23#worthless.
24
25SHELL = /bin/sh
26MAKEOVERRIDES=
27
28#### Start of system configuration section. ####
29
30srcdir = @glibcpp_srcdir@
31VPATH = @glibcpp_srcdir@
32prefix = @prefix@
33exec_prefix = @exec_prefix@
34target_alias = @target_alias@
35gcc_version = @gcc_version@
36gcc_version_trigger = @gcc_version_trigger@
37top_srcdir = @top_srcdir@
38toplevel_srcdir = @toplevel_srcdir@
39toolexecdir = @glibcpp_toolexecdir@
40glibcpp_toolexecdir = @glibcpp_toolexecdir@
41glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
42
43top_builddir = .
44
45libdir = $(exec_prefix)/lib
46libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
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@
70GTHREAD_FLAGS=@GTHREAD_FLAGS@
71ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) \
72 $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS
73
74# Libtool
75# The following strings describe the version of the obj-C library
76# begin compiled and compatibility issues.
77# Please refer to Libtool documentation about how to manage these
78# numbers.
79LIBOBJC_VERSION = 1:0:0
80LIBOBJC_GC_VERSION = 1:0:0
81# @LIBTOOL@ does not get it right, so we hack it in - FIXME
82LIBTOOL = ./libtool
83LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
84LIBTOOL_LINK = $(LIBTOOL) --mode=link
85LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
86LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
87#LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
88
89#
90# Define the cc1obj in terms of the CC that is passed on from higher
91# level make. This is needed to make sure we can create runtime-info.h
92# when doing canadian cross builds where running ../../gcc/cc1obj
93# does not make any sense.
94#
95CC1OBJ = `$(CC) -print-prog-name=cc1obj`
96
97INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
98 -I$(srcdir)/$(MULTISRCTOP)../gcc/config -I$(MULTIBUILDTOP)../../gcc \
99 -I$(srcdir)/$(MULTISRCTOP)../include
100
101OBJC_GCFLAGS=-DOBJC_WITH_GC=1
102OBJC_THREAD_FILE=thr-objc
103OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
104
105.SUFFIXES:
106.SUFFIXES: .c .m .lo
107
108.c.lo:
109 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
110
111.m.lo:
112 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
113
114# Flags to pass to a recursive make.
115FLAGS_TO_PASS = \
116 "AR=$(AR)" \
117 "AR_FLAGS=$(AR_FLAGS)" \
118 "CC=$(CC)" \
119 "CFLAGS=$(CFLAGS)" \
120 "DESTDIR=$(DESTDIR)" \
121 "LIBCFLAGS=$(LIBCFLAGS)" \
122 "EXTRA_OFILES=$(EXTRA_OFILES)" \
123 "HDEFINES=$(HDEFINES)" \
124 "INSTALL=$(INSTALL)" \
125 "INSTALL_DATA=$(INSTALL_DATA)" \
126 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
127 "LDFLAGS=$(LDFLAGS)" \
128 "LIBTOOL=$(LIBTOOL)" \
129 "LOADLIBES=$(LOADLIBES)" \
130 "PICFLAG=$(PICFLAG)" \
131 "RANLIB=$(RANLIB)" \
132 "SHELL=$(SHELL)" \
133 "prefix=$(prefix)" \
134 "exec_prefix=$(exec_prefix)" \
135 "libdir=$(libdir)" \
136 "libsubdir=$(libsubdir)" \
137 "tooldir=$(tooldir)"
138
139all: libobjc.la $(OBJC_BOEHM_GC)
140ifeq "$(BUILD_PLATFORM)" "OS2"
141 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
142else
143 : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
144endif
145
146# User-visible header files.
147
148OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \
149 NXConstStr.h Object.h Protocol.h encoding.h typedstream.h \
150 thr.h
151
152# Modules that comprise the runtime library.
153
154OBJS = archive.lo class.lo encoding.lo gc.lo hash.lo init.lo linking.lo \
155 misc.lo nil_method.lo NXConstStr.lo Object.lo objects.lo \
156 Protocol.lo sarray.lo selector.lo sendmsg.lo thr.lo \
157 $(OBJC_THREAD_FILE).lo
158
159OBJS_GC = archive_gc.lo class_gc.lo encoding_gc.lo gc_gc.lo hash_gc.lo \
160 init_gc.lo linking_gc.lo misc_gc.lo nil_method_gc.lo \
161 NXConstStr_gc.lo Object_gc.lo objects_gc.lo Protocol_gc.lo \
162 sarray_gc.lo selector_gc.lo sendmsg_gc.lo thr_gc.lo \
163 $(OBJC_THREAD_FILE)_gc.lo
164
165runtime-info.h:
166 echo "" > tmp-runtime
167 echo "/* This file is automatically generated */" > $@
168 $(CC1OBJ) -print-objc-runtime-info tmp-runtime >> $@
169 rm -f tmp-runtime
170
171archive_gc.lo: archive.c
172 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
173 $(INCLUDES) $<
174
175class_gc.lo: class.c
176 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
177 $(INCLUDES) $<
178
179encoding_gc.lo: encoding.c
180 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
181 $(INCLUDES) $<
182
183gc.lo: gc.c
184 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
185
186gc_gc.lo: gc.c
187 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
188 $(INCLUDES) $<
189
190hash_gc.lo: hash.c
191 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
192 $(INCLUDES) $<
193
194init_gc.lo: init.c
195 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
196 $(INCLUDES) $<
197
198linking.lo: linking.m
199 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
200 $(INCLUDES) $<
201
202linking_gc.lo: linking.m
203 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
204 $(OBJC_GCFLAGS) $(INCLUDES) $<
205
206misc_gc.lo: misc.c
207 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
208 $(INCLUDES) $<
209
210nil_method_gc.lo: nil_method.c
211 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
212 $(INCLUDES) $<
213
214NXConstStr.lo: NXConstStr.m
215 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
216 $(INCLUDES) $<
217
218NXConstStr_gc.lo: NXConstStr.m
219 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
220 $(OBJC_GCFLAGS) $(INCLUDES) $<
221
222Object.lo: Object.m
223 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
224 $(INCLUDES) $<
225
226Object_gc.lo: Object.m
227 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
228 $(OBJC_GCFLAGS) $(INCLUDES) $<
229
230objects_gc.lo: objects.c
231 $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
232 $(INCLUDES) $<
233
234Protocol.lo: Protocol.m
235 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
236 $(INCLUDES) $<
237
238Protocol_gc.lo: Protocol.m
239 $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
240 $(OBJC_GCFLAGS) $(INCLUDES) $<
241
242sarray_gc.lo: sarray.c
243 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
244 $(INCLUDES) $<
245
246selector_gc.lo: selector.c
247 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
248 $(INCLUDES) $<
249
250sendmsg.lo: sendmsg.c runtime-info.h
251 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
252
253sendmsg_gc.lo: sendmsg.c runtime-info.h
254 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
255 $(INCLUDES) $<
256
257thr_gc.lo: thr.c
258 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
259 $(INCLUDES) $<
260
261$(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD_FILE).c
262 $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
263 $(INCLUDES) $<
264
265doc: info dvi html
266
267libobjc.la: $(OBJS)
268 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
269 -rpath $(glibcpp_toolexeclibdir) \
270 -version-info $(LIBOBJC_VERSION)
271
272libobjc_gc.la: $(OBJS_GC)
273 $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
274 -rpath $(glibcpp_toolexeclibdir) \
275 -version-info $(LIBOBJC_GC_VERSION)
276
277#
278# FIXME -- The following part does not fit in the libtool context.
279# Libtool is supposed to [going to] be able to create a win 32 DLL
280# without extra code but since I don't have a win machine to test
281# if it already works, I leave the old code here.
282#
283libobjc_s.a: libobjc.la
284 mv libobjc.a libobjc_s.a
285
286# Create a relocatable DLL
287libobjc.dll: libobjc_s.a libobjc_entry.o
288 $(CC) -mdll -Wl,--base-file -Wl,libobjc.base \
289 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
290 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
291 --base-file libobjc.base --output-exp libobjc.exp
292 $(GCC_FOR_TARGET) -mdll -Wl,--base-file libobjc.base libobjc.exp \
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) libobjc.exp -mdll \
297 -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
298 $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
299 --output-lib libobjc.a
300#
301#
302#
303#
304#
305
306info:
307dvi:
308html:
309
310Makefile: Makefile.in config.status
311 $(SHELL) config.status
312
313config.status: configure
314 rm -f config.cache
315 CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
316 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
317
318${srcdir}/configure: configure.in
319 rm -f config.cache
320 cd ${srcdir} && autoconf
321
322install: install-libs install-headers
323
324install-libs: installdirs
325 $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(glibcpp_toolexeclibdir)
326 $(LIBTOOL_INSTALL) $(INSTALL) libobjc.la $(DESTDIR)$(glibcpp_toolexeclibdir);
327 if [ "$(OBJC_BOEHM_GC)" ]; then \
328 $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc.la \
329 $(DESTDIR)$(glibcpp_toolexeclibdir);\
330 fi
331 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
332 @-$(LIBTOOL) --mode=finish $(DESTDIR)$(glibcpp_toolexeclibdir)
333
334# Copy Objective C headers to installation include directory.
335install-headers:
336 $(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(libsubdir)/include/objc
337 for file in $(OBJC_H); do \
338 realfile=$(srcdir)/objc/$${file}; \
339 $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/include/objc; \
340 done
341
342check uninstall install-strip dist installcheck installdirs:
343
344mostlyclean:
345 -$(LIBTOOL_CLEAN) rm -f libobjc.la libobjc_gc.la *.lo
346 -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
347 fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \
348 *.toc *.tp *.vr *.html libobj.exp
349 @$(MULTICLEAN) multi-clean DO=mostlyclean
350
351clean: mostlyclean
352 rm -f config.log
353 @$(MULTICLEAN) multi-clean DO=clean
354
355distclean: clean
356 @$(MULTICLEAN) multi-clean DO=distclean
357 rm -f config.cache config.status Makefile configure
358
359maintainer-clean realclean: distclean
360
361.PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
362 install-strip dist installcheck installdirs
Note: See TracBrowser for help on using the repository browser.