X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libobjc%2FMakefile.in;h=0cd77d37bc1df71a63b549e71f35366d7d5635fe;hb=964cb6aaa9d51e8c633c35b0698e5835aa851514;hp=6d401fe2867b4a79b05cc70254a179435108624c;hpb=fa3ae5be81676aeb969fd1423664fcfece6749d4;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in index 6d401fe2867..0cd77d37bc1 100644 --- a/libobjc/Makefile.in +++ b/libobjc/Makefile.in @@ -1,42 +1,57 @@ -#Makefile for GNU Objective C runtime library. -#Copyright (C) 1993, 95-98, 1999, 2001 Free Software Foundation, Inc. +# Makefile for GNU Objective C runtime library. +# Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -#This file is part of GNU CC. +#This file is part of GCC. -#GNU CC is free software; you can redistribute it and/or modify +#GCC is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2, or (at your option) #any later version. -#GNU CC is distributed in the hope that it will be useful, +#GCC is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License -#along with GNU CC; see the file COPYING. If not, write to -#the Free Software Foundation, 59 Temple Place - Suite 330, -#Boston, MA 02111-1307, USA. */ +#along with GCC; see the file COPYING. If not, write to +#the Free Software Foundation, 51 Franklin Street, Fifth Floor, +#Boston, MA 02110-1301, USA. */ #This was cribbed from the libchill, libiberty and libstdc++ #Makefile.in files. Some of this stuff may be unnecessary and #worthless. -SHELL = /bin/sh +SHELL = @SHELL@ +MAKEOVERRIDES= #### Start of system configuration section. #### -srcdir = @srcdir@ -VPATH = @srcdir@ +srcdir = @glibcpp_srcdir@ +VPATH = @glibcpp_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ -target_alias = @target_alias@ -gcc_version = @gcc_version@ -gcc_version_trigger = @gcc_version_trigger@ +target_noncanonical = @target_noncanonical@ +gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER) +host_subdir = @host_subdir@ +top_srcdir = @top_srcdir@ +multi_basedir = @multi_basedir@ +toolexecdir = @toolexecdir@ +# Toolexecdir is used only by toolexeclibdir +toolexeclibdir = @toolexeclibdir@ + +includedirname = @includedirname@ +libsuffix = @libsuffix@ + +extra_ldflags_libobjc = @extra_ldflags_libobjc@ + +top_builddir = . + +-include ../boehm-gc/threads.mk libdir = $(exec_prefix)/lib -libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) -incinstalldir = $(libsubdir)/include +libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) # Multilib support variables. MULTISRCTOP = @@ -60,40 +75,36 @@ RANLIB = @RANLIB@ CC = @CC@ CFLAGS = @CFLAGS@ -GTHREAD_FLAGS=@GTHREAD_FLAGS@ -ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) \ - $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS +WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes +ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \ + -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions # Libtool # The following strings describe the version of the obj-C library # begin compiled and compatibility issues. # Please refer to Libtool documentation about how to manage these # numbers. -LIBOBJC_VERSION = 1:0:0 -LIBOBJC_GC_VERSION = 1:0:0 -# @LIBTOOL@ does not get it right, so we hack it in - FIXME -LIBTOOL = ./libtool +LIBOBJC_VERSION = @VERSION@ +LIBOBJC_GC_VERSION = @VERSION@ +LIBTOOL = @LIBTOOL@ LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile LIBTOOL_LINK = $(LIBTOOL) --mode=link LIBTOOL_INSTALL = $(LIBTOOL) --mode=install LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean #LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall -# -# Define the cc1obj in terms of the CC that is passed on from higher -# level make. This is needed to make sure we can create runtime-info.h -# when doing canadian cross builds where running ../../gcc/cc1obj -# does not make any sense. -# -CC1OBJ = `$(CC) -print-prog-name=cc1obj` - -INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \ - -I$(srcdir)/$(MULTISRCTOP)../gcc/config -I$(MULTIBUILDTOP)../../gcc \ - -I$(srcdir)/$(MULTISRCTOP)../include - OBJC_GCFLAGS=-DOBJC_WITH_GC=1 OBJC_THREAD_FILE=thr-objc OBJC_BOEHM_GC=@OBJC_BOEHM_GC@ +OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@ +OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags) + +INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \ + -I$(srcdir)/$(MULTISRCTOP)../gcc/config \ + -I$(MULTIBUILDTOP)../../$(host_subdir)/gcc \ + -I$(srcdir)/$(MULTISRCTOP)../include \ + $(OBJC_BOEHM_GC_INCLUDES) + .SUFFIXES: .SUFFIXES: .c .m .lo @@ -110,6 +121,7 @@ FLAGS_TO_PASS = \ "AR_FLAGS=$(AR_FLAGS)" \ "CC=$(CC)" \ "CFLAGS=$(CFLAGS)" \ + "DESTDIR=$(DESTDIR)" \ "LIBCFLAGS=$(LIBCFLAGS)" \ "EXTRA_OFILES=$(EXTRA_OFILES)" \ "HDEFINES=$(HDEFINES)" \ @@ -128,33 +140,33 @@ FLAGS_TO_PASS = \ "libsubdir=$(libsubdir)" \ "tooldir=$(tooldir)" -all: libobjc.la $(OBJC_BOEHM_GC) - $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all +all: libobjc$(libsuffix).la $(OBJC_BOEHM_GC) + : $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all # User-visible header files. OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \ NXConstStr.h Object.h Protocol.h encoding.h typedstream.h \ - thr.h + thr.h objc-decls.h # Modules that comprise the runtime library. OBJS = archive.lo class.lo encoding.lo gc.lo hash.lo init.lo linking.lo \ misc.lo nil_method.lo NXConstStr.lo Object.lo objects.lo \ Protocol.lo sarray.lo selector.lo sendmsg.lo thr.lo \ - $(OBJC_THREAD_FILE).lo + $(OBJC_THREAD_FILE).lo exception.lo OBJS_GC = archive_gc.lo class_gc.lo encoding_gc.lo gc_gc.lo hash_gc.lo \ init_gc.lo linking_gc.lo misc_gc.lo nil_method_gc.lo \ NXConstStr_gc.lo Object_gc.lo objects_gc.lo Protocol_gc.lo \ sarray_gc.lo selector_gc.lo sendmsg_gc.lo thr_gc.lo \ - $(OBJC_THREAD_FILE)_gc.lo + $(OBJC_THREAD_FILE)_gc.lo exception_gc.lo runtime-info.h: - echo "" > tmp-runtime + echo "" > tmp-runtime.m echo "/* This file is automatically generated */" > $@ - $(CC1OBJ) -print-objc-runtime-info tmp-runtime >> $@ - rm -f tmp-runtime + $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@ + rm -f tmp-runtime.m tmp-runtime.s archive_gc.lo: archive.c $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ @@ -250,15 +262,35 @@ $(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD_FILE).c $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ $(INCLUDES) $< -doc: info dvi html +exception.lo: exception.c + $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) \ + -fexceptions $(INCLUDES) $< + +exception_gc.lo: exception.c + $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \ + -fexceptions $(INCLUDES) $< + +doc: info dvi pdf html + +# No install-html or install-pdf support +.PHONY: install-html install-pdf install-info +install-html: +install-pdf: +install-info: -libobjc.la: $(OBJS) - $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) -rpath $(libsubdir) \ - -version-info $(LIBOBJC_VERSION) +LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) -libobjc_gc.la: $(OBJS_GC) - $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) -rpath $(libsubdir) \ - -version-info $(LIBOBJC_GC_VERSION) +libobjc$(libsuffix).la: $(OBJS) + $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \ + -rpath $(toolexeclibdir) \ + -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc) \ + $(LTLDFLAGS) + +libobjc_gc$(libsuffix).la: $(OBJS_GC) + $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) $(OBJC_BOEHM_GC_LIBS) \ + -rpath $(toolexeclibdir) \ + -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \ + $(LTLDFLAGS) # # FIXME -- The following part does not fit in the libtool context. @@ -289,18 +321,10 @@ libobjc.dll: libobjc_s.a libobjc_entry.o # # -info: objc-features.info -dvi: objc-features.dvi -html: objc-features_toc.html - -objc-features.info: $(srcdir)/objc-features.texi - makeinfo -I$(srcdir) $(srcdir)/objc-features.texi - -objc-features.dvi: $(srcdir)/objc-features.texi - TEXINPUTS="$(srcdir):${TEXINTPUTS}" texi2dvi $(srcdir)/objc-features.texi - -objc-features_toc.html: objc-features.texi - texi2html -split_node $(srcdir)/objc-features.texi +info: +dvi: +pdf: +html: Makefile: Makefile.in config.status $(SHELL) config.status @@ -310,36 +334,36 @@ config.status: configure CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \ CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck -${srcdir}/configure: configure.in +${srcdir}/configure: @MAINT@ configure.ac rm -f config.cache cd ${srcdir} && autoconf -install: install-libs copy-headers +install: install-libs install-headers install-libs: installdirs - $(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc.la $(libsubdir)/libobjc.la; + $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir) + $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libsuffix).la $(DESTDIR)$(toolexeclibdir); if [ "$(OBJC_BOEHM_GC)" ]; then \ - $(LIBTOOL_INSTALL) $(INSTALL_DATA) libobjc_gc.la \ - $(libsubdir)/libobjc_gc.la;\ + $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libsuffix).la \ + $(DESTDIR)$(toolexeclibdir);\ fi + $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@" + @-$(LIBTOOL) --mode=finish $(DESTDIR)$(toolexeclibdir) # Copy Objective C headers to installation include directory. -copy-headers: - -rm -rf $(incinstalldir)/objc - -mkdir $(incinstalldir)/objc - -chmod a+rx $(incinstalldir)/objc +install-headers: + $(SHELL) $(multi_basedir)/mkinstalldirs $(DESTDIR)$(libsubdir)/$(includedirname)/objc for file in $(OBJC_H); do \ realfile=$(srcdir)/objc/$${file}; \ - cp $${realfile} $(incinstalldir)/objc; \ - chmod a+r $(incinstalldir)/objc/$${file}; \ + $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/$(includedirname)/objc; \ done check uninstall install-strip dist installcheck installdirs: mostlyclean: - -$(LIBTOOL_CLEAN) rm -f libobjc.la libobjc_gc.la *.lo + -$(LIBTOOL_CLEAN) rm -f libobjc$(libsuffix).la libobjc_gc$(libsuffix).la *.lo -rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \ - fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \ + fflags *.aux *.cp *.dvi *.pdf *.fn *.info *.ky *.log *.pg \ *.toc *.tp *.vr *.html libobj.exp @$(MULTICLEAN) multi-clean DO=mostlyclean @@ -355,3 +379,7 @@ maintainer-clean realclean: distclean .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \ install-strip dist installcheck installdirs + +# Don't export variables to the environment, in order to not confuse +# configure. +.NOEXPORT: