3 # GNU Mes --- Maxwell Equations of Software
4 # Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
6 # This file is part of GNU Mes.
8 # GNU Mes is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or (at
11 # your option) any later version.
13 # GNU Mes is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
23 if test "$1" = "help"; then
26 ./build.sh to build mes
27 ./check.sh to check mes
28 ./install.sh to install mes
33 if test "$V" = 2; then
41 echo "Applying courage"
45 ${SHELL} ${srcdest}build-aux/build-scaffold.sh
47 if test -n "$GUILE" -a "$GUILE" != true; then
48 ${SHELL} ${srcdest}build-aux/build-guile.sh
59 if test $mes_libc = mes; then
70 -I ${srcdir}/../include
71 -I ${srcdir}/../include/$mes_kernel/$mes_cpu
78 if test $mes_libc = mes; then
94 if test -z "$srcdest"; then
98 if test $compiler = gcc; then
103 -I ${srcdest}include/$mes_kernel/$mes_cpu
105 ${SHELL} ${srcdest}build-aux/build-lib.sh
108 compiler=gcc ${SHELL} ${srcdest}build-aux/build-source-lib.sh
112 if test $compiler = gcc; then
122 -I ${srcdest}include/$mes_kernel/$mes_cpu
124 ${SHELL} ${srcdest}build-aux/build-mes.sh
129 cp config.sh mescc-lib
131 sed -i s,mes_libc=system,mes_libc=mes, config.sh
133 cp -p ../include/mes/config.h include/mes/config.h
134 sed -i 's,#define SYSTEM_LIBC 1,#undef SYSTEM_LIBC,' include/mes/config.h
135 if test -z "$srcdest"; then
143 -I ${srcdest}include/$mes_kernel/$mes_cpu
146 AR="${srcdest}pre-inst-env mesar"
147 CC="${srcdest}pre-inst-env mescc -m $mes_bits"
148 ${SHELL} ${srcdest}build-aux/build-lib.sh
149 ${SHELL} ${srcdest}build-aux/build-source-lib.sh