| 1 |
# Top level -*- makefile -*- fragment for GNU M2. |
| 2 |
|
| 3 |
# Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 4 |
|
| 5 |
#This file is part of GCC. |
| 6 |
|
| 7 |
#GCC is free software; you can redistribute it and/or modify |
| 8 |
#it under the terms of the GNU General Public License as published by |
| 9 |
#the Free Software Foundation; either version 3, or (at your option) |
| 10 |
#any later version. |
| 11 |
|
| 12 |
#GCC is distributed in the hope that it will be useful, |
| 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 |
| 18 |
#along with GCC; see the file COPYING3. If not see |
| 19 |
#<http://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
# Actual names to use when installing a native compiler. |
| 22 |
GM2_INSTALL_NAME = $(shell echo gm2|sed '$(program_transform_name)') |
| 23 |
GM2_TARGET_INSTALL_NAME = $(target_noncanonical)-$(shell echo gm2|sed '$(program_transform_name)') |
| 24 |
|
| 25 |
# Actual names to use when installing a cross-compiler. |
| 26 |
GM2_CROSS_NAME = `echo gm2|sed '$(program_transform_cross_name)'` |
| 27 |
|
| 28 |
M2_MAINTAINER = no |
| 29 |
|
| 30 |
# CM2DEP must match the COMPILE and POSTCOMPILE defines in gcc/Make-lang.in |
| 31 |
ifeq ($(CXXDEPMODE),depmode=gcc3) |
| 32 |
CM2DEP=-MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo |
| 33 |
else |
| 34 |
CM2DEP= |
| 35 |
endif |
| 36 |
|
| 37 |
GM2_1 = ./gm2 -B./m2/stage1 -g -fm2-g $(CM2DEP) |
| 38 |
|
| 39 |
GM2_FOR_TARGET = $(STAGE_CC_WRAPPER) ./gm2 -B./ -B$(build_tooldir)/bin/ -L$(objdir)/../ld $(TFLAGS) |
| 40 |
|
| 41 |
# FIXME: Get from gcc-plugin.m4 instead of hardcoding. |
| 42 |
ifeq (,$(findstring darwin,$(host))) |
| 43 |
soext=.so |
| 44 |
else |
| 45 |
soext=.dylib |
| 46 |
PLUGINLDFLAGS = -Wl,-undefined,dynamic_lookup |
| 47 |
PLUGINLDFLAGS += -Wl,-install_name,m2rte$(soext) |
| 48 |
PLUGINLDFLAGS += -nodefaultlibs |
| 49 |
PLUGINLDFLAGS += -lc |
| 50 |
endif |
| 51 |
|
| 52 |
TEXISRC = $(srcdir)/doc/gm2.texi \ |
| 53 |
m2/gm2-libs.texi \ |
| 54 |
m2/gm2-ebnf.texi \ |
| 55 |
m2/SYSTEM-pim.texi \ |
| 56 |
m2/SYSTEM-iso.texi \ |
| 57 |
m2/Builtins.texi \ |
| 58 |
m2/gpl_v3_without_node.texi |
| 59 |
|
| 60 |
RSTSRC = $(srcdir)/doc/gm2.texi \ |
| 61 |
m2/gm2-libs.rst \ |
| 62 |
m2/gm2-ebnf.rst \ |
| 63 |
m2/SYSTEM-pim.rst \ |
| 64 |
m2/SYSTEM-iso.rst \ |
| 65 |
m2/Builtins.rst |
| 66 |
|
| 67 |
# Define the names for selecting modula-2 in LANGUAGES. |
| 68 |
m2 modula-2 modula2: gm2$(exeext) xgcc$(exeext) cc1gm2$(exeext) $(GCC_PASSES) |
| 69 |
m2.serial = cc1gm2$(exeext) |
| 70 |
|
| 71 |
m2.tags: force |
| 72 |
cd $(srcdir)/m2; $(ETAGS) -o TAGS.sub \ |
| 73 |
*.cc *.h gm2-gcc/*.cc gm2-gcc/*.h \ |
| 74 |
gm2-libs-ch/*.h gm2-libs-ch/*.c gm2-libs-ch/*.cc; \ |
| 75 |
$(ETAGS) --include TAGS.sub --include ../TAGS.sub |
| 76 |
|
| 77 |
m2.srcinfo: doc/m2.info |
| 78 |
-cp -p $^ $(srcdir)/doc |
| 79 |
|
| 80 |
ifeq ($(HAVE_PYTHON),yes) |
| 81 |
m2.srcextra: m2/SYSTEM-pim.texi m2/SYSTEM-iso.texi m2/gm2-libs.texi m2/gm2-ebnf.texi |
| 82 |
-cp -p m2/SYSTEM-pim.texi $(srcdir)/m2 |
| 83 |
-cp -p m2/SYSTEM-iso.texi $(srcdir)/m2 |
| 84 |
-cp -p m2/gm2-libs.texi $(srcdir)/m2 |
| 85 |
-cp -p m2/gm2-ebnf.texi $(srcdir)/m2 |
| 86 |
else |
| 87 |
m2.srcextra: |
| 88 |
endif |
| 89 |
|
| 90 |
m2.srcman: doc/gm2.1 |
| 91 |
-cp -p $^ $(srcdir)/doc |
| 92 |
|
| 93 |
# Tell GNU make to ignore these if they exist. |
| 94 |
.PHONY: m2 modula-2 modula2 |
| 95 |
|
| 96 |
GM2_PROG_DEP=gm2$(exeext) xgcc$(exeext) cc1gm2$(exeext) |
| 97 |
|
| 98 |
include m2/config-make |
| 99 |
|
| 100 |
LIBSTDCXX=../$(TARGET_SUBDIR)/libstdc++-v3/src/.libs/libstdc++.a |
| 101 |
|
| 102 |
PGE=m2/pge$(exeext) |
| 103 |
|
| 104 |
SRC_PREFIX=G |
| 105 |
|
| 106 |
ifeq ($(enable_plugin),yes) |
| 107 |
M2RTE_PLUGIN_SO=plugin/m2rte$(soext) |
| 108 |
endif |
| 109 |
|
| 110 |
m2/gm2spec.o: $(srcdir)/m2/gm2spec.cc $(SYSTEM_H) $(GCC_H) $(CONFIG_H) \ |
| 111 |
m2/gm2config.h $(TARGET_H) $(PLUGIN_HEADERS) \ |
| 112 |
$(generated_files) $(C_TREE_H) insn-attr-common.h |
| 113 |
(SHLIB_LINK='$(SHLIB_LINK)' \ |
| 114 |
SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ |
| 115 |
$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
| 116 |
$(DRIVER_DEFINES) \ |
| 117 |
-DLIBSUBDIR=\"$(libsubdir)\" \ |
| 118 |
-DPREFIX=\"$(prefix)\" \ |
| 119 |
-c $(srcdir)/m2/gm2spec.cc $(OUTPUT_OPTION)) |
| 120 |
|
| 121 |
# Create the compiler driver for M2. |
| 122 |
CFLAGS-m2/m2/gm2spec.o += $(DRIVER_DEFINES) |
| 123 |
|
| 124 |
GM2_OBJS = $(GCC_OBJS) prefix.o intl.o m2/gm2spec.o |
| 125 |
|
| 126 |
# Create the compiler driver for gm2. |
| 127 |
gm2$(exeext): $(GM2_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a $(LIBDEPS) \ |
| 128 |
m2/gm2config.h |
| 129 |
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ |
| 130 |
$(GM2_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a \ |
| 131 |
$(EXTRA_GCC_LIBS) $(LIBS) |
| 132 |
|
| 133 |
# Create a version of the gm2 driver which calls the cross-compiler. |
| 134 |
gm2-cross$(exeext): gm2$(exeext) |
| 135 |
-rm -f gm2-cross$(exeext) |
| 136 |
cp gm2$(exeext) gm2-cross$(exeext) |
| 137 |
|
| 138 |
po-generated: |
| 139 |
|
| 140 |
# Build hooks: |
| 141 |
|
| 142 |
m2.all.cross: gm2-cross$(exeext) $(M2RTE_PLUGIN_SO) |
| 143 |
|
| 144 |
m2.start.encap: gm2$(exeext) $(M2RTE_PLUGIN_SO) |
| 145 |
m2.rest.encap: |
| 146 |
|
| 147 |
|
| 148 |
m2.info: doc/m2.info |
| 149 |
|
| 150 |
m2.man: doc/m2.1 |
| 151 |
|
| 152 |
m2.install-man: $(DESTDIR)$(man1dir)/$(GM2_INSTALL_NAME)$(man1ext) |
| 153 |
|
| 154 |
$(DESTDIR)$(man1dir)/$(GM2_INSTALL_NAME)$(man1ext): doc/m2.1 installdirs |
| 155 |
-rm -f $@ |
| 156 |
-$(INSTALL_DATA) $< $@ |
| 157 |
-chmod a-x $@ |
| 158 |
|
| 159 |
m2.dvi: doc/m2.dvi |
| 160 |
|
| 161 |
doc/m2.dvi: $(TEXISRC) $(objdir)/m2/images/gnu.eps |
| 162 |
$(TEXI2DVI) -c -I $(objdir)/m2 -I $(srcdir)/doc/include -o $@ $(srcdir)/doc/gm2.texi |
| 163 |
|
| 164 |
M2_DVIFILES = doc/m2.dvi |
| 165 |
|
| 166 |
m2.install-dvi: $(M2_DVIFILES) |
| 167 |
@$(NORMAL_INSTALL) |
| 168 |
test -z "$(dvidir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(dvidir)/gcc" |
| 169 |
@list='$(M2_DVIFILES)'; for p in $$list; do \ |
| 170 |
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ |
| 171 |
f=$(dvi__strip_dir) \ |
| 172 |
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/gcc/$$f'"; \ |
| 173 |
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/gcc/$$f"; \ |
| 174 |
done |
| 175 |
|
| 176 |
doc/m2.ps: doc/m2.dvi |
| 177 |
dvips -o $@ $< |
| 178 |
|
| 179 |
m2.pdf: doc/m2.pdf |
| 180 |
|
| 181 |
doc/m2.pdf: $(TEXISRC) $(objdir)/m2/images/gnu.eps |
| 182 |
$(TEXI2PDF) -I $(objdir)/m2 -I $(srcdir)/doc/include \ |
| 183 |
$(srcdir)/doc/gm2.texi -o $@ |
| 184 |
|
| 185 |
M2_PDFFILES = doc/m2.pdf |
| 186 |
|
| 187 |
m2.install-pdf: $(M2_PDFFILES) |
| 188 |
@$(NORMAL_INSTALL) |
| 189 |
test -z "$(pdfdir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc" |
| 190 |
@list='$(M2_PDFFILES)'; for p in $$list; do \ |
| 191 |
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ |
| 192 |
f=$(pdf__strip_dir) \ |
| 193 |
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \ |
| 194 |
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \ |
| 195 |
done |
| 196 |
|
| 197 |
.INTERMEDIATE: m2.pod |
| 198 |
|
| 199 |
m2.pod: $(TEXISRC) $(objdir)/m2/images/gnu.eps |
| 200 |
-$(TEXI2POD) -I $(objdir)/m2 -D m2 < $< > $@ |
| 201 |
|
| 202 |
doc/m2.info: $(TEXISRC) $(objdir)/m2/images/gnu.eps |
| 203 |
if test "x$(BUILD_INFO)" = xinfo; then \ |
| 204 |
rm -f doc/m2.info*; \ |
| 205 |
$(MAKEINFO) -I$(objdir)/m2 -I$(srcdir)/doc/include \ |
| 206 |
-o $@ $(srcdir)/doc/gm2.texi ; \ |
| 207 |
else true; fi |
| 208 |
|
| 209 |
$(objdir)/m2/images/gnu.eps: $(srcdir)/m2/images/gnupng |
| 210 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 211 |
cp $(srcdir)/m2/images/gnu.eps $@ |
| 212 |
|
| 213 |
m2.html: $(build_htmldir)/m2/index.html |
| 214 |
|
| 215 |
$(build_htmldir)/m2/index.html: $(TEXISRC) $(objdir)/m2/images/gnu.eps |
| 216 |
$(mkinstalldirs) $(@D) |
| 217 |
rm -f $(@D)/* |
| 218 |
$(TEXI2HTML) -I $(objdir)/m2 -I $(srcdir)/m2 -I $(gcc_docdir)/include -o $(@D) $< |
| 219 |
|
| 220 |
M2_HTMLFILES = $(build_htmldir)/m2 |
| 221 |
|
| 222 |
m2.install-html: $(M2_HTMLFILES) |
| 223 |
@$(NORMAL_INSTALL) |
| 224 |
test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)" |
| 225 |
@list='$(M2_HTMLFILES)'; for p in $$list; do \ |
| 226 |
if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \ |
| 227 |
f=$(html__strip_dir) \ |
| 228 |
if test -d "$$d$$p"; then \ |
| 229 |
echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \ |
| 230 |
$(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ |
| 231 |
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ |
| 232 |
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ |
| 233 |
else \ |
| 234 |
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ |
| 235 |
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ |
| 236 |
fi; \ |
| 237 |
done |
| 238 |
|
| 239 |
# gm2-libs.texi |
| 240 |
|
| 241 |
m2/gm2-libs.texi: gm2-libs.texi-check; @true |
| 242 |
|
| 243 |
ifeq ($(HAVE_PYTHON),yes) |
| 244 |
gm2-libs.texi-check: m2/SYSTEM-pim.texi m2/SYSTEM-iso.texi m2/Builtins.texi \ |
| 245 |
$(objdir)/m2/gm2-libs-coroutines/SYSTEM.def |
| 246 |
-test -d m2/gm2-libs-log || $(mkinstalldirs) m2/gm2-libs-log |
| 247 |
-test -d m2/gm2-libs-iso || $(mkinstalldirs) m2/gm2-libs-iso |
| 248 |
-test -d m2/gm2-libs || $(mkinstalldirs) m2/gm2-libs |
| 249 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -t -uLibraries -s$(srcdir)/m2 -b$(objdir)/m2 -o $(objdir)/m2/gm2-libs.texi |
| 250 |
else |
| 251 |
gm2-libs.texi-check: |
| 252 |
cp $(srcdir)/m2/target-independent/m2/gm2-libs.texi $(objdir)/m2/gm2-libs.texi |
| 253 |
endif |
| 254 |
$(STAMP) gm2-libs.texi-check |
| 255 |
|
| 256 |
# gm2-libs.rst |
| 257 |
|
| 258 |
m2/gm2-libs.rst: gm2-libs.rst-check; @true |
| 259 |
|
| 260 |
ifeq ($(HAVE_PYTHON),yes) |
| 261 |
gm2-libs.rst-check: m2/SYSTEM-pim.texi m2/SYSTEM-iso.texi m2/Builtins.texi \ |
| 262 |
$(objdir)/m2/gm2-libs-coroutines/SYSTEM.def |
| 263 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -x -uLibraries -s$(srcdir)/m2 -b$(objdir)/m2 -o $(objdir)/m2/gm2-libs.rst |
| 264 |
else |
| 265 |
gm2-libs.rst-check: |
| 266 |
cp $(srcdir)/m2/target-independent/m2/gm2-libs.rst $(objdir)/m2/gm2-libs.rst |
| 267 |
endif |
| 268 |
$(STAMP) gm2-libs.rst-check |
| 269 |
|
| 270 |
# gm2-ebnf.texi |
| 271 |
|
| 272 |
m2/gm2-ebnf.texi: gm2-ebnf.texi-check; @true |
| 273 |
|
| 274 |
gm2-ebnf.texi-check: $(PGE) $(srcdir)/m2/gm2-compiler/P0SyntaxCheck.bnf |
| 275 |
$(PGE) -c -p -t -f $(srcdir)/m2/gm2-compiler/P0SyntaxCheck.bnf -o m2/gm2-ebnf.texi |
| 276 |
$(STAMP) gm2-ebnf.texi-check |
| 277 |
|
| 278 |
# gm2-ebnf.rst |
| 279 |
|
| 280 |
m2/gm2-ebnf.rst: gm2-ebnf.rst-check; @true |
| 281 |
|
| 282 |
gm2-ebnf.rst-check: $(PGE) $(srcdir)/m2/gm2-compiler/P0SyntaxCheck.bnf |
| 283 |
$(PGE) -c -p -t -f $(srcdir)/m2/gm2-compiler/P0SyntaxCheck.bnf -o m2/gm2-ebnf.rst |
| 284 |
$(STAMP) gm2-ebnf.rst-check |
| 285 |
|
| 286 |
# SYSTEM-pim.texi |
| 287 |
|
| 288 |
m2/SYSTEM-pim.texi: SYSTEM-pim-texi-check; @true |
| 289 |
|
| 290 |
ifeq ($(HAVE_PYTHON),yes) |
| 291 |
SYSTEM-pim-texi-check: $(objdir)/m2/gm2-libs/SYSTEM.def |
| 292 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -t -b$(objdir)/m2 -f$(objdir)/m2/gm2-libs/SYSTEM.def -o $(objdir)/m2/SYSTEM-pim.texi |
| 293 |
else |
| 294 |
SYSTEM-pim-texi-check: $(objdir)/m2/gm2-libs/SYSTEM.def |
| 295 |
cp $(srcdir)/m2/target-independent/m2/SYSTEM-pim.texi $(objdir)/m2/SYSTEM-pim.texi |
| 296 |
endif |
| 297 |
$(STAMP) SYSTEM-pim-texi-check |
| 298 |
|
| 299 |
# SYSTEM-pim.rst |
| 300 |
|
| 301 |
m2/SYSTEM-pim.rst: SYSTEM-pim-rst-check; @true |
| 302 |
|
| 303 |
ifeq ($(HAVE_PYTHON),yes) |
| 304 |
SYSTEM-pim-rst-check: $(objdir)/m2/gm2-libs/SYSTEM.def |
| 305 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -x -b$(objdir)/m2 -f$(objdir)/m2/gm2-libs/SYSTEM.def -o $(objdir)/m2/SYSTEM-pim.rst |
| 306 |
else |
| 307 |
SYSTEM-pim-rst-check: $(objdir)/m2/gm2-libs/SYSTEM.def |
| 308 |
cp $(srcdir)/m2/target-independent/m2/SYSTEM-pim.rst $(objdir)/m2/SYSTEM-pim.rst |
| 309 |
endif |
| 310 |
$(STAMP) SYSTEM-pim-rst-check |
| 311 |
|
| 312 |
# SYSTEM-pim.texi |
| 313 |
|
| 314 |
m2/SYSTEM-iso.texi: SYSTEM-iso.texi-check; @true |
| 315 |
|
| 316 |
ifeq ($(HAVE_PYTHON),yes) |
| 317 |
SYSTEM-iso.texi-check: $(objdir)/m2/gm2-libs-iso/SYSTEM.def |
| 318 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -t -b$(objdir)/m2 -f$(objdir)/m2/gm2-libs-iso/SYSTEM.def -o $(objdir)/m2/SYSTEM-iso.texi |
| 319 |
else |
| 320 |
SYSTEM-iso.texi-check: $(objdir)/m2/gm2-libs-iso/SYSTEM.def |
| 321 |
cp $(srcdir)/m2/target-independent/m2/SYSTEM-iso.texi $(objdir)/m2/SYSTEM-iso.texi |
| 322 |
endif |
| 323 |
$(STAMP) SYSTEM-iso.texi-check |
| 324 |
|
| 325 |
# SYSTEM-pim.rst |
| 326 |
|
| 327 |
m2/SYSTEM-iso.rst: SYSTEM-iso.rst-check; @true |
| 328 |
|
| 329 |
ifeq ($(HAVE_PYTHON),yes) |
| 330 |
SYSTEM-iso.rst-check: $(objdir)/m2/gm2-libs-iso/SYSTEM.def |
| 331 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -x -b$(objdir)/m2 -f$(objdir)/m2/gm2-libs-iso/SYSTEM.def -o $(objdir)/m2/SYSTEM-iso.rst |
| 332 |
else |
| 333 |
SYSTEM-iso.rst-check: $(objdir)/m2/gm2-libs-iso/SYSTEM.def |
| 334 |
cp $(srcdir)/m2/target-independent/m2/SYSTEM-iso.rst $(objdir)/m2/SYSTEM-iso.rst |
| 335 |
endif |
| 336 |
$(STAMP) SYSTEM-iso.rst-check |
| 337 |
|
| 338 |
|
| 339 |
# m2/Builtins.texi |
| 340 |
|
| 341 |
m2/Builtins.texi: Builtins.texi-check; @true |
| 342 |
|
| 343 |
ifeq ($(HAVE_PYTHON),yes) |
| 344 |
Builtins.texi-check: m2/gm2-libs/Builtins.def |
| 345 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -t -b./ -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(objdir)/m2/Builtins.texi |
| 346 |
else |
| 347 |
Builtins.texi-check: m2/gm2-libs/Builtins.def |
| 348 |
cp $(srcdir)/m2/target-independent/m2/Builtins.texi $(objdir)/m2/Builtins.texi |
| 349 |
endif |
| 350 |
$(STAMP) Builtins.texi-check |
| 351 |
|
| 352 |
# m2/Builtins.rst |
| 353 |
|
| 354 |
m2/Builtins.rst: Builtins.rst-check; @true |
| 355 |
|
| 356 |
ifeq ($(HAVE_PYTHON),yes) |
| 357 |
Builtins.rst-check: m2/gm2-libs/Builtins.def |
| 358 |
$(PYTHON) $(srcdir)/m2/tools-src/def2doc.py -x -b./ -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(objdir)/m2/Builtins.rst |
| 359 |
else |
| 360 |
Builtins.rst-check: m2/gm2-libs/Builtins.def |
| 361 |
cp $(srcdir)/m2/target-independent/m2/Builtins.rst $(objdir)/m2/Builtins.rst |
| 362 |
endif |
| 363 |
$(STAMP) Builtins.rst-check |
| 364 |
|
| 365 |
m2/gpl_v3_without_node.texi: doc/include/gpl_v3.texi |
| 366 |
grep -v "^@node" $< > $@ |
| 367 |
|
| 368 |
# Stage hooks: |
| 369 |
# The toplevel makefile has already created stage?/m2 at this point. |
| 370 |
|
| 371 |
m2.stage1: stage1-start |
| 372 |
-mv m2/*$(objext) stage1/m2 |
| 373 |
m2.stage2: stage2-start |
| 374 |
-mv m2/*$(objext) stage2/m2 |
| 375 |
m2.stage3: stage3-start |
| 376 |
-mv m2/*$(objext) stage3/m2 |
| 377 |
m2.stage4: stage4-start |
| 378 |
-mv m2/*$(objext) stage4/m2 |
| 379 |
m2.stageprofile: stageprofile-start |
| 380 |
-mv m2/*$(objext) stageprofile/m2 |
| 381 |
m2.stagefeedback: stageprofile-start |
| 382 |
-mv m2/*$(objext) stagefeedback/m2 |
| 383 |
|
| 384 |
# No gm2-specific selftests |
| 385 |
selftest-m2: |
| 386 |
|
| 387 |
# Install hooks: |
| 388 |
# cc1gm2 is installed elsewhere as part of $(COMPILERS). |
| 389 |
# $(COMPILERS) is defined in `config-lang.in' |
| 390 |
|
| 391 |
m2.install-common: installdirs |
| 392 |
-rm -f $(DESTDIR)$(bindir)/$(GM2_INSTALL_NAME)$(exeext) |
| 393 |
$(INSTALL_PROGRAM) gm2$(exeext) $(DESTDIR)$(bindir)/$(GM2_INSTALL_NAME)$(exeext) |
| 394 |
-if test -f cc1gm2$(exeext); then \ |
| 395 |
if test -f gm2-cross$(exeext); then \ |
| 396 |
:; \ |
| 397 |
else \ |
| 398 |
rm -f $(DESTDIR)$(bindir)/$(GM2_TARGET_INSTALL_NAME)$(exeext); \ |
| 399 |
( cd $(DESTDIR)$(bindir) && \ |
| 400 |
$(LN) $(GM2_INSTALL_NAME)$(exeext) $(GM2_TARGET_INSTALL_NAME)$(exeext) ); \ |
| 401 |
fi; \ |
| 402 |
fi |
| 403 |
-for tool in cc1gm2$(exeext); do \ |
| 404 |
if [ -f $$tool ]; then \ |
| 405 |
rm -f $(DESTDIR)$(libexecsubdir)/$$tool; \ |
| 406 |
$(INSTALL_PROGRAM) $$tool $(DESTDIR)$(libexecsubdir)/$$tool; \ |
| 407 |
chmod a+x $(DESTDIR)$(libexecsubdir)/$$tool; \ |
| 408 |
else \ |
| 409 |
echo "cannot find $$tool" ; \ |
| 410 |
fi ; \ |
| 411 |
done |
| 412 |
|
| 413 |
m2.install-info: installdirs |
| 414 |
if [ -f gm2$(exeext) ] ; then \ |
| 415 |
if [ -f $(objdir)/doc/m2.info ]; then \ |
| 416 |
rm -f $(DESTDIR)$(infodir)/m2.info*; \ |
| 417 |
for f in $(objdir)/doc/m2.info*; do \ |
| 418 |
realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ |
| 419 |
rm -f $(DESTDIR)$(infodir)/`basename $$realfile`; \ |
| 420 |
$(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/`basename $$realfile`; \ |
| 421 |
done; \ |
| 422 |
chmod a-x $(DESTDIR)$(infodir)/m2.info*; \ |
| 423 |
else true; fi; \ |
| 424 |
else true; fi |
| 425 |
-if [ -f gm2$(exeext) ] && [ -f $(DESTDIR)$(infodir)/m2.info ]; then \ |
| 426 |
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ |
| 427 |
install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/m2.info; \ |
| 428 |
else true; fi; \ |
| 429 |
else true; fi |
| 430 |
|
| 431 |
m2.install-normal: m2.install-common m2.install-info m2.install-man |
| 432 |
|
| 433 |
# This target will install GM2 into an existing GCC installation, |
| 434 |
# without overwriting existing files. |
| 435 |
# The semicolon is to prevent the install.sh -> install default rule |
| 436 |
# from doing anything. Having it run true helps avoid problems and |
| 437 |
# noise from versions of make which don't like to have null commands. |
| 438 |
m2.install: m2.install-normal; @true |
| 439 |
|
| 440 |
gm2.install-with-gcc: $(INSTALL_HEADERS) gm2.install $(INSTALL_LIBGCC) |
| 441 |
for file in $(GCC_PASSES); do \ |
| 442 |
if [ x"$$file" != x"xgcc$(exeext)" ]; then \ |
| 443 |
rm -f $(DESTDIR)$(libsubdir)/$$file; \ |
| 444 |
$(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file || exit 1; \ |
| 445 |
fi; \ |
| 446 |
done; exit 0 |
| 447 |
|
| 448 |
m2.uninstall: |
| 449 |
-rm -rf $(bindir)/$(GM2_INSTALL_NAME) |
| 450 |
-rm -rf $(bindir)/$(GM2_CROSS_NAME) |
| 451 |
|
| 452 |
ifeq ($(enable_plugin),yes) |
| 453 |
m2.install-plugin: installdirs |
| 454 |
$(mkinstalldirs) $(DESTDIR)$(plugin_resourcesdir) |
| 455 |
$(INSTALL_PROGRAM) $(M2RTE_PLUGIN_SO) $(DESTDIR)$(plugin_resourcesdir)/m2rte$(soext) |
| 456 |
chmod a+x $(DESTDIR)$(plugin_resourcesdir)/m2rte$(soext) |
| 457 |
|
| 458 |
override PLUGINCFLAGS := $(filter-out -mdynamic-no-pic,$(PLUGINCFLAGS)) |
| 459 |
|
| 460 |
plugin/m2rte$(soext): $(srcdir)/m2/plugin/m2rte.cc $(GCC_HEADER_DEPENDENCIES_FOR_M2) \ |
| 461 |
insn-attr-common.h insn-flags.h $(generated_files) |
| 462 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 463 |
$(PLUGINCC) $(PLUGINCFLAGS) -fno-rtti -I. -I$(srcdir) $(INCINTL) -I$(srcdir)/m2 -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/../include -I$(srcdir)/../libcpp/include -Wall $(GMPINC) -Wno-literal-suffix -fPIC -c -o plugin/m2rte.o $(srcdir)/m2/plugin/m2rte.cc |
| 464 |
$(PLUGINCC) $(PLUGINCFLAGS) $(PLUGINLDFLAGS) $(PLUGINLIBS) $(LIBINTL) -fno-rtti plugin/m2rte.o -shared -o $@ |
| 465 |
else |
| 466 |
m2.install-plugin: |
| 467 |
|
| 468 |
plugin/m2rte$(soext): |
| 469 |
|
| 470 |
endif |
| 471 |
|
| 472 |
|
| 473 |
# Clean hooks: |
| 474 |
# A lot of the ancillary files are deleted by the main makefile. |
| 475 |
# We just have to delete files specific to us. |
| 476 |
|
| 477 |
m2.mostlyclean: |
| 478 |
-rm -f m2/*.o |
| 479 |
|
| 480 |
m2.clean: |
| 481 |
-rm -f m2/*.o |
| 482 |
-rm -f m2/gm2-libs/config.* |
| 483 |
-rm m2/gm2-libs/gm2-libs-host.h m2/gm2config.h |
| 484 |
|
| 485 |
m2.extraclean: |
| 486 |
m2.realclean: |
| 487 |
|
| 488 |
quit: force |
| 489 |
echo "calling exit" |
| 490 |
exit 1 |
| 491 |
|
| 492 |
# Rules to build the compiler, pge and mc. |
| 493 |
|
| 494 |
# MC_COPYRIGHT=--gpl-header --project="GNU Modula-2" |
| 495 |
MC_COPYRIGHT= |
| 496 |
|
| 497 |
MC_ARGS= --olang=c++ \ |
| 498 |
--h-file-prefix=$(SRC_PREFIX) \ |
| 499 |
-I$(srcdir)/m2/gm2-libs \ |
| 500 |
-I$(srcdir)/m2/gm2-compiler \ |
| 501 |
-I$(srcdir)/m2/gm2-libiberty \ |
| 502 |
-I$(srcdir)/m2/gm2-gcc \ |
| 503 |
--quiet \ |
| 504 |
$(MC_COPYRIGHT) \ |
| 505 |
--gcc-config-system |
| 506 |
|
| 507 |
MC_EXTENDED_OPAQUE= |
| 508 |
MCDEPS=m2/boot-bin/mc$(exeext) |
| 509 |
|
| 510 |
MC=m2/boot-bin/mc$(exeext) $(MC_ARGS) |
| 511 |
|
| 512 |
MC_LIBS=m2/mc-boot-ch/Glibc.o m2/mc-boot-ch/Gmcrts.o |
| 513 |
|
| 514 |
MC_SRC_FLAGS=-DMC_M2 |
| 515 |
|
| 516 |
M2LINK=m2/boot-bin/mklink$(exeext) |
| 517 |
GM2_O=-O0 |
| 518 |
GM2_O_S3=-O |
| 519 |
GM2_OS=-Os |
| 520 |
GM2_G=-g -fm2-g |
| 521 |
GM2_CPP= |
| 522 |
# GM2_DEBUG_STRMEM=-fcpp |
| 523 |
GM2_DEBUG_STRMEM= |
| 524 |
GM2_FLAGS=-fsoft-check-all \ |
| 525 |
-fno-return \ |
| 526 |
$(GM2_G) $(GM2_O) \ |
| 527 |
-funbounded-by-reference -fpim -fextended-opaque \ |
| 528 |
-Wcase-enum -Wpedantic-cast -Wpedantic-param-names \ |
| 529 |
-Wreturn-type -Wunused-variable -Wuninit-variable-checking \ |
| 530 |
-ffunction-sections -fdata-sections \ |
| 531 |
$(GM2_CPP) # -fauto-init |
| 532 |
GM2_ISO_FLAGS=-fsoft-check-all $(GM2_G) $(GM2_O) \ |
| 533 |
-fno-return \ |
| 534 |
-funbounded-by-reference -fiso -fextended-opaque \ |
| 535 |
-Wcase-enum -Wpedantic-cast -Wpedantic-param-names -Wreturn-type \ |
| 536 |
-Wunused-variable -Wuninit-variable-checking \ |
| 537 |
-ffunction-sections -fdata-sections \ |
| 538 |
$(GM2_CPP) |
| 539 |
GM2_MIN_FLAGS=$(GM2_G) $(GM2_OS) \ |
| 540 |
-funbounded-by-reference -fextended-opaque \ |
| 541 |
-Wpedantic-cast -Wpedantic-param-names -fno-exceptions \ |
| 542 |
-ffunction-sections -fdata-sections $(GM2_CPP) |
| 543 |
|
| 544 |
# ALL_LINKERFLAGS may include -pie (when GCC is configured with |
| 545 |
# --enable-host-pie), so use -fPIE if needed. (It would not be |
| 546 |
# a good idea to override CFLAGS.) |
| 547 |
GM2_PICFLAGS = $(PICFLAG) |
| 548 |
|
| 549 |
O2=-O2 -g |
| 550 |
SO_O2=-O2 -g -fPIC |
| 551 |
SO=-O0 -g -fPIC |
| 552 |
|
| 553 |
# Language-specific object files for the gm2 compiler. |
| 554 |
|
| 555 |
GM2_C_OBJS = m2/gm2-lang.o \ |
| 556 |
m2/gm2-gcc/m2pp.o \ |
| 557 |
m2/gm2-gcc/m2assert.o \ |
| 558 |
m2/gm2-gcc/m2block.o \ |
| 559 |
m2/gm2-gcc/m2builtins.o \ |
| 560 |
m2/gm2-gcc/m2except.o \ |
| 561 |
m2/gm2-gcc/m2color.o \ |
| 562 |
m2/gm2-gcc/m2configure.o \ |
| 563 |
m2/gm2-gcc/m2convert.o \ |
| 564 |
m2/gm2-gcc/m2decl.o \ |
| 565 |
m2/gm2-gcc/m2expr.o \ |
| 566 |
m2/gm2-gcc/m2linemap.o \ |
| 567 |
m2/gm2-gcc/m2statement.o \ |
| 568 |
m2/gm2-gcc/m2type.o \ |
| 569 |
m2/gm2-gcc/m2tree.o \ |
| 570 |
m2/gm2-gcc/m2treelib.o \ |
| 571 |
m2/gm2-gcc/m2top.o \ |
| 572 |
m2/gm2-gcc/m2misc.o \ |
| 573 |
m2/gm2-gcc/init.o |
| 574 |
GM2_LIBS = m2/gm2-compiler/gm2.a \ |
| 575 |
m2/gm2-libs/libgm2.a \ |
| 576 |
|
| 577 |
GM2_LIBS_BOOT = m2/gm2-compiler-boot/gm2.a \ |
| 578 |
m2/gm2-libs-boot/libgm2.a \ |
| 579 |
$(GM2-BOOT-O) |
| 580 |
|
| 581 |
m2_OBJS = $(GM2_C_OBJS) m2/gm2-gcc/rtegraph.o \ |
| 582 |
m2/gm2-compiler-boot/m2flex.o \ |
| 583 |
$(BUILD-LIBS-BOOT) $(BUILD-COMPILER-BOOT) $(MC_LIBS) |
| 584 |
|
| 585 |
cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) $(m2.prev) |
| 586 |
cp -p $< $@ |
| 587 |
|
| 588 |
m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o \ |
| 589 |
$(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS) \ |
| 590 |
m2/gm2-gcc/rtegraph.o $(M2RTE_PLUGIN_SO) |
| 591 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 592 |
@$(call LINK_PROGRESS,$(INDEX.m2),start) |
| 593 |
+$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler/m2flex.o \ |
| 594 |
attribs.o \ |
| 595 |
$(GM2_LIBS) \ |
| 596 |
$(BACKEND) $(LIBS) m2/gm2-gcc/rtegraph.o \ |
| 597 |
$(BACKENDLIBS) $(LIBSTDCXX) -lm |
| 598 |
@$(call LINK_PROGRESS,$(INDEX.m2),end) |
| 599 |
|
| 600 |
m2/stage1/cc1gm2$(exeext): gm2$(exeext) m2/gm2-compiler-boot/m2flex.o \ |
| 601 |
$(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) \ |
| 602 |
$(GM2_LIBS_BOOT) $(MC_LIBS) \ |
| 603 |
m2/gm2-gcc/rtegraph.o $(M2RTE_PLUGIN_SO) \ |
| 604 |
$(m2.prev) |
| 605 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 606 |
@$(call LINK_PROGRESS,$(INDEX.m2),start) |
| 607 |
+$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler-boot/m2flex.o \ |
| 608 |
attribs.o \ |
| 609 |
$(GM2_LIBS_BOOT) $(MC_LIBS) \ |
| 610 |
m2/gm2-gcc/rtegraph.o \ |
| 611 |
$(BACKEND) $(LIBS) $(BACKENDLIBS) |
| 612 |
@$(call LINK_PROGRESS,$(INDEX.m2),end) |
| 613 |
|
| 614 |
# Compiling object files from source files. |
| 615 |
|
| 616 |
GCC_HEADER_DEPENDENCIES_FOR_M2 = $(BUILD-BOOT-H) $(TIMEVAR_H) m2/gm2config.h $(CONFIG_H) \ |
| 617 |
$(TREE_H) $(RTL_H) $(TARGET_H) $(PLUGIN_HEADERS) \ |
| 618 |
$(BCONFIG_H) $(CORETYPES_H) $(SYSTEM_H) \ |
| 619 |
$(srcdir)/flags.h gtype-m2.h \ |
| 620 |
$(generated_files) insn-attr-common.h |
| 621 |
|
| 622 |
m2/gm2-gcc/%.o: $(srcdir)/m2/gm2-gcc/%.cc $(GCC_HEADER_DEPENDENCIES_FOR_M2) |
| 623 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 624 |
$(COMPILER) $(CM2DEP) -c -g $(ALL_COMPILERFLAGS) \ |
| 625 |
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) |
| 626 |
$(POSTCOMPILE) |
| 627 |
|
| 628 |
m2/gm2-gcc/m2configure.o: $(srcdir)/m2/gm2-gcc/m2configure.cc \ |
| 629 |
$(SYSTEM_H) $(GCC_H) $(CONFIG_H) \ |
| 630 |
m2/gm2config.h $(TARGET_H) $(PLUGIN_HEADERS) \ |
| 631 |
$(generated_files) $(C_TREE_H) insn-attr-common.h |
| 632 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 633 |
$(COMPILER) $(CM2DEP) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
| 634 |
$(DRIVER_DEFINES) \ |
| 635 |
-DLIBSUBDIR=\"$(libsubdir)\" \ |
| 636 |
-DPREFIX=\"$(prefix)\" \ |
| 637 |
-c $(srcdir)/m2/gm2-gcc/m2configure.cc $(OUTPUT_OPTION) |
| 638 |
$(POSTCOMPILE) |
| 639 |
|
| 640 |
m2/gm2-lang.o: $(srcdir)/m2/gm2-lang.cc gt-m2-gm2-lang.h $(GCC_HEADER_DEPENDENCIES_FOR_M2) |
| 641 |
$(COMPILER) $(CM2DEP) -c -g $(GM2GCC) $(ALL_COMPILERFLAGS) \ |
| 642 |
-DLIBSUBDIR=\"$(libsubdir)\" \ |
| 643 |
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) |
| 644 |
$(POSTCOMPILE) |
| 645 |
|
| 646 |
m2/gm2-gcc/rtegraph.o: $(srcdir)/m2/gm2-gcc/rtegraph.cc $(GCC_HEADER_DEPENDENCIES_FOR_M2) \ |
| 647 |
gt-m2-rtegraph.h |
| 648 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 649 |
$(COMPILER) $(CM2DEP) -c -g $(GM2GCC) $(ALL_COMPILERFLAGS) \ |
| 650 |
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) |
| 651 |
$(POSTCOMPILE) |
| 652 |
|
| 653 |
m2/gm2-gcc/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-gcc/%.def $(MCDEPS) |
| 654 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 655 |
$(MC) -o=$@ $(srcdir)/m2/gm2-gcc/$*.def |
| 656 |
|
| 657 |
ifeq ($(HAVE_PYTHON),yes) |
| 658 |
check-format-error: |
| 659 |
$(PYTHON) $(srcdir)/m2/tools-src/checkmeta.py -s $(srcdir)/m2/gm2-compiler |
| 660 |
else |
| 661 |
check-format-error: |
| 662 |
endif |
| 663 |
|
| 664 |
# The following tables define the source files which are translated into C using mc |
| 665 |
# and defines the system interface C files. |
| 666 |
|
| 667 |
# Core library definition modules found in gm2-libs. |
| 668 |
|
| 669 |
GM2-LIBS-BOOT-DEFS = \ |
| 670 |
ASCII.def \ |
| 671 |
Args.def \ |
| 672 |
Assertion.def \ |
| 673 |
Break.def \ |
| 674 |
CmdArgs.def \ |
| 675 |
Debug.def \ |
| 676 |
DynamicStrings.def \ |
| 677 |
Environment.def \ |
| 678 |
FIO.def \ |
| 679 |
FormatStrings.def \ |
| 680 |
FpuIO.def \ |
| 681 |
IO.def \ |
| 682 |
Indexing.def \ |
| 683 |
M2Dependent.def \ |
| 684 |
M2EXCEPTION.def \ |
| 685 |
M2RTS.def \ |
| 686 |
NumberIO.def \ |
| 687 |
PushBackInput.def \ |
| 688 |
RTExceptions.def \ |
| 689 |
SArgs.def \ |
| 690 |
SEnvironment.def \ |
| 691 |
SFIO.def \ |
| 692 |
SYSTEM.def \ |
| 693 |
Scan.def \ |
| 694 |
StdIO.def \ |
| 695 |
Storage.def \ |
| 696 |
StrCase.def \ |
| 697 |
StrIO.def \ |
| 698 |
StrLib.def \ |
| 699 |
StringConvert.def \ |
| 700 |
SysExceptions.def \ |
| 701 |
SysStorage.def \ |
| 702 |
TimeString.def \ |
| 703 |
UnixArgs.def \ |
| 704 |
dtoa.def \ |
| 705 |
errno.def \ |
| 706 |
ldtoa.def \ |
| 707 |
libc.def \ |
| 708 |
libm.def \ |
| 709 |
termios.def \ |
| 710 |
wrapc.def \ |
| 711 |
|
| 712 |
# Core library implementation modules found in gm2-libs. |
| 713 |
|
| 714 |
GM2-LIBS-BOOT-MODS = \ |
| 715 |
ASCII.mod \ |
| 716 |
Args.mod \ |
| 717 |
Assertion.mod \ |
| 718 |
Break.mod \ |
| 719 |
CmdArgs.mod \ |
| 720 |
Debug.mod \ |
| 721 |
DynamicStrings.mod \ |
| 722 |
Environment.mod \ |
| 723 |
FIO.mod \ |
| 724 |
FormatStrings.mod \ |
| 725 |
FpuIO.mod \ |
| 726 |
IO.mod \ |
| 727 |
Indexing.mod \ |
| 728 |
M2Dependent.mod \ |
| 729 |
M2EXCEPTION.mod \ |
| 730 |
M2RTS.mod \ |
| 731 |
NumberIO.mod \ |
| 732 |
PushBackInput.mod \ |
| 733 |
RTExceptions.mod \ |
| 734 |
SArgs.mod \ |
| 735 |
SEnvironment.mod \ |
| 736 |
SFIO.mod \ |
| 737 |
Scan.mod \ |
| 738 |
Storage.mod \ |
| 739 |
StrCase.mod \ |
| 740 |
StrIO.mod \ |
| 741 |
StrLib.mod \ |
| 742 |
StringConvert.mod \ |
| 743 |
SysStorage.mod \ |
| 744 |
TimeString.mod \ |
| 745 |
|
| 746 |
# Hand translated C files and C files for definition module for "C" modules |
| 747 |
# found in gm2-libs-ch. |
| 748 |
|
| 749 |
GM2-LIBS-BOOT-C = \ |
| 750 |
StdIO.c \ |
| 751 |
SysExceptions.c \ |
| 752 |
choosetemp.c \ |
| 753 |
errno.c \ |
| 754 |
termios.c \ |
| 755 |
wrapc.c \ |
| 756 |
|
| 757 |
# C++ implemented modules found in gm2-libs-ch. |
| 758 |
|
| 759 |
GM2-LIBS-BOOT-CC = \ |
| 760 |
UnixArgs.cc \ |
| 761 |
dtoa.cc \ |
| 762 |
ldtoa.cc |
| 763 |
|
| 764 |
# Definition modules for the front end found in gm2-compiler. |
| 765 |
|
| 766 |
GM2-COMP-BOOT-DEFS = \ |
| 767 |
FifoQueue.def \ |
| 768 |
Lists.def \ |
| 769 |
M2ALU.def \ |
| 770 |
M2AsmUtil.def \ |
| 771 |
M2Base.def \ |
| 772 |
M2BasicBlock.def \ |
| 773 |
M2Batch.def \ |
| 774 |
M2Bitset.def \ |
| 775 |
M2CaseList.def \ |
| 776 |
M2Check.def \ |
| 777 |
M2Code.def \ |
| 778 |
M2ColorString.def \ |
| 779 |
M2Comp.def \ |
| 780 |
M2Const.def \ |
| 781 |
M2Debug.def \ |
| 782 |
M2DebugStack.def \ |
| 783 |
M2Defaults.def \ |
| 784 |
M2DriverOptions.def \ |
| 785 |
DynamicPath.def \ |
| 786 |
PathName.def \ |
| 787 |
M2Emit.def \ |
| 788 |
M2Error.def \ |
| 789 |
M2EvalSym.def \ |
| 790 |
M2FileName.def \ |
| 791 |
M2GCCDeclare.def \ |
| 792 |
M2GenGCC.def \ |
| 793 |
M2Graph.def \ |
| 794 |
M2LangDump.def \ |
| 795 |
M2LexBuf.def \ |
| 796 |
M2MetaError.def \ |
| 797 |
M2Optimize.def \ |
| 798 |
M2Options.def \ |
| 799 |
M2Pass.def \ |
| 800 |
M2Preprocess.def \ |
| 801 |
M2Printf.def \ |
| 802 |
M2Quads.def \ |
| 803 |
M2Quiet.def \ |
| 804 |
M2Range.def \ |
| 805 |
M2Reserved.def \ |
| 806 |
M2SSA.def \ |
| 807 |
M2Scaffold.def \ |
| 808 |
M2Scope.def \ |
| 809 |
M2Search.def \ |
| 810 |
M2Size.def \ |
| 811 |
M2StackAddress.def \ |
| 812 |
M2StackWord.def \ |
| 813 |
M2StateCheck.def \ |
| 814 |
M2Students.def \ |
| 815 |
M2Swig.def \ |
| 816 |
M2SymInit.def \ |
| 817 |
M2System.def \ |
| 818 |
NameKey.def \ |
| 819 |
ObjectFiles.def \ |
| 820 |
Output.def \ |
| 821 |
P0SymBuild.def \ |
| 822 |
P0SyntaxCheck.def \ |
| 823 |
P1Build.def \ |
| 824 |
P1SymBuild.def \ |
| 825 |
P2Build.def \ |
| 826 |
P2SymBuild.def \ |
| 827 |
P3Build.def \ |
| 828 |
P3SymBuild.def \ |
| 829 |
PCBuild.def \ |
| 830 |
PCSymBuild.def \ |
| 831 |
PHBuild.def \ |
| 832 |
Sets.def \ |
| 833 |
SymbolConversion.def \ |
| 834 |
SymbolKey.def \ |
| 835 |
SymbolTable.def \ |
| 836 |
bnflex.def \ |
| 837 |
m2flex.def \ |
| 838 |
|
| 839 |
# Implementation modules for the front end found in gm2-compiler. |
| 840 |
|
| 841 |
GM2-COMP-BOOT-MODS = \ |
| 842 |
FifoQueue.mod \ |
| 843 |
Lists.mod \ |
| 844 |
Lists.mod \ |
| 845 |
M2ALU.mod \ |
| 846 |
M2AsmUtil.mod \ |
| 847 |
M2Base.mod \ |
| 848 |
M2BasicBlock.mod \ |
| 849 |
M2Batch.mod \ |
| 850 |
M2Bitset.mod \ |
| 851 |
M2CaseList.mod \ |
| 852 |
M2Check.mod \ |
| 853 |
M2Code.mod \ |
| 854 |
M2ColorString.mod \ |
| 855 |
M2Comp.mod \ |
| 856 |
M2Const.mod \ |
| 857 |
M2Debug.mod \ |
| 858 |
M2DebugStack.mod \ |
| 859 |
M2Defaults.mod \ |
| 860 |
M2DriverOptions.mod \ |
| 861 |
DynamicPath.mod \ |
| 862 |
PathName.mod \ |
| 863 |
M2Emit.mod \ |
| 864 |
M2Error.mod \ |
| 865 |
M2FileName.mod \ |
| 866 |
M2GCCDeclare.mod \ |
| 867 |
M2GenGCC.mod \ |
| 868 |
M2Graph.mod \ |
| 869 |
M2LangDump.mod \ |
| 870 |
M2LexBuf.mod \ |
| 871 |
M2MetaError.mod \ |
| 872 |
M2Optimize.mod \ |
| 873 |
M2Options.mod \ |
| 874 |
M2Pass.mod \ |
| 875 |
M2Preprocess.mod \ |
| 876 |
M2Printf.mod \ |
| 877 |
M2Quads.mod \ |
| 878 |
M2Quiet.mod \ |
| 879 |
M2Range.mod \ |
| 880 |
M2Reserved.mod \ |
| 881 |
M2SSA.mod \ |
| 882 |
M2Scaffold.mod \ |
| 883 |
M2Scope.mod \ |
| 884 |
M2Search.mod \ |
| 885 |
M2Size.mod \ |
| 886 |
M2StackAddress.mod \ |
| 887 |
M2StackWord.mod \ |
| 888 |
M2StateCheck.mod \ |
| 889 |
M2Students.mod \ |
| 890 |
M2Swig.mod \ |
| 891 |
M2SymInit.mod \ |
| 892 |
M2System.mod \ |
| 893 |
NameKey.mod \ |
| 894 |
NameKey.mod \ |
| 895 |
ObjectFiles.mod \ |
| 896 |
Output.mod \ |
| 897 |
P0SymBuild.mod \ |
| 898 |
P1SymBuild.mod \ |
| 899 |
P2SymBuild.mod \ |
| 900 |
P3SymBuild.mod \ |
| 901 |
PCSymBuild.mod \ |
| 902 |
Sets.mod \ |
| 903 |
SymbolConversion.mod \ |
| 904 |
SymbolKey.mod \ |
| 905 |
SymbolKey.mod \ |
| 906 |
SymbolTable.mod \ |
| 907 |
bnflex.mod \ |
| 908 |
|
| 909 |
# The interface between the modula-2 front end and gimple/trees found in directory gm2-gcc. |
| 910 |
|
| 911 |
GM2-GCC-DEFS = \ |
| 912 |
gcctypes.def \ |
| 913 |
m2block.def \ |
| 914 |
m2builtins.def \ |
| 915 |
m2color.def \ |
| 916 |
m2configure.def \ |
| 917 |
m2convert.def \ |
| 918 |
m2decl.def \ |
| 919 |
m2except.def \ |
| 920 |
m2except.def \ |
| 921 |
m2expr.def \ |
| 922 |
m2linemap.def \ |
| 923 |
m2misc.def \ |
| 924 |
m2pp.def \ |
| 925 |
m2statement.def \ |
| 926 |
m2top.def \ |
| 927 |
m2tree.def \ |
| 928 |
m2treelib.def \ |
| 929 |
m2type.def \ |
| 930 |
CDataTypes.def \ |
| 931 |
|
| 932 |
# The following lists define the source files used to build gm2 using Modula-2 |
| 933 |
# sources directly. |
| 934 |
# |
| 935 |
# cc1gm2$(exeext) uses these definition modules from the core libraries. |
| 936 |
|
| 937 |
GM2-LIBS-DEFS = \ |
| 938 |
ASCII.def \ |
| 939 |
Args.def \ |
| 940 |
Assertion.def \ |
| 941 |
Break.def \ |
| 942 |
Builtins.def \ |
| 943 |
COROUTINES.def \ |
| 944 |
CmdArgs.def \ |
| 945 |
Debug.def \ |
| 946 |
DynamicStrings.def \ |
| 947 |
Environment.def \ |
| 948 |
FIO.def \ |
| 949 |
FormatStrings.def \ |
| 950 |
FpuIO.def \ |
| 951 |
GetOpt.def \ |
| 952 |
IO.def \ |
| 953 |
Indexing.def \ |
| 954 |
LMathLib0.def \ |
| 955 |
LegacyReal.def \ |
| 956 |
M2Dependent.def \ |
| 957 |
M2EXCEPTION.def \ |
| 958 |
M2RTS.def \ |
| 959 |
MathLib0.def \ |
| 960 |
MemUtils.def \ |
| 961 |
NumberIO.def \ |
| 962 |
PushBackInput.def \ |
| 963 |
RTExceptions.def \ |
| 964 |
RTint.def \ |
| 965 |
SArgs.def \ |
| 966 |
SEnvironment.def \ |
| 967 |
SFIO.def \ |
| 968 |
SMathLib0.def \ |
| 969 |
SYSTEM.def \ |
| 970 |
Scan.def \ |
| 971 |
StdIO.def \ |
| 972 |
Storage.def \ |
| 973 |
StrCase.def \ |
| 974 |
StrIO.def \ |
| 975 |
StrLib.def \ |
| 976 |
StringConvert.def \ |
| 977 |
SysStorage.def \ |
| 978 |
TimeString.def \ |
| 979 |
UnixArgs.def \ |
| 980 |
cbuiltin.def \ |
| 981 |
dtoa.def \ |
| 982 |
ldtoa.def \ |
| 983 |
libc.def \ |
| 984 |
termios.def \ |
| 985 |
wrapc.def \ |
| 986 |
|
| 987 |
# cc1gm2$(exeext) uses these implementation modules from the core libraries. |
| 988 |
|
| 989 |
GM2-LIBS-MODS = \ |
| 990 |
ASCII.mod \ |
| 991 |
Args.mod \ |
| 992 |
Assertion.mod \ |
| 993 |
Break.mod \ |
| 994 |
Builtins.mod \ |
| 995 |
COROUTINES.mod \ |
| 996 |
CmdArgs.mod \ |
| 997 |
Debug.mod \ |
| 998 |
DynamicStrings.mod \ |
| 999 |
Environment.mod \ |
| 1000 |
FIO.mod \ |
| 1001 |
FormatStrings.mod \ |
| 1002 |
FpuIO.mod \ |
| 1003 |
GetOpt.mod \ |
| 1004 |
IO.mod \ |
| 1005 |
Indexing.mod \ |
| 1006 |
LMathLib0.mod \ |
| 1007 |
LegacyReal.mod \ |
| 1008 |
M2Dependent.mod \ |
| 1009 |
M2EXCEPTION.mod \ |
| 1010 |
M2RTS.mod \ |
| 1011 |
MathLib0.mod \ |
| 1012 |
MemUtils.mod \ |
| 1013 |
NumberIO.mod \ |
| 1014 |
PushBackInput.mod \ |
| 1015 |
RTExceptions.mod \ |
| 1016 |
RTint.mod \ |
| 1017 |
SArgs.mod \ |
| 1018 |
SEnvironment.mod \ |
| 1019 |
SFIO.mod \ |
| 1020 |
SMathLib0.mod \ |
| 1021 |
SYSTEM.mod \ |
| 1022 |
Scan.mod \ |
| 1023 |
StdIO.mod \ |
| 1024 |
Storage.mod \ |
| 1025 |
StrCase.mod \ |
| 1026 |
StrIO.mod \ |
| 1027 |
StrLib.mod \ |
| 1028 |
StringConvert.mod \ |
| 1029 |
SysStorage.mod \ |
| 1030 |
TimeString.mod \ |
| 1031 |
|
| 1032 |
# cc1gm2$(exeext) uses these C modules from the core libraries. |
| 1033 |
|
| 1034 |
GM2-LIBS-C = \ |
| 1035 |
Selective.c \ |
| 1036 |
SysExceptions.c \ |
| 1037 |
cgetopt.c \ |
| 1038 |
choosetemp.c \ |
| 1039 |
errno.c \ |
| 1040 |
host.c \ |
| 1041 |
termios.c \ |
| 1042 |
wrapc.c \ |
| 1043 |
|
| 1044 |
# cc1gm2$(exeext) uses these C++ modules from the core libraries. |
| 1045 |
|
| 1046 |
GM2-LIBS-CC = \ |
| 1047 |
UnixArgs.cc \ |
| 1048 |
dtoa.cc \ |
| 1049 |
ldtoa.cc \ |
| 1050 |
|
| 1051 |
# cc1gm2$(exeext) uses these definition modules found in the gm2-compiler directory. |
| 1052 |
|
| 1053 |
GM2-COMP-DEFS = \ |
| 1054 |
FifoQueue.def \ |
| 1055 |
Lists.def \ |
| 1056 |
M2ALU.def \ |
| 1057 |
M2AsmUtil.def \ |
| 1058 |
M2Base.def \ |
| 1059 |
M2BasicBlock.def \ |
| 1060 |
M2Batch.def \ |
| 1061 |
M2Bitset.def \ |
| 1062 |
M2CaseList.def \ |
| 1063 |
M2Check.def \ |
| 1064 |
M2Code.def \ |
| 1065 |
M2ColorString.def \ |
| 1066 |
M2Comp.def \ |
| 1067 |
M2Const.def \ |
| 1068 |
M2Debug.def \ |
| 1069 |
M2DebugStack.def \ |
| 1070 |
M2Defaults.def \ |
| 1071 |
M2DriverOptions.def \ |
| 1072 |
DynamicPath.def \ |
| 1073 |
PathName.def \ |
| 1074 |
M2Emit.def \ |
| 1075 |
M2Error.def \ |
| 1076 |
M2FileName.def \ |
| 1077 |
M2GCCDeclare.def \ |
| 1078 |
M2GenGCC.def \ |
| 1079 |
M2Graph.def \ |
| 1080 |
M2LangDump.def \ |
| 1081 |
M2LexBuf.def \ |
| 1082 |
M2MetaError.def \ |
| 1083 |
M2Optimize.def \ |
| 1084 |
M2Options.def \ |
| 1085 |
M2Pass.def \ |
| 1086 |
M2Preprocess.def \ |
| 1087 |
M2Printf.def \ |
| 1088 |
M2Quads.def \ |
| 1089 |
M2Quiet.def \ |
| 1090 |
M2Range.def \ |
| 1091 |
M2Reserved.def \ |
| 1092 |
M2SSA.def \ |
| 1093 |
M2Scaffold.def \ |
| 1094 |
M2Scope.def \ |
| 1095 |
M2Search.def \ |
| 1096 |
M2Size.def \ |
| 1097 |
M2StackAddress.def \ |
| 1098 |
M2StackWord.def \ |
| 1099 |
M2StateCheck.def \ |
| 1100 |
M2Students.def \ |
| 1101 |
M2Swig.def \ |
| 1102 |
M2SymInit.def \ |
| 1103 |
M2System.def \ |
| 1104 |
NameKey.def \ |
| 1105 |
ObjectFiles.def \ |
| 1106 |
P0SymBuild.def \ |
| 1107 |
P0SyntaxCheck.def \ |
| 1108 |
P1Build.def \ |
| 1109 |
P1SymBuild.def \ |
| 1110 |
P2Build.def \ |
| 1111 |
P2SymBuild.def \ |
| 1112 |
P3Build.def \ |
| 1113 |
P3SymBuild.def \ |
| 1114 |
PCBuild.def \ |
| 1115 |
PCSymBuild.def \ |
| 1116 |
PHBuild.def \ |
| 1117 |
Sets.def \ |
| 1118 |
SymbolConversion.def \ |
| 1119 |
SymbolKey.def \ |
| 1120 |
SymbolTable.def \ |
| 1121 |
bnflex.def \ |
| 1122 |
|
| 1123 |
# cc1gm2$(exeext) uses these implementation modules found in the gm2-compiler directory. |
| 1124 |
|
| 1125 |
GM2-COMP-MODS = \ |
| 1126 |
FifoQueue.mod \ |
| 1127 |
Lists.mod \ |
| 1128 |
M2ALU.mod \ |
| 1129 |
M2AsmUtil.mod \ |
| 1130 |
M2Base.mod \ |
| 1131 |
M2BasicBlock.mod \ |
| 1132 |
M2Batch.mod \ |
| 1133 |
M2Bitset.mod \ |
| 1134 |
M2CaseList.mod \ |
| 1135 |
M2Check.mod \ |
| 1136 |
M2Code.mod \ |
| 1137 |
M2ColorString.mod \ |
| 1138 |
M2Comp.mod \ |
| 1139 |
M2Const.mod \ |
| 1140 |
M2Debug.mod \ |
| 1141 |
M2DebugStack.mod \ |
| 1142 |
M2Defaults.mod \ |
| 1143 |
M2DriverOptions.mod \ |
| 1144 |
DynamicPath.mod \ |
| 1145 |
PathName.mod \ |
| 1146 |
M2Emit.mod \ |
| 1147 |
M2Error.mod \ |
| 1148 |
M2FileName.mod \ |
| 1149 |
M2GCCDeclare.mod \ |
| 1150 |
M2GenGCC.mod \ |
| 1151 |
M2Graph.mod \ |
| 1152 |
M2LangDump.mod \ |
| 1153 |
M2LexBuf.mod \ |
| 1154 |
M2MetaError.mod \ |
| 1155 |
M2Optimize.mod \ |
| 1156 |
M2Options.mod \ |
| 1157 |
M2Pass.mod \ |
| 1158 |
M2Preprocess.mod \ |
| 1159 |
M2Printf.mod \ |
| 1160 |
M2Quads.mod \ |
| 1161 |
M2Quiet.mod \ |
| 1162 |
M2Range.mod \ |
| 1163 |
M2Reserved.mod \ |
| 1164 |
M2SSA.mod \ |
| 1165 |
M2Scaffold.mod \ |
| 1166 |
M2Scope.mod \ |
| 1167 |
M2Search.mod \ |
| 1168 |
M2Size.mod \ |
| 1169 |
M2StackAddress.mod \ |
| 1170 |
M2StackWord.mod \ |
| 1171 |
M2StateCheck.mod \ |
| 1172 |
M2Students.mod \ |
| 1173 |
M2Swig.mod \ |
| 1174 |
M2SymInit.mod \ |
| 1175 |
M2System.mod \ |
| 1176 |
NameKey.mod \ |
| 1177 |
ObjectFiles.mod \ |
| 1178 |
Output.mod \ |
| 1179 |
P0SymBuild.mod \ |
| 1180 |
P1SymBuild.mod \ |
| 1181 |
P2SymBuild.mod \ |
| 1182 |
P3SymBuild.mod \ |
| 1183 |
PCSymBuild.mod \ |
| 1184 |
Sets.mod \ |
| 1185 |
SymbolConversion.mod \ |
| 1186 |
SymbolKey.mod \ |
| 1187 |
SymbolTable.mod \ |
| 1188 |
bnflex.mod \ |
| 1189 |
|
| 1190 |
# Implementation modules created by the parser generator pge from .bnf files. |
| 1191 |
|
| 1192 |
GM2-AUTO-MODS = \ |
| 1193 |
P2Build.mod \ |
| 1194 |
P3Build.mod \ |
| 1195 |
PHBuild.mod \ |
| 1196 |
PCBuild.mod \ |
| 1197 |
P1Build.mod \ |
| 1198 |
P0SyntaxCheck.mod \ |
| 1199 |
|
| 1200 |
# LIBIBERTY interface definition modules |
| 1201 |
|
| 1202 |
GM2-LIBIBERTY-DEFS = \ |
| 1203 |
choosetemp.def \ |
| 1204 |
pexecute.def |
| 1205 |
|
| 1206 |
BUILD-LIBS-BOOT-H = $(GM2-LIBS-BOOT-DEFS:%.def=m2/gm2-libs-boot/$(SRC_PREFIX)%.h) |
| 1207 |
|
| 1208 |
BUILD-LIBS-BOOT = $(BUILD-LIBS-BOOT-H) \ |
| 1209 |
$(GM2-LIBS-BOOT-MODS:%.mod=m2/gm2-libs-boot/%.o) \ |
| 1210 |
$(GM2-LIBS-BOOT-CC:%.cc=m2/gm2-libs-boot/%.o) \ |
| 1211 |
$(GM2-LIBS-BOOT-C:%.c=m2/gm2-libs-boot/%.o) |
| 1212 |
|
| 1213 |
BUILD-COMPILER-BOOT-H = $(GM2-COMP-BOOT-DEFS:%.def=m2/gm2-compiler-boot/$(SRC_PREFIX)%.h) \ |
| 1214 |
$(GM2-LIBIBERTY-DEFS:%.def=m2/gm2-libiberty/$(SRC_PREFIX)%.h) \ |
| 1215 |
$(GM2-GCC-DEFS:%.def=m2/gm2-gcc/$(SRC_PREFIX)%.h) |
| 1216 |
|
| 1217 |
BUILD-COMPILER-BOOT = $(BUILD-COMPILER-BOOT-H) \ |
| 1218 |
$(GM2-COMP-BOOT-DEFS:%.def=m2/gm2-compiler-boot/$(SRC_PREFIX)%.h) \ |
| 1219 |
$(GM2-AUTO-MODS:%.mod=m2/gm2-compiler-boot/%.o) \ |
| 1220 |
$(GM2-COMP-BOOT-MODS:%.mod=m2/gm2-compiler-boot/%.o) \ |
| 1221 |
m2/gm2-compiler-boot/m2flex.o |
| 1222 |
|
| 1223 |
BUILD-BOOT-H = m2/boot-bin/mc$(exeext) \ |
| 1224 |
$(BUILD-LIBS-BOOT-H) $(BUILD-COMPILER-BOOT-H) $(TARGET_H) $(PLUGIN_HEADERS) |
| 1225 |
|
| 1226 |
BUILD-LIBS = $(BUILD-LIBS-BOOT-H) \ |
| 1227 |
$(GM2-LIBS-MODS:%.mod=m2/gm2-libs/%.o) \ |
| 1228 |
$(GM2-LIBS-CC:%.cc=m2/gm2-libs/%.o) \ |
| 1229 |
$(GM2-LIBS-C:%.c=m2/gm2-libs/%.o) |
| 1230 |
|
| 1231 |
# Core library definition modules used by the modula-2 to C++ translator. |
| 1232 |
|
| 1233 |
MC-LIB-DEFS = \ |
| 1234 |
ASCII.def \ |
| 1235 |
Args.def \ |
| 1236 |
Assertion.def \ |
| 1237 |
Break.def \ |
| 1238 |
COROUTINES.def \ |
| 1239 |
CmdArgs.def \ |
| 1240 |
CDataTypes.def \ |
| 1241 |
Debug.def \ |
| 1242 |
DynamicStrings.def \ |
| 1243 |
Environment.def \ |
| 1244 |
FIO.def \ |
| 1245 |
FormatStrings.def \ |
| 1246 |
FpuIO.def \ |
| 1247 |
IO.def \ |
| 1248 |
M2Dependent.def \ |
| 1249 |
M2EXCEPTION.def \ |
| 1250 |
M2RTS.def \ |
| 1251 |
MemUtils.def \ |
| 1252 |
NumberIO.def \ |
| 1253 |
PushBackInput.def \ |
| 1254 |
RTExceptions.def \ |
| 1255 |
RTco.def \ |
| 1256 |
RTentity.def \ |
| 1257 |
RTint.def \ |
| 1258 |
SArgs.def \ |
| 1259 |
SFIO.def \ |
| 1260 |
SYSTEM.def \ |
| 1261 |
Selective.def \ |
| 1262 |
StdIO.def \ |
| 1263 |
Storage.def \ |
| 1264 |
StrCase.def \ |
| 1265 |
StrIO.def \ |
| 1266 |
StrLib.def \ |
| 1267 |
StringConvert.def \ |
| 1268 |
SysExceptions.def \ |
| 1269 |
SysStorage.def \ |
| 1270 |
TimeString.def \ |
| 1271 |
UnixArgs.def \ |
| 1272 |
dtoa.def \ |
| 1273 |
errno.def \ |
| 1274 |
ldtoa.def \ |
| 1275 |
libc.def \ |
| 1276 |
libm.def \ |
| 1277 |
termios.def \ |
| 1278 |
wrapc.def \ |
| 1279 |
|
| 1280 |
# Core library implementation modules used by the modula-2 to C++ translator. |
| 1281 |
|
| 1282 |
MC-LIB-MODS = \ |
| 1283 |
ASCII.mod \ |
| 1284 |
Args.mod \ |
| 1285 |
Assertion.mod \ |
| 1286 |
Break.mod \ |
| 1287 |
CmdArgs.mod \ |
| 1288 |
Debug.mod \ |
| 1289 |
DynamicStrings.mod \ |
| 1290 |
Environment.mod \ |
| 1291 |
FIO.mod \ |
| 1292 |
FormatStrings.mod \ |
| 1293 |
FpuIO.mod \ |
| 1294 |
IO.mod \ |
| 1295 |
M2Dependent.mod \ |
| 1296 |
M2EXCEPTION.mod \ |
| 1297 |
M2RTS.mod \ |
| 1298 |
MemUtils.mod \ |
| 1299 |
NumberIO.mod \ |
| 1300 |
PushBackInput.mod \ |
| 1301 |
RTExceptions.mod \ |
| 1302 |
RTint.mod \ |
| 1303 |
SArgs.mod \ |
| 1304 |
SFIO.mod \ |
| 1305 |
StdIO.mod \ |
| 1306 |
Storage.mod \ |
| 1307 |
StrCase.mod \ |
| 1308 |
StrIO.mod \ |
| 1309 |
StrLib.mod \ |
| 1310 |
StringConvert.mod \ |
| 1311 |
SysStorage.mod \ |
| 1312 |
TimeString.mod \ |
| 1313 |
|
| 1314 |
MC-LIB-BOOT-CC = $(MC-LIB-MODS:%.mod=%.cc) |
| 1315 |
|
| 1316 |
# Definition modules for the modula-2 to C++ translator found in mc. |
| 1317 |
|
| 1318 |
MC-DEFS = \ |
| 1319 |
Indexing.def \ |
| 1320 |
alists.def \ |
| 1321 |
decl.def \ |
| 1322 |
keyc.def \ |
| 1323 |
lists.def \ |
| 1324 |
mcComment.def \ |
| 1325 |
mcComp.def \ |
| 1326 |
mcDebug.def \ |
| 1327 |
mcError.def \ |
| 1328 |
mcFileName.def \ |
| 1329 |
mcLexBuf.def \ |
| 1330 |
mcMetaError.def \ |
| 1331 |
mcOptions.def \ |
| 1332 |
mcPreprocess.def \ |
| 1333 |
mcPretty.def \ |
| 1334 |
mcPrintf.def \ |
| 1335 |
mcQuiet.def \ |
| 1336 |
mcReserved.def \ |
| 1337 |
mcSearch.def \ |
| 1338 |
mcStack.def \ |
| 1339 |
mcStream.def \ |
| 1340 |
mcflex.def \ |
| 1341 |
mcp1.def \ |
| 1342 |
mcp2.def \ |
| 1343 |
mcp3.def \ |
| 1344 |
mcp4.def \ |
| 1345 |
mcp5.def \ |
| 1346 |
nameKey.def \ |
| 1347 |
symbolKey.def \ |
| 1348 |
varargs.def \ |
| 1349 |
wlists.def \ |
| 1350 |
|
| 1351 |
# Implementation modules for the modula-2 to C++ translator found in mc. |
| 1352 |
|
| 1353 |
MC-MODS = \ |
| 1354 |
Indexing.mod \ |
| 1355 |
alists.mod \ |
| 1356 |
decl.mod \ |
| 1357 |
keyc.mod \ |
| 1358 |
lists.mod \ |
| 1359 |
mcComment.mod \ |
| 1360 |
mcComp.mod \ |
| 1361 |
mcDebug.mod \ |
| 1362 |
mcError.mod \ |
| 1363 |
mcFileName.mod \ |
| 1364 |
mcLexBuf.mod \ |
| 1365 |
mcMetaError.mod \ |
| 1366 |
mcOptions.mod \ |
| 1367 |
mcPreprocess.mod \ |
| 1368 |
mcPretty.mod \ |
| 1369 |
mcPrintf.mod \ |
| 1370 |
mcQuiet.mod \ |
| 1371 |
mcReserved.mod \ |
| 1372 |
mcSearch.mod \ |
| 1373 |
mcStack.mod \ |
| 1374 |
mcStream.mod \ |
| 1375 |
nameKey.mod \ |
| 1376 |
symbolKey.mod \ |
| 1377 |
top.mod \ |
| 1378 |
varargs.mod \ |
| 1379 |
wlists.mod \ |
| 1380 |
|
| 1381 |
# Parser files generated by pge from .bnf files. |
| 1382 |
|
| 1383 |
MC-AUTO-MODS = \ |
| 1384 |
mcp1.mod \ |
| 1385 |
mcp2.mod \ |
| 1386 |
mcp3.mod \ |
| 1387 |
mcp4.mod \ |
| 1388 |
mcp5.mod |
| 1389 |
|
| 1390 |
MC-BOOT-CC = $(MC-MODS:%.mod=%.cc) $(MC-AUTO-MODS:%.mod=%.cc) |
| 1391 |
|
| 1392 |
# C interface files for mc. |
| 1393 |
|
| 1394 |
MC-INTERFACE-C = \ |
| 1395 |
M2LINK.c \ |
| 1396 |
SYSTEM.c \ |
| 1397 |
Selective.c \ |
| 1398 |
SysExceptions.c \ |
| 1399 |
abort.c \ |
| 1400 |
errno.c \ |
| 1401 |
libc.c \ |
| 1402 |
mcrts.c \ |
| 1403 |
termios.c \ |
| 1404 |
wrapc.c \ |
| 1405 |
|
| 1406 |
# C++ interface files for mc. |
| 1407 |
|
| 1408 |
MC-INTERFACE-CC = \ |
| 1409 |
UnixArgs.cc \ |
| 1410 |
dtoa.cc \ |
| 1411 |
ldtoa.cc \ |
| 1412 |
|
| 1413 |
BUILD-MC-BOOT-H = $(MC-LIB-DEFS:%.def=m2/mc-boot-gen/$(SRC_PREFIX)%.h) \ |
| 1414 |
$(MC-DEFS:%.def=m2/mc-boot-gen/$(SRC_PREFIX)%.h) |
| 1415 |
|
| 1416 |
BUILD-MC-BOOT-CC = $(MC-LIB-MODS:%.mod=m2/mc-boot-gen/$(SRC_PREFIX)%.cc) \ |
| 1417 |
$(MC-MODS:%.mod=m2/mc-boot-gen/$(SRC_PREFIX)%.cc) |
| 1418 |
|
| 1419 |
BUILD-MC-BOOT-AUTO-CC = $(MC-AUTO-MODS:%.mod=m2/mc-boot-gen/$(SRC_PREFIX)%.cc) |
| 1420 |
|
| 1421 |
BUILD-MC-BOOT-O = $(MC-LIB-BOOT-CC:%.cc=m2/mc-boot/$(SRC_PREFIX)%.o) \ |
| 1422 |
$(MC-BOOT-CC:%.cc=m2/mc-boot/$(SRC_PREFIX)%.o) |
| 1423 |
|
| 1424 |
BUILD-MC-INTERFACE-O = $(MC-INTERFACE-C:%.c=m2/mc-boot-ch/$(SRC_PREFIX)%.o) \ |
| 1425 |
$(MC-INTERFACE-CC:%.cc=m2/mc-boot-ch/$(SRC_PREFIX)%.o) |
| 1426 |
|
| 1427 |
GM2GCC = -I$(srcdir)/m2 -Im2 -I$(srcdir)/m2/gm2-gcc -Im2/gm2-gcc |
| 1428 |
|
| 1429 |
MCINCLUDES= -I$(srcdir)/m2/mc-boot-ch |
| 1430 |
LOCAL_INCLUDES = -I. -I$(srcdir)/../include -I$(srcdir) |
| 1431 |
GM2_BOOT_INCLUDES=-I. \ |
| 1432 |
-I$(srcdir)/../include \ |
| 1433 |
-I$(srcdir) \ |
| 1434 |
-Im2/gm2-libs-boot \ |
| 1435 |
-I$(srcdir)/m2/gm2-libs-ch \ |
| 1436 |
-Im2/gm2-compiler-boot \ |
| 1437 |
-I$(srcdir)m2/gm2-gcc \ |
| 1438 |
-Im2/gm2-libiberty \ |
| 1439 |
-I$(srcdir)/m2/gm2-libiberty |
| 1440 |
|
| 1441 |
GCC_COLOR=m2/gm2-gcc/m2color.o diagnostic-color.o |
| 1442 |
|
| 1443 |
m2/boot-bin/mc$(exeext): $(BUILD-MC-BOOT-O) $(BUILD-MC-INTERFACE-O) \ |
| 1444 |
m2/mc-boot/main.o mcflex.o m2/gm2-libs-boot/RTcodummy.o |
| 1445 |
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(BUILD-MC-BOOT-O) \ |
| 1446 |
$(BUILD-MC-INTERFACE-O) m2/mc-boot/main.o \ |
| 1447 |
mcflex.o m2/gm2-libs-boot/RTcodummy.o -lm |
| 1448 |
|
| 1449 |
m2/mc-boot/$(SRC_PREFIX)%.o: m2/mc-boot/$(SRC_PREFIX)%.cc m2/gm2-libs/gm2-libs-host.h |
| 1450 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1451 |
$(CXX) $(CM2DEP) $(CXXFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -g -c -I. -I$(srcdir)/m2/mc-boot-ch -I$(srcdir)/m2/mc-boot -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) $< -o $@ |
| 1452 |
$(POSTCOMPILE) |
| 1453 |
|
| 1454 |
m2/mc-boot-ch/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.c m2/gm2-libs/gm2-libs-host.h |
| 1455 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1456 |
$(CXX) $(CM2DEP) $(CXXFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -DHAVE_CONFIG_H -g -c -I. -Im2/gm2-libs -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) -Im2/gm2-libs $< -o $@ |
| 1457 |
$(POSTCOMPILE) |
| 1458 |
|
| 1459 |
m2/mc-boot-ch/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.cc m2/gm2-libs/gm2-libs-host.h |
| 1460 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1461 |
$(CXX) $(CM2DEP) $(CXXFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -DHAVE_CONFIG_H -g -c -I. -Im2/gm2-libs -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) -Im2/gm2-libs $< -o $@ |
| 1462 |
$(POSTCOMPILE) |
| 1463 |
|
| 1464 |
m2/mc-boot/main.o: $(M2LINK) $(srcdir)/m2/init/mcinit |
| 1465 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1466 |
unset CC ; $(M2LINK) -s --langc++ --exit --name m2/mc-boot/main.cc $(srcdir)/m2/init/mcinit |
| 1467 |
$(CXX) $(CM2DEP) $(CXXFLAGS) $(GM2_PICFLAGS) -g -c -I. -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) m2/mc-boot/main.cc -o $@ |
| 1468 |
$(POSTCOMPILE) |
| 1469 |
|
| 1470 |
mcflex.o: mcflex.c m2/gm2-libs/gm2-libs-host.h |
| 1471 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1472 |
$(CC) $(CM2DEP) $(CFLAGS) $(GM2_PICFLAGS) -I$(srcdir)/m2/mc -g -c $< -o $@ # remember that mcReserved.h is copied into m2/mc |
| 1473 |
$(POSTCOMPILE) |
| 1474 |
|
| 1475 |
mcflex.c: $(srcdir)/m2/mc/mc.flex |
| 1476 |
flex -t $< > $@ |
| 1477 |
|
| 1478 |
m2/gm2-libs-boot/M2RTS.o: $(srcdir)/m2/gm2-libs/M2RTS.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1479 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1480 |
$(MC) -o=m2/gm2-libs-boot/M2RTS.c $(srcdir)/m2/gm2-libs/M2RTS.mod |
| 1481 |
$(COMPILER) $(CM2DEP) -c -DIN_GCC $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot -I$(srcdir)/m2/gm2-libs-ch $(MCINCLUDES) $(INCLUDES) m2/gm2-libs-boot/M2RTS.c -o $@ |
| 1482 |
$(POSTCOMPILE) |
| 1483 |
|
| 1484 |
m2/gm2-libs-boot/%.o: $(srcdir)/m2/gm2-libs-boot/%.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1485 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1486 |
$(MC) -o=m2/gm2-libs-boot/$*.c $(srcdir)/m2/gm2-libs-boot/$*.mod |
| 1487 |
$(COMPILER) $(CM2DEP) -c -DIN_GCC $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) $(MCINCLUDES) -I$(srcdir)/m2/gm2-libs-ch m2/gm2-libs-boot/$*.c -o $@ |
| 1488 |
$(POSTCOMPILE) |
| 1489 |
|
| 1490 |
m2/gm2-libs-boot/%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1491 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1492 |
$(MC) -o=m2/gm2-libs-boot/$*.c $(srcdir)/m2/gm2-libs/$*.mod |
| 1493 |
$(COMPILER) $(CM2DEP) -c -DIN_GCC $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot -I$(srcdir)/m2/gm2-libs-ch $(MCINCLUDES) $(INCLUDES) m2/gm2-libs-boot/$*.c -o $@ |
| 1494 |
$(POSTCOMPILE) |
| 1495 |
|
| 1496 |
m2/gm2-libs-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs/%.def $(MCDEPS) |
| 1497 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1498 |
$(MC) -o=$@ $(srcdir)/m2/gm2-libs/$*.def |
| 1499 |
|
| 1500 |
GM2-LIBS-BOOT-H=m2/gm2-libs/gm2-libs-host.h m2/gm2-libs-boot/GM2RTS.h m2/gm2-libs-boot/GSYSTEM.h |
| 1501 |
|
| 1502 |
m2/gm2-libs-boot/RTcodummy.o: $(srcdir)/m2/gm2-libs-ch/RTcodummy.c |
| 1503 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1504 |
$(CXX) $(CM2DEP) -c -DIN_GCC $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1505 |
$(POSTCOMPILE) |
| 1506 |
|
| 1507 |
m2/gm2-libs-boot/RTintdummy.o: $(srcdir)/m2/gm2-libs-ch/RTintdummy.c |
| 1508 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1509 |
$(CXX) $(CM2DEP) -c -DIN_GCC $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1510 |
$(POSTCOMPILE) |
| 1511 |
|
| 1512 |
m2/gm2-libs-boot/wrapc.o: $(srcdir)/m2/gm2-libs-ch/wrapc.c m2/gm2-libs-boot/$(SRC_PREFIX)wrapc.h $(GM2-LIBS-BOOT-H) |
| 1513 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1514 |
$(CXX) $(CM2DEP) -c -DHAVE_CONFIG_H $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot -Im2/gm2-libs $(INCLUDES) $< -o $@ |
| 1515 |
$(POSTCOMPILE) |
| 1516 |
|
| 1517 |
m2/gm2-libs-boot/UnixArgs.o: $(srcdir)/m2/gm2-libs-ch/UnixArgs.cc m2/gm2-libs-boot/$(SRC_PREFIX)UnixArgs.h $(GM2-LIBS-BOOT-H) |
| 1518 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1519 |
$(CXX) $(CM2DEP) -c -DIN_GCC $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1520 |
$(POSTCOMPILE) |
| 1521 |
|
| 1522 |
m2/gm2-libs-boot/choosetemp.o: m2/gm2-libs-ch/choosetemp.c m2/gm2-libiberty/Gchoosetemp.h $(GM2-LIBS-BOOT-H) |
| 1523 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1524 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot -Im2/gm2-libiberty -I$(srcdir)/m2/gm2-libiberty/ $(INCLUDES) $< -o $@ |
| 1525 |
$(POSTCOMPILE) |
| 1526 |
|
| 1527 |
m2/gm2-libs-boot/errno.o: $(srcdir)/m2/gm2-libs-ch/errno.c m2/gm2-libs-boot/$(SRC_PREFIX)errno.h $(GM2-LIBS-BOOT-H) |
| 1528 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1529 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1530 |
$(POSTCOMPILE) |
| 1531 |
|
| 1532 |
m2/gm2-libs-boot/dtoa.o: $(srcdir)/m2/gm2-libs-ch/dtoa.cc $(GM2-LIBS-BOOT-H) |
| 1533 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1534 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs-boot -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1535 |
$(POSTCOMPILE) |
| 1536 |
|
| 1537 |
m2/gm2-libs-boot/ldtoa.o: $(srcdir)/m2/gm2-libs-ch/ldtoa.cc $(GM2-LIBS-BOOT-H) |
| 1538 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1539 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs-boot -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1540 |
$(POSTCOMPILE) |
| 1541 |
|
| 1542 |
m2/gm2-libs-boot/termios.o: $(srcdir)/m2/gm2-libs-ch/termios.c $(BUILD-LIBS-BOOT-H) $(GM2-LIBS-BOOT-H) |
| 1543 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1544 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1545 |
$(POSTCOMPILE) |
| 1546 |
|
| 1547 |
m2/gm2-libs-boot/SysExceptions.o: $(srcdir)/m2/gm2-libs-ch/SysExceptions.c \ |
| 1548 |
m2/gm2-libs-boot/$(SRC_PREFIX)SysExceptions.h $(GM2-LIBS-BOOT-H) |
| 1549 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1550 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1551 |
$(POSTCOMPILE) |
| 1552 |
|
| 1553 |
m2/gm2-libs-boot/SysStorage.o: $(srcdir)/m2/gm2-libs/SysStorage.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1554 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1555 |
$(MC) -o=m2/gm2-libs-boot/SysStorage.c $(srcdir)/m2/gm2-libs/SysStorage.mod |
| 1556 |
$(COMPILER) $(CM2DEP) -DIN_GCC -c $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) \ |
| 1557 |
-I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(MCINCLUDES) $(INCLUDES) \ |
| 1558 |
m2/gm2-libs-boot/SysStorage.c -o m2/gm2-libs-boot/SysStorage.o |
| 1559 |
$(POSTCOMPILE) |
| 1560 |
|
| 1561 |
m2/gm2-compiler-boot/M2GCCDeclare.o: $(srcdir)/m2/gm2-compiler/M2GCCDeclare.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1562 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1563 |
$(MC) $(MC_EXTENDED_OPAQUE) -o=m2/gm2-compiler-boot/M2GCCDeclare.c $< |
| 1564 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1565 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/M2GCCDeclare.c -o $@ |
| 1566 |
$(POSTCOMPILE) |
| 1567 |
|
| 1568 |
m2/gm2-compiler-boot/M2Error.o: $(srcdir)/m2/gm2-compiler/M2Error.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1569 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1570 |
$(MC) $(MC_EXTENDED_OPAQUE) -o=m2/gm2-compiler-boot/M2Error.c $< |
| 1571 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1572 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/M2Error.c -o $@ |
| 1573 |
$(POSTCOMPILE) |
| 1574 |
|
| 1575 |
m2/gm2-compiler-boot/%.o: $(srcdir)/m2/gm2-compiler/%.mod $(BUILD-BOOT-H) $(MCDEPS) $(BUILD-BOOT-H) |
| 1576 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1577 |
$(MC) -o=m2/gm2-compiler-boot/$*.c $(srcdir)/m2/gm2-compiler/$*.mod |
| 1578 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1579 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/$*.c -o $@ |
| 1580 |
$(POSTCOMPILE) |
| 1581 |
|
| 1582 |
m2/gm2-compiler-boot/%.o: m2/gm2-compiler-boot/%.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1583 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1584 |
$(MC) -o=m2/gm2-compiler-boot/$*.c m2/gm2-compiler-boot/$*.mod |
| 1585 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1586 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/$*.c -o $@ |
| 1587 |
$(POSTCOMPILE) |
| 1588 |
|
| 1589 |
m2/gm2-compiler-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-compiler/%.def $(MCDEPS) |
| 1590 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1591 |
$(MC) -o=$@ $(srcdir)/m2/gm2-compiler/$*.def |
| 1592 |
|
| 1593 |
m2/gm2-compiler-boot/P0SyntaxCheck.c: m2/gm2-compiler-boot/P0SyntaxCheck.mod $(MCDEPS) |
| 1594 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1595 |
$(MC) -o=m2/gm2-compiler-boot/P0SyntaxCheck.c m2/gm2-compiler-boot/P0SyntaxCheck.mod |
| 1596 |
|
| 1597 |
m2/gm2-compiler-boot/P0SyntaxCheck.o: m2/gm2-compiler-boot/P0SyntaxCheck.c $(MCDEPS) $(BUILD-BOOT-H) |
| 1598 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1599 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1600 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/P0SyntaxCheck.c -o $@ |
| 1601 |
$(POSTCOMPILE) |
| 1602 |
|
| 1603 |
m2/gm2-compiler-boot/P1Build.c: m2/gm2-compiler-boot/P1Build.mod $(MCDEPS) |
| 1604 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1605 |
$(MC) -o=m2/gm2-compiler-boot/P1Build.c m2/gm2-compiler-boot/P1Build.mod |
| 1606 |
|
| 1607 |
m2/gm2-compiler-boot/P1Build.o: m2/gm2-compiler-boot/P1Build.c $(MCDEPS) $(BUILD-BOOT-H) |
| 1608 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1609 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1610 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/P1Build.c -o $@ |
| 1611 |
$(POSTCOMPILE) |
| 1612 |
|
| 1613 |
m2/gm2-compiler-boot/P2Build.c: m2/gm2-compiler-boot/P2Build.mod $(MCDEPS) |
| 1614 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1615 |
$(MC) -o=m2/gm2-compiler-boot/P2Build.c m2/gm2-compiler-boot/P2Build.mod |
| 1616 |
|
| 1617 |
m2/gm2-compiler-boot/P2Build.o: m2/gm2-compiler-boot/P2Build.c $(MCDEPS) $(BUILD-BOOT-H) |
| 1618 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1619 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1620 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/P2Build.c -o $@ |
| 1621 |
$(POSTCOMPILE) |
| 1622 |
|
| 1623 |
m2/gm2-compiler-boot/P3Build.c: m2/gm2-compiler-boot/P3Build.mod $(MCDEPS) |
| 1624 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1625 |
$(MC) -o=m2/gm2-compiler-boot/P3Build.c m2/gm2-compiler-boot/P3Build.mod |
| 1626 |
|
| 1627 |
m2/gm2-compiler-boot/P3Build.o: m2/gm2-compiler-boot/P3Build.c $(MCDEPS) $(BUILD-BOOT-H) |
| 1628 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1629 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1630 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/P3Build.c -o $@ |
| 1631 |
$(POSTCOMPILE) |
| 1632 |
|
| 1633 |
m2/gm2-compiler-boot/PCBuild.c: m2/gm2-compiler-boot/PCBuild.mod $(MCDEPS) |
| 1634 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1635 |
$(MC) -o=m2/gm2-compiler-boot/PCBuild.c m2/gm2-compiler-boot/PCBuild.mod |
| 1636 |
|
| 1637 |
m2/gm2-compiler-boot/PCBuild.o: m2/gm2-compiler-boot/PCBuild.c $(MCDEPS) $(BUILD-BOOT-H) |
| 1638 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1639 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1640 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/PCBuild.c -o $@ |
| 1641 |
$(POSTCOMPILE) |
| 1642 |
|
| 1643 |
m2/gm2-compiler-boot/PHBuild.c: m2/gm2-compiler-boot/PHBuild.mod $(MCDEPS) |
| 1644 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1645 |
$(MC) -o=m2/gm2-compiler-boot/PHBuild.c m2/gm2-compiler-boot/PHBuild.mod |
| 1646 |
|
| 1647 |
m2/gm2-compiler-boot/PHBuild.o: m2/gm2-compiler-boot/PHBuild.c $(MCDEPS) $(BUILD-BOOT-H) |
| 1648 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1649 |
$(COMPILER) $(CM2DEP) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(GM2GCC) \ |
| 1650 |
$(GM2_BOOT_INCLUDES) $(MCINCLUDES) $(INCLUDES) m2/gm2-compiler-boot/PHBuild.c -o $@ |
| 1651 |
$(POSTCOMPILE) |
| 1652 |
|
| 1653 |
m2/gm2-compiler-boot/m2flex.o: m2/gm2-compiler/m2flex.c $(BUILD-BOOT-H) $(TIMEVAR_H) \ |
| 1654 |
$(BUILD-LIBS-BOOT-H) m2/gm2-compiler-boot/$(SRC_PREFIX)NameKey.h \ |
| 1655 |
$(CONFIG_H) m2/gm2config.h $(TARGET_H) $(PLUGIN_HEADERS) |
| 1656 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1657 |
$(COMPILER) $(CM2DEP) -c -g $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
| 1658 |
$(GM2GCC) $(INCLUDES) $(GM2_BOOT_INCLUDES) $< -o $@ |
| 1659 |
$(POSTCOMPILE) |
| 1660 |
|
| 1661 |
m2/gm2-compiler/m2flex.c: $(srcdir)/m2/m2.flex $(TIMEVAR_H) insn-attr-common.h |
| 1662 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1663 |
flex -t $< | sed -e 's/ malloc/ xmalloc/' | sed -e 's/ realloc/ xrealloc/' > $@ |
| 1664 |
|
| 1665 |
m2/gm2-libiberty/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libiberty/%.def $(MCDEPS) |
| 1666 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1667 |
$(MC) -o=$@ $(srcdir)/m2/gm2-libiberty/$*.def |
| 1668 |
|
| 1669 |
# The rules to build objects in gm2-compiler and gm2-libs directories. |
| 1670 |
|
| 1671 |
m2/gm2-compiler/%.o: $(srcdir)/m2/gm2-compiler/%.mod |
| 1672 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1673 |
$(GM2_1) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@ |
| 1674 |
$(POSTCOMPILE) |
| 1675 |
|
| 1676 |
m2/gm2-compiler/m2flex.o: m2/gm2-compiler/m2flex.c m2/gm2-libs/gm2-libs-host.h $(TIMEVAR_H) |
| 1677 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1678 |
$(COMPILER) $(CM2DEP) -c -g $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
| 1679 |
$(GM2GCC) -Im2/gm2-compiler-boot -Im2/gm2-libs-boot $< -o $@ |
| 1680 |
$(POSTCOMPILE) |
| 1681 |
|
| 1682 |
m2/gm2-compiler/%.o: m2/gm2-compiler/%.mod |
| 1683 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1684 |
$(GM2_1) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@ |
| 1685 |
$(POSTCOMPILE) |
| 1686 |
|
| 1687 |
m2/gm2-libs-iso/%.o: $(srcdir)/m2/gm2-libs-iso/%.c m2/gm2-libs/gm2-libs-host.h |
| 1688 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1689 |
$(CXX) $(CM2DEP) -DBUILD_GM2_LIBS_TARGET -DBUILD_GM2_LIBS -c $(CFLAGS) $(GM2_PICFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1690 |
$(POSTCOMPILE) |
| 1691 |
|
| 1692 |
m2/gm2-libs-iso/%.o: $(srcdir)/m2/gm2-libs-iso/%.mod |
| 1693 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1694 |
$(GM2_1) $(GM2_ISO_FLAGS) -c -B./ -Im2/gm2-libs-iso:$(srcdir)/m2/gm2-libs-iso -I$(srcdir)/m2/gm2-libs $< -o $@ |
| 1695 |
$(POSTCOMPILE) |
| 1696 |
|
| 1697 |
|
| 1698 |
# We build the cc1gm2$(exeext) from the boot stage and then proceed to build it |
| 1699 |
# again using itself. |
| 1700 |
|
| 1701 |
m2/gm2-libs/gm2-libs-host.h: |
| 1702 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1703 |
echo "Configuring to build libraries using native compiler" ; \ |
| 1704 |
NEW_SRCDIR=`${srcdir}/m2/tools-src/calcpath ../../ ${srcdir} m2/gm2-libs` ; \ |
| 1705 |
export NEW_SRCDIR ; \ |
| 1706 |
cd m2/gm2-libs ; \ |
| 1707 |
$(SHELL) -c '$${NEW_SRCDIR}/config-host \ |
| 1708 |
--srcdir=$${NEW_SRCDIR} \ |
| 1709 |
--target=$(target) \ |
| 1710 |
--program-suffix=$(exeext)' |
| 1711 |
|
| 1712 |
# Autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a |
| 1713 |
# cross compiler and the ../Makefile.in above appends this to INTERNAL_CFLAGS. |
| 1714 |
|
| 1715 |
m2/gm2config.h: m2/gm2config.aci |
| 1716 |
grep -v define\ PACKAGE_ $< > $@ |
| 1717 |
|
| 1718 |
m2/gm2config.aci: |
| 1719 |
NEW_SRCDIR=`${srcdir}/m2/tools-src/calcpath ../ ${srcdir} m2` ; \ |
| 1720 |
export NEW_SRCDIR ; \ |
| 1721 |
cd m2 ; \ |
| 1722 |
if echo $(INTERNAL_CFLAGS) | grep \\-DCROSS_DIRECTORY_STRUCTURE; then \ |
| 1723 |
AR=$(echo $(AR_FOR_TARGET) | sed -e "s/^ //") ; \ |
| 1724 |
export AR ; \ |
| 1725 |
RANLIB=$(echo $(RANLIB_FOR_TARGET) | sed -e "s/^ //") ; \ |
| 1726 |
export RANLIB ; \ |
| 1727 |
$(SHELL) -c '$${NEW_SRCDIR}/configure --srcdir=$${NEW_SRCDIR} \ |
| 1728 |
--target=$(target) --program-suffix=$(exeext) \ |
| 1729 |
--includedir=$(SYSTEM_HEADER_DIR) --libdir=$(libdir) \ |
| 1730 |
--libexecdir=$(libexecdir)' ; \ |
| 1731 |
else \ |
| 1732 |
$(SHELL) -c '$${NEW_SRCDIR}/configure --srcdir=$(NEW_SRCDIR) \ |
| 1733 |
--target=$(target) --program-suffix=$(exeext)' ; \ |
| 1734 |
fi |
| 1735 |
|
| 1736 |
$(objdir)/m2/gm2-libs-min/SYSTEM.def: $(GM2_PROG_DEP) |
| 1737 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1738 |
$(SHELL) $(srcdir)/m2/tools-src/makeSystem -fpim \ |
| 1739 |
$(srcdir)/m2/gm2-libs-min/SYSTEM.def \ |
| 1740 |
$(srcdir)/m2/gm2-libs-min/SYSTEM.mod \ |
| 1741 |
-I$(srcdir)/m2/gm2-libs-min -I$(srcdir)/m2/gm2-libs \ |
| 1742 |
"$(GM2_FOR_TARGET)" $@ |
| 1743 |
|
| 1744 |
$(objdir)/m2/gm2-libs/SYSTEM.def: $(GM2_PROG_DEP) |
| 1745 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1746 |
echo "GM2_FOR_TARGET $(GM2_FOR_TARGET)" |
| 1747 |
echo "GCC_FOR_TARGET $(GCC_FOR_TARGET)" |
| 1748 |
$(SHELL) $(srcdir)/m2/tools-src/makeSystem -fpim \ |
| 1749 |
$(srcdir)/m2/gm2-libs/SYSTEM.def \ |
| 1750 |
$(srcdir)/m2/gm2-libs/SYSTEM.mod \ |
| 1751 |
-I$(srcdir)/m2/gm2-libs \ |
| 1752 |
"$(GM2_FOR_TARGET)" $@ |
| 1753 |
|
| 1754 |
$(objdir)/m2/gm2-libs-iso/SYSTEM.def: $(GM2_PROG_DEP) |
| 1755 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1756 |
$(SHELL) $(srcdir)/m2/tools-src/makeSystem -fiso \ |
| 1757 |
$(srcdir)/m2/gm2-libs-iso/SYSTEM.def \ |
| 1758 |
$(srcdir)/m2/gm2-libs-iso/SYSTEM.mod \ |
| 1759 |
-I$(srcdir)/m2/gm2-libs-iso -I$(srcdir)/m2/gm2-libs \ |
| 1760 |
"$(GM2_FOR_TARGET)" $@ |
| 1761 |
|
| 1762 |
$(objdir)/m2/gm2-libs-coroutines/SYSTEM.def: $(GM2_PROG_DEP) |
| 1763 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1764 |
$(SHELL) $(srcdir)/m2/tools-src/makeSystem -fpim \ |
| 1765 |
$(srcdir)/m2/gm2-libs-coroutines/SYSTEM.def \ |
| 1766 |
$(srcdir)/m2/gm2-libs-coroutines/SYSTEM.mod \ |
| 1767 |
-I$(srcdir)/m2/gm2-libs-coroutines -I$(srcdir)/m2/gm2-libs-iso -I$(srcdir)/m2/gm2-libs \ |
| 1768 |
"$(GM2_FOR_TARGET)" $@ |
| 1769 |
|
| 1770 |
build-compiler: $(GM2-COMP-MODS:%.mod=m2/gm2-compiler/%.o) \ |
| 1771 |
$(GM2-AUTO-MODS:%.mod=m2/gm2-compiler/%.o) \ |
| 1772 |
m2/gm2-compiler/m2flex.o |
| 1773 |
|
| 1774 |
m2/gm2-compiler/gm2.a: build-compiler gm2$(exeext) |
| 1775 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1776 |
$(AR_FOR_TARGET) cr $@ $(GM2-COMP-MODS:%.mod=m2/gm2-compiler/%.o) \ |
| 1777 |
$(GM2-AUTO-MODS:%.mod=m2/gm2-compiler/%.o) |
| 1778 |
$(RANLIB) $@ |
| 1779 |
|
| 1780 |
m2/gm2-libs/libgm2.a: build-compiler gm2$(exeext) $(BUILD-LIBS) |
| 1781 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1782 |
$(AR) cr $@ $(GM2-LIBS-MODS:%.mod=m2/gm2-libs/%.o) \ |
| 1783 |
$(GM2-LIBS-CC:%.cc=m2/gm2-libs/%.o) \ |
| 1784 |
$(GM2-LIBS-C:%.c=m2/gm2-libs/%.o) |
| 1785 |
$(RANLIB) $@ |
| 1786 |
|
| 1787 |
m2/gm2-libs/%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-H) |
| 1788 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1789 |
$(GM2_1) -c $(GM2_FLAGS) -Im2/gm2-libs -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $< -o $@ |
| 1790 |
$(POSTCOMPILE) |
| 1791 |
|
| 1792 |
m2/gm2-libs/%.o: $(srcdir)/m2/gm2-libs-ch/%.c m2/gm2-libs/gm2-libs-host.h |
| 1793 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1794 |
$(CXX) $(CM2DEP) -DBUILD_GM2_LIBS -c $(CFLAGS) $(GM2_PICFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1795 |
$(POSTCOMPILE) |
| 1796 |
|
| 1797 |
m2/gm2-libs/%.o: $(srcdir)/m2/gm2-libs-ch/%.cc m2/gm2-libs/gm2-libs-host.h |
| 1798 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1799 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@ |
| 1800 |
$(POSTCOMPILE) |
| 1801 |
|
| 1802 |
m2/gm2-libs/choosetemp.o: m2/gm2-libs-ch/choosetemp.c m2/gm2-libiberty/Gchoosetemp.h m2/gm2-libs/gm2-libs-host.h |
| 1803 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1804 |
$(CXX) $(CM2DEP) -c $(CFLAGS) $(GM2_PICFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot -Im2/gm2-libiberty -I$(srcdir)/m2/gm2-libiberty/ $(INCLUDES) $< -o $@ |
| 1805 |
$(POSTCOMPILE) |
| 1806 |
|
| 1807 |
m2/gm2-libs-boot/libgm2.a: m2/boot-bin/mc$(exeext) $(BUILD-LIBS-BOOT) |
| 1808 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1809 |
$(AR) cr $@ $(GM2-LIBS-BOOT-MODS:%.mod=m2/gm2-libs-boot/%.o) \ |
| 1810 |
$(GM2-LIBS-BOOT-CC:%.cc=m2/gm2-libs-boot/%.o) \ |
| 1811 |
$(GM2-LIBS-BOOT-C:%.c=m2/gm2-libs-boot/%.o) |
| 1812 |
$(RANLIB) $@ |
| 1813 |
|
| 1814 |
m2/gm2-compiler-boot/gm2.a: m2/boot-bin/mc$(exeext) m2/boot-bin/mklink$(exeext) \ |
| 1815 |
$(BUILD-LIBS-BOOT) $(BUILD-COMPILER-BOOT) |
| 1816 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1817 |
$(AR) cr $@ $(GM2-COMP-BOOT-MODS:%.mod=m2/gm2-compiler-boot/%.o) \ |
| 1818 |
$(GM2-AUTO-MODS:%.mod=m2/gm2-compiler-boot/%.o) |
| 1819 |
$(RANLIB) $@ |
| 1820 |
|
| 1821 |
m2/gm2-compiler-boot/gm2.a: m2/boot-bin/mc$(exeext) |
| 1822 |
|
| 1823 |
m2/boot-bin/mklink$(exeext): $(srcdir)/m2/tools-src/mklink.c |
| 1824 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1825 |
$(CXX) $(CM2DEP) $(CFLAGS) $(LDFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-compiler-boot -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) $< -o $@ |
| 1826 |
$(POSTCOMPILE) |
| 1827 |
|
| 1828 |
m2/gm2-compiler-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-compiler-boot/%.def $(MCDEPS) |
| 1829 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1830 |
$(MC) --quiet -o=$@ $(srcdir)/m2/gm2-compiler-boot/$*.def |
| 1831 |
|
| 1832 |
m2/gm2-compiler/%.mod: $(srcdir)/m2/gm2-compiler/%.bnf $(PGE) |
| 1833 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1834 |
$(PGE) -k -l $< -o $@ |
| 1835 |
|
| 1836 |
m2/gm2-compiler-boot/%.mod: $(srcdir)/m2/gm2-compiler/%.bnf $(PGE) |
| 1837 |
-test -d $(@D) || $(mkinstalldirs) $(@D) |
| 1838 |
$(PGE) -k -l $< -o $@ |
| 1839 |
|
| 1840 |
check-m2: check-gm2 |
| 1841 |
check_m2: check-gm2 |
| 1842 |
check_gm2: check-gm2 |
| 1843 |
check-modula2: check-gm2 |
| 1844 |
check_modula2: check-gm2 |
| 1845 |
check-modula-2: check-gm2 |
| 1846 |
check_modula-2: check-gm2 |
| 1847 |
check_modula_2: check-gm2 |
| 1848 |
|
| 1849 |
lang_checks += check-gm2 |
| 1850 |
lang_checks_parallelized += check-gm2 |
| 1851 |
# For description see the check_$lang_parallelize comment in gcc/Makefile.in. |
| 1852 |
check_gm2_parallelize = 10000 |
| 1853 |
|
| 1854 |
check-gm2-local: $(GM2TESTSUITEDIR)/site.exp |
| 1855 |
-(rootme=`${PWD_COMMAND}`; export rootme; \ |
| 1856 |
srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \ |
| 1857 |
cd $(TESTSUITEDIR); \ |
| 1858 |
EXPECT=${EXPECT} ; export EXPECT ; \ |
| 1859 |
if [ -f $${rootme}/../expect/expect ] ; then \ |
| 1860 |
TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \ |
| 1861 |
export TCL_LIBRARY ; fi ; \ |
| 1862 |
$(RUNTEST) --tool gm2 --directory testsuite/m2/pim/pass) |
| 1863 |
|
| 1864 |
BUILD-PGE-O = \ |
| 1865 |
m2/pge-boot/GArgs.o \ |
| 1866 |
m2/pge-boot/GASCII.o \ |
| 1867 |
m2/pge-boot/GAssertion.o \ |
| 1868 |
m2/pge-boot/Gbnflex.o \ |
| 1869 |
m2/pge-boot/GDebug.o \ |
| 1870 |
m2/pge-boot/GDynamicStrings.o \ |
| 1871 |
m2/pge-boot/GFIO.o \ |
| 1872 |
m2/pge-boot/GIndexing.o \ |
| 1873 |
m2/pge-boot/GIO.o \ |
| 1874 |
m2/pge-boot/GLists.o \ |
| 1875 |
m2/pge-boot/GM2Dependent.o \ |
| 1876 |
m2/pge-boot/GM2EXCEPTION.o \ |
| 1877 |
m2/pge-boot/GM2RTS.o \ |
| 1878 |
m2/pge-boot/GNameKey.o \ |
| 1879 |
m2/pge-boot/GNumberIO.o \ |
| 1880 |
m2/pge-boot/GOutput.o \ |
| 1881 |
m2/pge-boot/Gpge.o \ |
| 1882 |
m2/pge-boot/GPushBackInput.o \ |
| 1883 |
m2/pge-boot/GRTExceptions.o \ |
| 1884 |
m2/pge-boot/GSFIO.o \ |
| 1885 |
m2/pge-boot/GStdIO.o \ |
| 1886 |
m2/pge-boot/GStorage.o \ |
| 1887 |
m2/pge-boot/GStrCase.o \ |
| 1888 |
m2/pge-boot/GStrIO.o \ |
| 1889 |
m2/pge-boot/GStrLib.o \ |
| 1890 |
m2/pge-boot/GSymbolKey.o \ |
| 1891 |
m2/pge-boot/GSysStorage.o \ |
| 1892 |
m2/pge-boot/Glibc.o \ |
| 1893 |
m2/pge-boot/Gwrapc.o \ |
| 1894 |
m2/pge-boot/Gerrno.o \ |
| 1895 |
m2/pge-boot/GUnixArgs.o \ |
| 1896 |
m2/pge-boot/Gtermios.o \ |
| 1897 |
m2/pge-boot/GSysExceptions.o \ |
| 1898 |
m2/pge-boot/Gabort.o \ |
| 1899 |
m2/pge-boot/Gmcrts.o \ |
| 1900 |
m2/pge-boot/main.o |
| 1901 |
|
| 1902 |
ifeq ($(M2_MAINTAINER),yes) |
| 1903 |
include m2/Make-maintainer |
| 1904 |
else |
| 1905 |
m2/pge-boot/%.o: m2/pge-boot/%.c m2/gm2-libs/gm2-libs-host.h m2/gm2config.h |
| 1906 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1907 |
$(CXX) $(CM2DEP) $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) $(INCLUDES) -I$(srcdir)/m2/pge-boot -Im2/gm2-libs -g -c $< -o $@ |
| 1908 |
$(POSTCOMPILE) |
| 1909 |
|
| 1910 |
m2/pge-boot/%.o: m2/pge-boot/%.cc m2/gm2-libs/gm2-libs-host.h m2/gm2config.h |
| 1911 |
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR) |
| 1912 |
$(CXX) $(CM2DEP) $(CXXFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) $(INCLUDES) -I$(srcdir)/m2/pge-boot -Im2/gm2-libs -g -c $< -o $@ |
| 1913 |
$(POSTCOMPILE) |
| 1914 |
|
| 1915 |
$(PGE): $(BUILD-PGE-O) |
| 1916 |
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(BUILD-PGE-O) -lm |
| 1917 |
|
| 1918 |
endif |