]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/objc/Make-lang.in
* config/mips/mips.h (ENDIAN_SPEC): Output the endianness flag if
[thirdparty/gcc.git] / gcc / objc / Make-lang.in
CommitLineData
629bdb0d 1# Top level makefile fragment for GNU Objective-C
e478ec25 2# Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
629bdb0d 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 file provides the language dependent support in the main Makefile.
22# Each language makefile fragment must provide the following targets:
23#
24# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
25# foo.info, foo.dvi,
26# foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
98fb2ff8 27# foo.uninstall,
629bdb0d 28# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
29# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
30#
31# where `foo' is the name of the language.
32#
33# It should also provide rules for:
34#
35# - making any compiler driver (eg: g++)
36# - the compiler proper (eg: cc1plus)
37# - define the names for selecting the language in LANGUAGES.
629bdb0d 38
05ae2ba4 39#\f
629bdb0d 40# Define the names for selecting Objective-C in LANGUAGES.
c63804f5 41OBJC objc: cc1obj$(exeext)
42OBJECTIVE-C objective-c: cc1obj$(exeext)
629bdb0d 43
44# Tell GNU make to ignore these if they exist.
45.PHONY: objective-c objc ObjC
46
f357ac87 47# Use maximal warnings for this front end.
48objc-warn = $(STRICT_WARN)
49
629bdb0d 50# Language-specific object files for Objective C.
e478ec25 51OBJC_OBJS = objc-lang.o objc-parse.o objc-act.o $(C_AND_OBJC_OBJS)
629bdb0d 52
f357ac87 53cc1obj$(exeext): $(OBJC_OBJS) $(BACKEND) $(LIBDEPS)
0f221fb7 54 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(BACKEND) $(LIBS)
629bdb0d 55
56# Objective C language specific files.
57
e478ec25 58objc-lang.o : $(srcdir)/objc/objc-lang.c \
59 $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(srcdir)/c-tree.h \
60 $(srcdir)/c-common.h $(srcdir)/toplev.h $(srcdir)/objc/objc-act.h \
61 $(srcdir)/langhooks.h $(srcdir)/langhooks-def.h
62 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
63 -c $(srcdir)/objc/objc-lang.c $(OUTPUT_OPTION)
64
3135f5e2 65objc-parse.o : $(srcdir)/objc/objc-parse.c \
dc12af01 66 $(CONFIG_H) $(TREE_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \
72040e7e 67 $(srcdir)/c-lex.h $(srcdir)/c-tree.h $(srcdir)/c-common.h \
68 $(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \
4dfe8b74 69 $(srcdir)/objc/objc-act.h $(SYSTEM_H) $(CPPLIB_H)
629bdb0d 70 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
f357ac87 71 -c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION)
629bdb0d 72
67881e18 73po-generated: $(srcdir)/objc/objc-parse.c
3135f5e2 74$(srcdir)/objc/objc-parse.c : $(srcdir)/objc/objc-parse.y
75 cd $(srcdir)/objc; \
61f52169 76 $(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; \
77 mv -f op$$$$.c objc-parse.c
3135f5e2 78
79$(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in
80 echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y
81 sed -e "/^ifc$$/,/^end ifc$$/d" \
82 -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
83 $(srcdir)/c-parse.in >>tmp-objc-prs.y
84 $(SHELL) $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc/objc-parse.y
629bdb0d 85
76ed4af6 86objc-act.o : $(srcdir)/objc/objc-act.c \
01d15dc5 87 $(CONFIG_H) $(TREE_H) $(RTL_H) $(SYSTEM_H) $(EXPR_H) $(TARGET_H) \
4cfbaf39 88 $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \
72040e7e 89 $(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \
b0278d39 90 $(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/debug.h \
91 $(srcdir)/langhooks.h $(srcdir)/langhooks-def.h
629bdb0d 92 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
76ed4af6 93 -c $(srcdir)/objc/objc-act.c
629bdb0d 94
05ae2ba4 95#\f
629bdb0d 96# Build hooks:
97
98objc.all.build:
99objc.all.cross:
100objc.start.encap:
101objc.rest.encap:
102
103objc.info:
104objc.dvi:
8cc4e5de 105objc.generated-manpages:
629bdb0d 106
05ae2ba4 107#\f
629bdb0d 108# Install hooks:
109# cc1obj is installed elsewhere as part of $(COMPILERS).
110
c63804f5 111objc.install-normal:
629bdb0d 112
113objc.install-common:
114
115objc.install-info:
116
117objc.install-man:
118
119objc.uninstall:
05ae2ba4 120#\f
629bdb0d 121# Clean hooks:
122# A lot of the ancillary files are deleted by the main makefile.
123# We just have to delete files specific to us.
124objc.mostlyclean:
125 -rm -f tmp-objc-prs.y
126 -rm -f objc/*$(objext) objc/xforward objc/fflags
629bdb0d 127objc.clean: objc.mostlyclean
128 -rm -rf objc-headers
129objc.distclean:
130 -rm -f objc/Makefile objc/Make-host objc/Make-target
131 -rm -f objc/config.status objc/config.cache
3135f5e2 132 -rm -f objc-parse.output
629bdb0d 133objc.extraclean:
134objc.maintainer-clean:
f357ac87 135 -rm -f $(srcdir)/objc/objc-parse.y
136 -rm -f $(srcdir)/objc/objc-parse.c $(srcdir)/objc/objc-parse.output
629bdb0d 137
05ae2ba4 138#\f
629bdb0d 139# Stage hooks:
140
b2779d7f 141objc.stage1: stage1-start
629bdb0d 142 -mv objc/*$(objext) stage1/objc
143 -mv cc1obj$(exeext) stage1
b2779d7f 144objc.stage2: stage2-start
629bdb0d 145 -mv objc/*$(objext) stage2/objc
146 -mv cc1obj$(exeext) stage2
b2779d7f 147objc.stage3: stage3-start
629bdb0d 148 -mv objc/*$(objext) stage3/objc
149 -mv cc1obj$(exeext) stage3
b2779d7f 150objc.stage4: stage4-start
629bdb0d 151 -mv objc/*$(objext) stage4/objc
152 -mv cc1obj$(exeext) stage4