Commit bce1b489 by Ben Elliston Committed by Jeff Law

Makefile.in: Rewrite.

        * Makefile.in: Rewrite.
        * configure.in: Likewise.
        * configure: Regenerate.
        * All .c files.  Remove "objc" prefix when including objc header
        files.  Include tconfig.h, not ../tconfig.h.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r22659
parent 6fc19d6d
1998-09-30 Ben Elliston <bje@cygnus.com>
Jeff Law <law@cygnus.com>
* Makefile.in: Rewrite.
* configure.in: Likewise.
* configure: Regenerate.
* All .c files. Remove "objc" prefix when including objc header
files. Include tconfig.h, not ../tconfig.h.
Mon Sep 21 23:27:10 1998 Ovidiu Predescu <ovidiu@slip.net>
* encoding.c (TREE_TYPE, ARRAY_TYPE): Define.
......
#Makefile for GNU Objective C runtime library.
#Copyright (C) 1993, 95-97, 1998 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC 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,
#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, 675 Mass Ave, Cambridge, MA 02139, 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
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
target_alias = @target_alias@
gcc_version = @gcc_version@
gcc_version_trigger = @gcc_version_trigger@
libdir = $(exec_prefix)/lib
libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
incinstalldir = $(libsubdir)/include
# Multilib support variables.
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
# Not configured per top-level version, since that doesn't get passed
# down at configure time, but overrridden by the top-level install
# target.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
AR_FLAGS = rc
RANLIB = @RANLIB@
CC = @CC@
CFLAGS = @CFLAGS@
ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS)
INCLUDES = -I$(srcdir)/objc -I$(srcdir)/../gcc/config -I../../gcc
OBJC_GCFLAGS=-DOBJC_WITH_GC=1
OBJC_THREAD_FILE=thr-@OBJC_THREAD_FILE@
.SUFFIXES:
.SUFFIXES: .c .m .o
.c.o:
$(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
.m.o:
$(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
all: libobjc.a @OBJC_BOEHM_GC@
$(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
# Modules that comprise the runtime library.
OBJS = archive.o class.o encoding.o gc.o hash.o init.o linking.o \
misc.o nil_method.o NXConstStr.o Object.o objects.o \
Protocol.o sarray.o selector.o sendmsg.o thr.o \
$(OBJC_THREAD_FILE).o
OBJS_GC = archive_gc.o class_gc.o encoding_gc.o gc_gc.o hash_gc.o \
init_gc.o linking_gc.o misc_gc.o nil_method_gc.o \
NXConstStr_gc.o Object_gc.o objects_gc.o Protocol_gc.o \
sarray_gc.o selector_gc.o sendmsg_gc.o thr_gc.o \
$(OBJC_THREAD_FILE)_gc.o
runtime-info.h: ../../gcc/cc1obj
echo "" > tmp-runtime
echo "/* This file is automatically generated */" > $@
$< -print-objc-runtime-info tmp-runtime >> $@
rm -f tmp-runtime
archive_gc.o: archive.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
class_gc.o: class.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
encoding_gc.o: encoding.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
gc.o: gc.c
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
gc_gc.o: gc.c
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
$(INCLUDES) $<
hash_gc.o: hash.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
init_gc.o: init.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
linking.o: linking.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
linking_gc.o: linking.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
$(INCLUDES) $<
misc_gc.o: misc.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
nil_method_gc.o: nil_method.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
NXConstStr.o: NXConstStr.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
NXConstStr_gc.o: NXConstStr.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
$(INCLUDES) $<
Object.o: Object.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
Object_gc.o: Object.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
$(INCLUDES) $<
objects_gc.o: objects.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
Protocol.o: Protocol.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
Protocol_gc.o: Protocol.m
$(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
$(INCLUDES) $<
sarray_gc.o: sarray.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
selector_gc.o: selector.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
sendmsg.o: sendmsg.c runtime-info.h
$(CC) -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
sendmsg_gc.o: sendmsg.c runtime-info.h
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
thr_gc.o: thr.c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
$(OBJC_THREAD_FILE)_gc.o: $(OBJC_THREAD_FILE).c
$(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
doc: info dvi html
libobjc.a: $(OBJS)
$(AR) $(AR_FLAGS) $@ $(OBJS)
$(RANLIB) $@
libobjc_gc.a: $(OBJS_GC)
$(AR) $(AR_FLAGS) $@ $(OBJS_GC)
$(RANLIB) $@
libobjc_s.a: libobjc.a
mv libobjc.a libobjc_s.a
# Create a relocatable DLL
libobjc.dll: libobjc_s.a libobjc_entry.o
$(CC) -mdll -Wl,--base-file -Wl,libobjc.base \
-o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
$(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
--base-file libobjc.base --output-exp libobjc.exp
$(GCC_FOR_TARGET) -mdll -Wl,--base-file libobjc.base libobjc.exp \
-o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
$(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
--base-file libobjc.base --output-exp libobjc.exp
$(GCC_FOR_TARGET) libobjc.exp -mdll \
-o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
$(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
--output-lib libobjc.a
info: objc-features.info
dvi: objc-features.dvi
html: objc-features_toc.html
objc-features.info: $(srcdir)/objc-features.texi
makeinfo $(srcdir)/objc-features.texi
objc-features.dvi: $(srcdir)/objc-features.texi
texi2dvi $(srcdir)/objc-features.texi
objc-features_toc.html: objc-features.texi
texi2html -split_node $(srcdir)/objc-features.texi
Makefile: Makefile.in config.status
$(SHELL) config.status
config.status: configure
rm -f config.cache
CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
${srcdir}/configure: configure.in
rm -f config.cache
cd ${srcdir} && autoconf
install: install-libs copy-headers
install-libs: installdirs
-if test -f libobjc.a ; then \
rm -f $(libsubdir)/libobjc.a; \
$(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
chmod a-x $(libsubdir)/libobjc.a; \
else true; fi
-if test -f libobjc_gc.a ; then \
rm -f $(libsubdir)/libobjc_gc.a; \
$(INSTALL_DATA) libobjc_gc.a $(libsubdir)/libobjc_gc.a; \
chmod a-x $(libsubdir)/libobjc_gc.a; \
else true; fi
-if test -f libobjc_s.a ; then \
rm -f $(libsubdir)/libobjc_s.a; \
$(INSTALL_DATA) libobjc_s.a $(libsubdir)/libobjc_s.a; \
chmod a-x $(libsubdir)/libobjc_s.a; \
else true; fi
-if test -f libobjc.dll ; then \
rm -f $(bindir)/libobjc.dll; \
$(INSTALL_DATA) libobjc.dll $(bindir)/libobjc.dll; \
else true; fi
# Copy Objective C headers to installation include directory.
copy-headers:
-rm -rf $(incinstalldir)/objc
-mkdir $(incinstalldir)/objc
for file in $(OBJC_H); do \
realfile=$(srcdir)/$${file}; \
cp $${realfile} $(incinstalldir)/objc; \
chmod a+r $(incinstalldir)/objc/$${file}; \
done
check uninstall install-strip dist installcheck installdirs:
mostlyclean:
-rm -f runtime-info.h tmp-runtime.s *.o libobjc* xforward \
fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \
*.toc *.tp *.vr *.html libobj.exp
@$(MULTICLEAN) multi-clean DO=mostlyclean
clean: mostlyclean
rm -f config.log
@$(MULTICLEAN) multi-clean DO=clean
distclean: clean
@$(MULTICLEAN) multi-clean DO=distclean
rm -f config.cache config.status Makefile configure
maintainer-clean realclean: distclean
.PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
install-strip dist installcheck installdirs
# Process this file with autoconf to produce a configure script.
# Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
# Contributed by Dave Love (d.love@dl.ac.uk).
#
#This file is part of GNU Objective C.
#
#GNU Objective C 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 Objective C 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 Objective C; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.
AC_INIT(objc.h)
#AC_CONFIG_HEADER(config.h)
if test "${srcdir}" = "." ; then
if test "${with_target_subdir}" != "." ; then
topsrcdir=${with_multisrctop}../..
else
topsrcdir=${with_multisrctop}..
fi
else
topsrcdir=${srcdir}/..
fi
dnl Checks for programs.
# For ObjC we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
test "$AR" || AR=ar
AC_SUBST(AR)
if test "$RANLIB"; then :
AC_SUBST(RANLIB)
else
AC_PROG_RANLIB
fi
AC_PROG_INSTALL
dnl Checks for libraries.
dnl Checks for header files.
# Sanity check for the cross-compilation case:
AC_CHECK_HEADER(stdio.h,:,
[AC_MSG_ERROR([Can't find stdio.h.
You must have a usable C system for the target already installed, at least
including headers and, preferably, the library, before you can configure
the Objective C runtime system. If necessary, install gcc now with
\`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'.])])
AC_HEADER_STDC
# Determine the name of the GCC thread file.
AC_CACHE_CHECK([for thread file],objc_cv_thread_file,
[if test -f ../../gcc/Makefile
then
objc_cv_thread_file=`grep ^GCC_THREAD_FILE ../../gcc/Makefile | awk -F= '{ print $2 }'`
else
AC_MSG_ERROR([not found])
fi])
OBJC_THREAD_FILE=$objc_cv_thread_file
AC_SUBST(OBJC_THREAD_FILE)
AC_ARG_ENABLE(objc-gc,
[ --enable-objc-gc enable the use of Boehm's garbage collector with
the GNU Objective-C runtime.],
if [[[ x$enable_objc_gc = xno ]]]; then
OBJC_BOEHM_GC=''
else
OBJC_BOEHM_GC=libobjc_gc.a
fi,
OBJC_BOEHM_GC='')
AC_SUBST(OBJC_BOEHM_GC)
# We need multilib support, but only if configuring for the target.
AC_OUTPUT(Makefile,
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
if test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
. ${topsrcdir}/config-ml.in
fi
fi],
srcdir=${srcdir}
host=${host}
target=${target}
with_target_subdir=${with_target_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
topsrcdir=${topsrcdir}
)
dnl Local Variables:
dnl comment-start: "dnl "
dnl comment-end: ""
dnl comment-start-skip: "\\bdnl\\b\\s *"
dnl End:
......@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "../tconfig.h"
#include "tconfig.h"
#include "objc.h"
#include "encoding.h"
......
......@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "assert.h"
#include "objc/hash.h"
#include "hash.h"
#include "runtime.h" /* for DEBUG_PRINTF */
......
......@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
however invalidate any other reasons why the executable file might be
covered by the GNU General Public License. */
#include "../tconfig.h" /* include defs of bzero for target */
#include "tconfig.h" /* include defs of bzero for target */
#include "objc.h"
#include "runtime.h" /* the kitchen sink */
......
......@@ -24,8 +24,8 @@ Boston, MA 02111-1307, USA. */
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "objc/sarray.h"
#include "objc/runtime.h"
#include "sarray.h"
#include "runtime.h"
#include <stdio.h>
#include "assert.h"
......
......@@ -24,7 +24,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
covered by the GNU General Public License. */
#include "runtime.h"
#include "objc/sarray.h"
#include "sarray.h"
#include "encoding.h"
/* Initial selector hash table size. Value doesn't matter much */
......
......@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
however invalidate any other reasons why the executable file might be
covered by the GNU General Public License. */
#include "../tconfig.h"
#include "tconfig.h"
#include "runtime.h"
#include "sarray.h"
#include "encoding.h"
......
......@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
covered by the GNU General Public License. */
#include <pthread.h>
#include <objc/thr.h>
#include <thr.h>
#include "runtime.h"
/* Key structure for maintaining thread specific storage */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment