1 # Mes --- Maxwell Equations of Software
2 # Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
4 # This file is part of Mes.
6 # Mes is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or (at
9 # your option) any later version.
11 # Mes is distributed in the hope that it will be useful, but
12 # 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.
16 # You should have received a copy of the GNU General Public License
17 # along with Mes. If not, see <http://www.gnu.org/licenses/>.
19 GUILE_FLAGS:=--no-auto-compile -L . -L guile -C . -C guile
24 ./configure --prefix=$(PREFIX)
26 PHONY_TARGETS:= all all-go build check clean clean-go default doc help install install-info man\
27 cc mes mes-gcc mes-tcc
29 .PHONY: $(PHONY_TARGETS)
42 build-aux/build-cc32.sh
46 CC32=$(TCC) build-aux/build-cc32.sh
49 $(warning skipping mes-tcc: no tcc)
53 build-aux/build-mes.sh
59 build-aux/build-guile.sh
62 rm -f $(shell find . -name '*.go')
71 .config.make: ./configure
73 seed: all-go mes-gcc mes-tcc
75 cd $(TINYCC_SEED) && MES_PREFIX=$(PWD) ./refresh.sh
77 cd $(MES_SEED) && git reset --hard HEAD
78 MES=$(GUILE) GUILE=$(GUILE) SEED=1 build-aux/build-mes.sh
79 cd $(MES_SEED) && MES_PREFIX=$(PWD) ./refresh.sh
80 MES=$(GUILE) GUILE=$(GUILE) SEED=1 build-aux/build-mes.sh
81 cp lib/x86-mes/elf32-header.hex2\
83 lib/x86-mes/libc+tcc.S\
86 lib/x86-mes/libgetopt.S\
87 $(MESCC_TOOLS_SEED)/libs
88 cd $(MESCC_TOOLS_SEED) && MES_PREFIX=$(PWD) ./bootstrap.sh
90 doc/version.texi: doc/mes.texi GNUmakefile
91 (set `LANG= date -r $< +'%d %B %Y'`;\
92 echo "@set UPDATED $$1 $$2 $$3"; \
93 echo "@set UPDATED-MONTH $$2 $$3"; \
94 echo "@set EDITION $(VERSION)"; \
95 echo "@set VERSION $(VERSION)") > $@
101 $(warning skipping info: no makeinfo)
107 $(warning skipping man: no help2man)
112 doc/mes.info: doc/mes.texi doc/version.texi GNUmakefile
113 $(MAKEINFO) -o $@ -I doc $<
117 man: doc/mes.1 doc/mescc.1
119 doc/mes.1: src/mes.gcc-out
120 MES_ARENA=10000000 $(HELP2MAN) $< > $@
125 doc/mescc.1: src/mes.gcc-out scripts/mescc
126 MES_ARENA=10000000 $(HELP2MAN) $< > $@
129 Usage: make [OPTION]... [TARGET]...
132 all update everything
133 all-go update .go files
134 cc update src/mes.gcc-out
135 doc update documentation
136 mes-gcc update src/mes.mes-gcc-out
137 mes-tcc update src/mes.mes-tcc-out
140 clean run git clean -dfx
141 clean-go clean .go files
142 info update info documentation
143 install install in $(PREFIX)
144 install-info install info docs in $(PREFIX)/share/info
145 seed update mes-seed in $(MES_SEED)
151 include build-aux/export.make