]>
Commit | Line | Data |
---|---|---|
b88c0704 | 1 | # Top level -*- makefile -*- fragment for GNU Objective-C |
27bf414c | 2 | # Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 |
43c6a96a | 3 | # Free Software Foundation, Inc. |
d5d0a377 | 4 | |
b9593599 | 5 | #This file is part of GCC. |
d5d0a377 | 6 | |
b9593599 | 7 | #GCC is free software; you can redistribute it and/or modify |
d5d0a377 RK |
8 | #it under the terms of the GNU General Public License as published by |
9 | #the Free Software Foundation; either version 2, or (at your option) | |
10 | #any later version. | |
11 | ||
b9593599 | 12 | #GCC is distributed in the hope that it will be useful, |
d5d0a377 RK |
13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | #GNU General Public License for more details. | |
16 | ||
17 | #You should have received a copy of the GNU General Public License | |
b9593599 | 18 | #along with GCC; see the file COPYING. If not, write to |
f12c30a8 KC |
19 | #the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
20 | #Boston, MA 02110-1301, USA. | |
d5d0a377 RK |
21 | |
22 | # This file provides the language dependent support in the main Makefile. | |
23 | # Each language makefile fragment must provide the following targets: | |
24 | # | |
bd97af06 | 25 | # foo.all.cross, foo.start.encap, foo.rest.encap, |
b5422ad7 | 26 | # foo.install-common, foo.install-man, foo.install-info, foo.dvi, foo.pdf |
436a88a6 | 27 | # foo.uninstall, |
a03ad584 | 28 | # foo.mostlyclean, foo.clean, foo.distclean, |
d5d0a377 RK |
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. | |
d5d0a377 | 38 | |
416c259a | 39 | #\f |
d5d0a377 | 40 | # Define the names for selecting Objective-C in LANGUAGES. |
9d29a5b7 | 41 | objc: cc1obj$(exeext) |
d5d0a377 RK |
42 | |
43 | # Tell GNU make to ignore these if they exist. | |
9d29a5b7 | 44 | .PHONY: objc |
d5d0a377 | 45 | |
b8dad04b ZW |
46 | # Use maximal warnings for this front end. |
47 | objc-warn = $(STRICT_WARN) | |
48 | ||
d5d0a377 | 49 | # Language-specific object files for Objective C. |
27bf414c | 50 | OBJC_OBJS = objc/objc-lang.o objc/objc-act.o |
d5d0a377 | 51 | |
3fd30b88 | 52 | cc1obj-dummy$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS) |
4977bab6 | 53 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ |
3fd30b88 GK |
54 | $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o \ |
55 | $(BACKEND) $(LIBS) | |
56 | ||
f726bf47 KH |
57 | cc1obj-checksum.c : cc1obj-dummy$(exeext) build/genchecksum$(build_exeext) |
58 | build/genchecksum$(build_exeext) cc1obj-dummy$(exeext) > $@ | |
3fd30b88 GK |
59 | |
60 | cc1obj-checksum.o : cc1obj-checksum.c | |
61 | ||
62 | cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS) | |
63 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ | |
64 | $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \ | |
65 | $(BACKEND) $(LIBS) | |
d5d0a377 RK |
66 | |
67 | # Objective C language specific files. | |
68 | ||
4977bab6 | 69 | objc/objc-lang.o : objc/objc-lang.c \ |
9a4d6480 | 70 | $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ |
39ce81c9 | 71 | $(C_TREE_H) $(DIAGNOSTIC_H) \ |
9a4d6480 | 72 | $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objc.h \ |
48779194 | 73 | c-objc-common.h objc/objc-act.h $(TREE_GIMPLE_H) |
4977bab6 | 74 | |
4977bab6 | 75 | objc/objc-act.o : objc/objc-act.c \ |
3c437d12 | 76 | $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \ |
48779194 VR |
77 | $(EXPR_H) $(TARGET_H) $(C_TREE_H) $(DIAGNOSTIC_H) toplev.h $(FLAGS_H) \ |
78 | objc/objc-act.h input.h $(FUNCTION_H) output.h debug.h langhooks.h \ | |
79 | $(LANGHOOKS_DEF_H) $(HASHTAB_H) $(C_PRAGMA_H) gt-objc-objc-act.h \ | |
80 | $(TREE_GIMPLE_H) | |
d5d0a377 | 81 | |
27bf414c | 82 | objc.srcextra: |
d5d0a377 | 83 | |
416c259a | 84 | #\f |
d5d0a377 RK |
85 | # Build hooks: |
86 | ||
d5d0a377 RK |
87 | objc.all.cross: |
88 | objc.start.encap: | |
89 | objc.rest.encap: | |
a541f69d | 90 | objc.info: |
dedfa466 PB |
91 | objc.install-info: |
92 | objc.dvi: | |
b5422ad7 | 93 | objc.pdf: |
dedfa466 | 94 | objc.html: |
a541f69d KC |
95 | objc.man: |
96 | objc.srcinfo: | |
97 | objc.srcman: | |
d5d0a377 | 98 | |
65ebbf81 | 99 | objc.tags: force |
27bf414c | 100 | cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \ |
7d60db05 | 101 | etags --include TAGS.sub --include ../TAGS.sub |
65ebbf81 | 102 | |
49a41726 JM |
103 | lang_checks += check-objc |
104 | ||
416c259a | 105 | #\f |
d5d0a377 RK |
106 | # Install hooks: |
107 | # cc1obj is installed elsewhere as part of $(COMPILERS). | |
108 | ||
d5d0a377 RK |
109 | objc.install-common: |
110 | ||
d5d0a377 RK |
111 | objc.install-man: |
112 | ||
113 | objc.uninstall: | |
416c259a | 114 | #\f |
d5d0a377 RK |
115 | # Clean hooks: |
116 | # A lot of the ancillary files are deleted by the main makefile. | |
117 | # We just have to delete files specific to us. | |
118 | objc.mostlyclean: | |
d5d0a377 | 119 | -rm -f objc/*$(objext) objc/xforward objc/fflags |
22aa533e | 120 | -rm -f objc/*$(coverageexts) |
d5d0a377 RK |
121 | objc.clean: objc.mostlyclean |
122 | -rm -rf objc-headers | |
123 | objc.distclean: | |
124 | -rm -f objc/Makefile objc/Make-host objc/Make-target | |
125 | -rm -f objc/config.status objc/config.cache | |
d5d0a377 | 126 | objc.maintainer-clean: |
d5d0a377 | 127 | |
416c259a | 128 | #\f |
d5d0a377 RK |
129 | # Stage hooks: |
130 | ||
963f4057 | 131 | objc.stage1: stage1-start |
d5d0a377 | 132 | -mv objc/*$(objext) stage1/objc |
963f4057 | 133 | objc.stage2: stage2-start |
d5d0a377 | 134 | -mv objc/*$(objext) stage2/objc |
963f4057 | 135 | objc.stage3: stage3-start |
d5d0a377 | 136 | -mv objc/*$(objext) stage3/objc |
963f4057 | 137 | objc.stage4: stage4-start |
d5d0a377 | 138 | -mv objc/*$(objext) stage4/objc |
8f231b5d JH |
139 | objc.stageprofile: stageprofile-start |
140 | -mv objc/*$(objext) stageprofile/objc | |
8f231b5d JH |
141 | objc.stagefeedback: stagefeedback-start |
142 | -mv objc/*$(objext) stagefeedback/objc |