1 # GNU Objective C Runtime Makefile
2 # Copyright (C) 1993, 1995, 1996 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 it under the
7 # terms of the GNU General Public License as published by the Free Software
8 # Foundation; either version 2, or (at your option) any later version.
10 # GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 # You should have received a copy of the GNU General Public License along with
16 # GNU CC; see the file COPYING. If not, write to the Free Software
17 # Foundation, 59 Temple Place - Suite 330,
18 # Boston, MA 02111-1307, USA.
20 # This makefile is run by the parent dir's makefile.
22 # srcdir1=`cd $(srcdir); pwd`; \
24 # $(MAKE) $(MAKEFLAGS) -f $$srcdir1/objc/Makefile libobjc.a \
25 # srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
26 # GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
27 # GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$$thisdir1/include
28 # OBJC_THREAD_FILE="$(OBJC_THREAD_FILE)"
29 # Two targets are used by ../Makefile: `all' and `mostlyclean'.
37 VPATH = $(srcdir)/objc
42 # Always search these dirs when compiling.
43 SUBDIR_INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/config
46 $(GCC_FOR_TARGET) $(OPTIMIZE) \
47 -c $(GCC_CFLAGS) $(SUBDIR_INCLUDES) $<
50 $(GCC_FOR_TARGET) $(OPTIMIZE) -fgnu-runtime \
51 -c $(GCC_CFLAGS) $(SUBDIR_INCLUDES) $<
53 # If we were not invoked from the parent dir,
54 # invoke make in the parent dir and have reinvoke this makefile.
55 # That's necessary to get the right values for srcdir, etc.
57 cd ..; $(MAKE) sublibobjc.a
59 OBJC_O = hash.o sarray.o class.o sendmsg.o init.o archive.o encoding.o \
60 selector.o objects.o misc.o NXConstStr.o Object.o Protocol.o \
61 nil_method.o thr.o $(OBJC_THREAD_FILE).o
65 # ranlib is run in the parent directory's makefile.
67 OBJC_H = hash.h objc-list.h sarray.h objc.h \
69 NXConstStr.h Object.h Protocol.h encoding.h typedstream.h thr.h
71 # copy objc headers to installation include directory
73 -rm -fr $(incinstalldir)/objc
74 -mkdir $(incinstalldir)/objc
75 for file in $(OBJC_H); do \
76 realfile=$(srcdir)/objc/$${file}; \
77 cp $${realfile} $(incinstalldir)/objc; \
78 chmod a+r $(incinstalldir)/objc/$${file}; \
82 -rm -f *.o libobjc.a xforward fflags
84 distclean: mostlyclean
85 extraclean: mostlyclean
95 encoding.o: encoding.c
96 selector.o: selector.c
99 NXConstStr.o: NXConstStr.m
101 Protocol.o: Protocol.m
103 $(OBJC_THREAD_FILE).o: $(OBJC_THREAD_FILE).c
104 nil_method.o: nil_method.c