OSDN Git Service

NXConstantString renamed to NXConstStr.
[pf3gnuchains/gcc-fork.git] / gcc / objc / Makefile.in
1 #  GNU Objective C Runtime Makefile
2 #  Copyright (C) 1993, 1995 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 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.
9 #
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
13 #  details.
14 #
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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
18
19 #  This makefile is run by the parent dir's makefile.
20 #  thisdir1=`pwd`; \
21 #  srcdir1=`cd $(srcdir); pwd`; \
22 #  cd objc; \
23 #  $(MAKE) $(MAKEFLAGS) -f $$srcdir1/objc/Makefile libobjc.a \
24 #    srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
25 #    GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
26 #    GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$$thisdir1/include
27 #  Two targets are used by ../Makefile: `all' and `mostlyclean'.
28
29 SHELL=sh
30
31 .SUFFIXES: .m
32
33 OPTIMIZE= -O
34
35 VPATH = $(srcdir)/objc
36
37 AR = ar
38 AR_FLAGS = rc
39
40 # Always search these dirs when compiling.
41 SUBDIR_INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/config
42
43 .c.o:
44         $(GCC_FOR_TARGET) $(OPTIMIZE) \
45                 -c $(GCC_CFLAGS) $(SUBDIR_INCLUDES) $<
46
47 .m.o:
48         $(GCC_FOR_TARGET) $(OPTIMIZE) -fgnu-runtime \
49                 -c $(GCC_CFLAGS) $(SUBDIR_INCLUDES) $<
50
51 # If we were not invoked from the parent dir,
52 # invoke make in the parent dir and have reinvoke this makefile.
53 # That's necessary to get the right values for srcdir, etc.
54 all:
55         cd ..; $(MAKE) sublibobjc.a
56
57 OBJC_O = hash.o sarray.o class.o sendmsg.o init.o archive.o encoding.o \
58          selector.o objects.o misc.o NXConstStr.o Object.o Protocol.o
59
60 libobjc.a: $(OBJC_O)
61         -rm -f libobjc.a
62         $(AR) rc libobjc.a $(OBJC_O)
63 # ranlib is run in the parent directory's makefile.
64
65 OBJC_H = hash.h list.h sarray.h objc.h \
66          objc-api.h \
67          NXConstStr.h Object.h Protocol.h encoding.h typedstream.h
68
69 # copy objc headers to installation include directory
70 copy-headers: 
71         -rm -fr $(incinstalldir)/objc
72         -mkdir $(incinstalldir)/objc
73         for file in $(OBJC_H); do \
74           realfile=$(srcdir)/objc/$${file}; \
75           cp $${realfile} $(incinstalldir)/objc; \
76           chmod a+r $(incinstalldir)/objc/$${file}; \
77         done
78
79 mostlyclean:
80         -rm -f *.o libobjc.a xforward fflags
81 clean: mostlyclean
82 distclean: mostlyclean
83 extraclean: mostlyclean
84
85 # For Sun VPATH.
86
87 hash.o: hash.c
88 sarray.o: sarray.c
89 class.o: class.c
90 sendmsg.o: sendmsg.c
91 init.o: init.c
92 archive.o: archive.c
93 encoding.o: encoding.c
94 selector.o: selector.c
95 objects.o: objects.c
96 misc.o: misc.c
97 NXConstStr.o: NXConstStr.m
98 Object.o: Object.m
99 Protocol.o: Protocol.m