2019-10-23 17:08:50 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright (C) 2019 Jeremiah Orians <jeremiah@pdp10.guru>
|
|
|
|
# This file is part of Gnu Mes
|
|
|
|
#
|
|
|
|
# Gnu Mes is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# Gnu Mes is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Gnu Mes. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
# Usage:
|
|
|
|
# kaem --verbose --strict
|
|
|
|
# bin/mes-m2 --boot scaffold/boot/14-exit.scm
|
|
|
|
# bin/mes-m2 --boot scaffold/boot/15-display.scm
|
|
|
|
|
|
|
|
M2-Planet \
|
|
|
|
--debug \
|
|
|
|
--architecture x86 \
|
|
|
|
-f lib/linux/x86-mes-m2/crt1.c \
|
|
|
|
-f lib/linux/x86-mes-m2/mini.c \
|
|
|
|
-f lib/m2/exit.c \
|
|
|
|
-f lib/m2/write.c \
|
|
|
|
-f lib/linux/x86-mes-m2/syscall.c \
|
|
|
|
-f include/linux/x86/syscall.h \
|
|
|
|
-f lib/m2/brk.c \
|
|
|
|
-f lib/m2/malloc.c \
|
|
|
|
-f lib/m2/memset.c \
|
|
|
|
-f lib/m2/read.c \
|
|
|
|
-f lib/m2/fdgetc.c \
|
|
|
|
-f lib/stdio/getchar.c \
|
|
|
|
-f lib/m2/putchar.c \
|
|
|
|
-f lib/m2/open.c \
|
|
|
|
-f lib/m2/mes_open.c \
|
|
|
|
-f lib/m2/strlen.c \
|
|
|
|
-f lib/m2/eputs.c \
|
2019-10-24 08:09:15 +01:00
|
|
|
-f lib/m2/fdputc.c \
|
|
|
|
-f lib/mes/eputc.c \
|
2019-10-23 17:08:50 +01:00
|
|
|
\
|
|
|
|
-f include/mes/mes.h.m2 \
|
|
|
|
-f include/mes/m2.h.m2 \
|
|
|
|
-f include/mes/builtins.h.m2 \
|
|
|
|
-f include/mes/constants.h.m2 \
|
|
|
|
-f include/mes/symbols.h.m2 \
|
|
|
|
\
|
|
|
|
-f lib/mes/__assert_fail.c \
|
|
|
|
-f lib/mes/assert_msg.c \
|
|
|
|
\
|
|
|
|
-f lib/m2/fdputc.c \
|
|
|
|
-f lib/m2/strncmp.c \
|
|
|
|
-f lib/m2/getenv.c \
|
|
|
|
-f lib/mes/fdputs.c.m2 \
|
|
|
|
-f lib/m2/ntoab.c \
|
|
|
|
-f lib/ctype/isdigit.c.m2 \
|
|
|
|
-f lib/ctype/isxdigit.c.m2 \
|
|
|
|
-f lib/ctype/isspace.c.m2 \
|
|
|
|
-f lib/ctype/isnumber.c.m2 \
|
|
|
|
-f lib/m2/abtol.c \
|
|
|
|
-f lib/m2/atoi.c \
|
2019-10-24 08:09:15 +01:00
|
|
|
-f lib/m2/memcpy.c \
|
2019-10-23 17:08:50 +01:00
|
|
|
-f lib/stdlib/free.c \
|
|
|
|
-f lib/stdlib/realloc.c.m2 \
|
2019-10-24 08:09:15 +01:00
|
|
|
-f lib/m2/strcpy.c \
|
2019-10-23 17:08:50 +01:00
|
|
|
-f lib/mes/itoa.c.m2 \
|
|
|
|
-f lib/mes/fdungetc.c.m2 \
|
2019-10-24 08:09:15 +01:00
|
|
|
-f lib/m2/setenv.c \
|
|
|
|
-f lib/m2/access.c \
|
|
|
|
-f lib/m2/chmod.c \
|
|
|
|
-f lib/m2/isatty.c \
|
|
|
|
-f lib/m2/fork.c \
|
|
|
|
-f lib/m2/execve.c \
|
|
|
|
-f lib/m2/execv.c \
|
|
|
|
-f lib/m2/waitpid.c \
|
|
|
|
-f lib/m2/clock_gettime.c \
|
|
|
|
-f lib/m2/time.c \
|
|
|
|
-f lib/m2/_getcwd.c \
|
|
|
|
-f lib/m2/getcwd.c \
|
|
|
|
-f lib/m2/dup.c \
|
|
|
|
-f lib/m2/dup2.c \
|
|
|
|
-f lib/m2/unlink.c \
|
|
|
|
-f lib/m2/strcmp.c \
|
|
|
|
-f lib/m2/memcmp.c \
|
2019-10-23 17:08:50 +01:00
|
|
|
-f src/builtins.c.m2 \
|
|
|
|
-f src/display.c.m2 \
|
|
|
|
-f src/eval-apply.c.m2 \
|
|
|
|
-f src/gc.c.m2 \
|
|
|
|
-f src/hash.c.m2 \
|
|
|
|
-f src/lib.c.m2 \
|
|
|
|
-f src/math.c.m2 \
|
|
|
|
-f src/mes.c.m2 \
|
|
|
|
-f src/module.c.m2 \
|
|
|
|
-f src/posix.c.m2 \
|
|
|
|
-f src/reader.c.m2 \
|
|
|
|
-f src/string.c.m2 \
|
|
|
|
-f src/struct.c.m2 \
|
|
|
|
-f src/symbols.c.m2 \
|
|
|
|
-f src/vector.c.m2 \
|
|
|
|
-o bin/mes.M1
|
|
|
|
|
|
|
|
blood-elf -f bin/mes.M1 -o bin/mes.blood-elf-M1
|
|
|
|
|
|
|
|
M1 \
|
|
|
|
--LittleEndian \
|
|
|
|
--architecture x86 \
|
|
|
|
-f lib/m2/x86/x86_defs.M1 \
|
|
|
|
-f lib/x86-mes/x86.M1 \
|
|
|
|
-f lib/linux/x86-mes-m2/crt1.M1 \
|
|
|
|
-f bin/mes.M1 \
|
|
|
|
-f bin/mes.blood-elf-M1 \
|
|
|
|
-o bin/mes.hex2
|
|
|
|
|
|
|
|
hex2 \
|
|
|
|
--LittleEndian \
|
|
|
|
--architecture x86 \
|
|
|
|
--BaseAddress 0x1000000 \
|
|
|
|
--exec_enable \
|
|
|
|
-f lib/x86-mes/elf32-header.hex2 \
|
|
|
|
-f bin/mes.hex2 \
|
|
|
|
-f lib/m2/missing.hex2 \
|
|
|
|
-o bin/mes-m2
|
|
|
|
|
|
|
|
echo Running mes-m2
|
|
|
|
./bin/mes-m2 --boot scaffold/boot/14-exit.scm
|
|
|
|
#./bin/mes-m2 --boot scaffold/boot/15-display.scm
|