111
|
1 # Top level -*- makefile -*- fragment for GNU Objective-C
|
131
|
2 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
111
|
3
|
|
4 #This file is part of GCC.
|
|
5
|
|
6 #GCC 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 3, or (at your option)
|
|
9 #any later version.
|
|
10
|
|
11 #GCC 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 GCC; see the file COPYING3. If not see
|
|
18 # <http://www.gnu.org/licenses/>.
|
|
19
|
|
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.cross, foo.start.encap, foo.rest.encap,
|
|
25 # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
|
|
26 # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
|
|
27 # foo.mostlyclean, foo.clean, foo.distclean,
|
|
28 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
|
|
29 #
|
|
30 # where `foo' is the name of the language.
|
|
31 #
|
|
32 # It should also provide rules for:
|
|
33 #
|
|
34 # - making any compiler driver (eg: g++)
|
|
35 # - the compiler proper (eg: cc1plus)
|
|
36 # - define the names for selecting the language in LANGUAGES.
|
|
37
|
|
38 #
|
|
39 # Define the names for selecting Objective-C in LANGUAGES.
|
|
40 objc: cc1obj$(exeext)
|
|
41
|
|
42 # Tell GNU make to ignore these if they exist.
|
|
43 .PHONY: objc
|
|
44
|
|
45 # Use maximal warnings for this front end.
|
|
46 objc-warn = $(STRICT_WARN)
|
|
47
|
|
48 # Language-specific object files for Objective C.
|
|
49 OBJC_OBJS = objc/objc-lang.o objc/objc-act.o hash-table.o \
|
|
50 objc/objc-runtime-shared-support.o \
|
|
51 objc/objc-gnu-runtime-abi-01.o \
|
|
52 objc/objc-next-runtime-abi-01.o \
|
|
53 objc/objc-next-runtime-abi-02.o \
|
|
54 objc/objc-encoding.o \
|
|
55 objc/objc-map.o
|
|
56
|
|
57 objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o
|
|
58
|
|
59 cc1obj-checksum.c : build/genchecksum$(build_exeext) checksum-options \
|
|
60 $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS)
|
|
61 build/genchecksum$(build_exeext) $(OBJC_OBJS) $(C_AND_OBJC_OBJS) \
|
|
62 $(BACKEND) $(LIBDEPS) checksum-options > cc1obj-checksum.c.tmp && \
|
|
63 $(srcdir)/../move-if-change cc1obj-checksum.c.tmp cc1obj-checksum.c
|
|
64
|
|
65 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS)
|
|
66 +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
|
|
67 $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \
|
|
68 $(BACKEND) $(LIBS) $(BACKENDLIBS)
|
|
69
|
|
70 objc.srcextra:
|
|
71
|
|
72 #
|
|
73 # Build hooks:
|
|
74
|
|
75 objc.all.cross:
|
|
76 objc.start.encap:
|
|
77 objc.rest.encap:
|
|
78 objc.info:
|
|
79 objc.install-info:
|
|
80 objc.dvi:
|
|
81 objc.pdf:
|
|
82 objc.install-pdf:
|
|
83 objc.html:
|
|
84 objc.install-html:
|
|
85 objc.man:
|
|
86 objc.srcinfo:
|
|
87 objc.srcman:
|
|
88 objc.install-plugin:
|
|
89
|
|
90 objc.tags: force
|
|
91 cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \
|
|
92 etags --include TAGS.sub --include ../TAGS.sub
|
|
93
|
|
94 lang_checks += check-objc
|
|
95
|
|
96 # The following allows you to do 'make check-objc -j2'. The
|
|
97 # execute.exp tests will be run in parallel with all the other ones.
|
|
98 lang_checks_parallelized += check-objc
|
|
99 check_objc_parallelize = 6
|
|
100
|
131
|
101 # No objc-c-specific selftests
|
|
102 selftest-objc:
|
|
103
|
111
|
104 #
|
|
105 # Install hooks:
|
|
106 # cc1obj is installed elsewhere as part of $(COMPILERS).
|
|
107
|
|
108 objc.install-common:
|
|
109
|
|
110 objc.install-man:
|
|
111
|
|
112 objc.uninstall:
|
|
113 #
|
|
114 # Clean hooks:
|
|
115 # A lot of the ancillary files are deleted by the main makefile.
|
|
116 # We just have to delete files specific to us.
|
|
117 objc.mostlyclean:
|
|
118 -rm -f objc/*$(objext) objc/xforward objc/fflags
|
|
119 -rm -f objc/*$(coverageexts)
|
|
120 -rm -f cc1obj$(exeext)
|
|
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
|
|
126 objc.maintainer-clean:
|
|
127
|
|
128 #
|
|
129 # Stage hooks:
|
|
130
|
|
131 objc.stage1: stage1-start
|
|
132 -mv objc/*$(objext) stage1/objc
|
|
133 objc.stage2: stage2-start
|
|
134 -mv objc/*$(objext) stage2/objc
|
|
135 objc.stage3: stage3-start
|
|
136 -mv objc/*$(objext) stage3/objc
|
|
137 objc.stage4: stage4-start
|
|
138 -mv objc/*$(objext) stage4/objc
|
|
139 objc.stageprofile: stageprofile-start
|
|
140 -mv objc/*$(objext) stageprofile/objc
|
|
141 objc.stagefeedback: stagefeedback-start
|
|
142 -mv objc/*$(objext) stagefeedback/objc
|