| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- GM2 = /home/eric/bin/Modula2/Gm2/bin/gm2
- CC = cc
- FLAGS = -fiso
- # The whole-program link must be two phases. A single invocation trips gm2's
- # pass-3 rollup on a compiler-size program ("too many errors in pass 3"), so
- # the import closure is generated first and the link then consumes it. Phase 1
- # exiting 1 is the expected rollup, hence the `|| true`.
- MODS = Shell Term TermCfg Keys Posix TextBuf Editor CompilerShared CompilerUtil CompilerSource CompilerSymbols CompilerLex CompilerExpr CompilerIO CompilerEmit Compiler Runtime Linker Exec86
- LINK = Shell.mod Term.o TermCfg.o Keys.o Posix.o TextBuf.o Editor.o CompilerShared.o CompilerUtil.o CompilerSource.o CompilerSymbols.o CompilerLex.o CompilerExpr.o CompilerIO.o CompilerEmit.o Compiler.o Runtime.o Linker.o Exec86.o
- all: tpshell tp3cfg
- tpshell: $(MODS:%=%.o) Shell.mod Makefile
- $(GM2) $(FLAGS) -fgen-module-list=tpshell.lst -o /dev/null $(LINK) || true
- $(GM2) $(FLAGS) -fuse-list=tpshell.lst -o $@ $(LINK)
- # The terminal configurator: writes the TEXT file TP3.TRM, never patches
- # tpshell. Same two-phase link (same pass-3 rollup).
- tp3cfg: Tp3Cfg.o TermCfg.o Posix.o Tp3Cfg.mod Makefile
- $(GM2) $(FLAGS) -fgen-module-list=tp3cfg.lst -o /dev/null Tp3Cfg.mod TermCfg.o Posix.o || true
- $(GM2) $(FLAGS) -fuse-list=tp3cfg.lst -o $@ Tp3Cfg.mod TermCfg.o Posix.o
- Tp3Cfg.o: Tp3Cfg.mod TermCfg.def Posix.def
- $(GM2) $(FLAGS) -c Tp3Cfg.mod
- Shell.o: Shell.mod Term.def Posix.def Editor.def TextBuf.def Compiler.def Linker.def
- $(GM2) $(FLAGS) -c Shell.mod
- Term.o: Term.mod Term.def TermCfg.def Posix.def
- $(GM2) $(FLAGS) -c Term.mod
- TermCfg.o: TermCfg.mod TermCfg.def Posix.def
- $(GM2) $(FLAGS) -c TermCfg.mod
- Keys.o: Keys.mod Keys.def TermCfg.def Posix.def
- $(GM2) $(FLAGS) -c Keys.mod
- TextBuf.o: TextBuf.mod TextBuf.def
- $(GM2) $(FLAGS) -c TextBuf.mod
- Editor.o: Editor.mod Editor.def Term.def TextBuf.def Posix.def Keys.def
- $(GM2) $(FLAGS) -c Editor.mod
- Posix.o: Posix.c Posix.def
- $(CC) -c Posix.c
- CompilerShared.o: CompilerShared.mod CompilerShared.def
- $(GM2) $(FLAGS) -c CompilerShared.mod
- CompilerUtil.o: CompilerUtil.mod CompilerUtil.def
- $(GM2) $(FLAGS) -c CompilerUtil.mod
- CompilerSource.o: CompilerSource.mod CompilerSource.def CompilerShared.def
- $(GM2) $(FLAGS) -c CompilerSource.mod
- CompilerSymbols.o: CompilerSymbols.mod CompilerSymbols.def CompilerShared.def CompilerSource.def CompilerUtil.def
- $(GM2) $(FLAGS) -c CompilerSymbols.mod
- CompilerLex.o: CompilerLex.mod CompilerLex.def CompilerShared.def CompilerSource.def CompilerUtil.def CompilerSymbols.def
- $(GM2) $(FLAGS) -c CompilerLex.mod
- CompilerExpr.o: CompilerExpr.mod CompilerExpr.def Compiler.def CompilerShared.def
- $(GM2) $(FLAGS) -c CompilerExpr.mod
- CompilerIO.o: CompilerIO.mod CompilerIO.def Compiler.def CompilerExpr.def CompilerShared.def
- $(GM2) $(FLAGS) -c CompilerIO.mod
- CompilerEmit.o: CompilerEmit.mod CompilerEmit.def CompilerShared.def
- $(GM2) $(FLAGS) -c CompilerEmit.mod
- Compiler.o: Compiler.mod Compiler.def TextBuf.def Runtime.def CompilerShared.def CompilerUtil.def CompilerSource.def CompilerSymbols.def CompilerLex.def CompilerExpr.def CompilerIO.def CompilerEmit.def
- $(GM2) $(FLAGS) -c Compiler.mod
- Runtime.o: Runtime.mod Runtime.def
- $(GM2) $(FLAGS) -c Runtime.mod
- Linker.o: Linker.mod Linker.def Compiler.def Posix.def
- $(GM2) $(FLAGS) -c Linker.mod
- # Exec86.def is HAND-MAINTAINED (see its own header): gm2 checks Exec86.mod
- # against it and never rewrites it, so it is a prerequisite on purpose - an
- # interface change that forgets the .def must not link.
- Exec86.o: Exec86.mod Exec86.def
- $(GM2) $(FLAGS) -c Exec86.mod
- clean:
- rm -f *.o tpshell tpshell.lst tp3cfg tp3cfg.lst
- .PHONY: all clean
|