2017-07-02 10:03:29 +00:00
|
|
|
GUILE:=guile
|
2017-07-19 17:31:48 +00:00
|
|
|
GUILE_FLAGS:=--no-auto-compile -L . -L guile -C . -C guile
|
2017-04-02 16:50:07 +00:00
|
|
|
|
2017-07-02 10:03:29 +00:00
|
|
|
include .config.make
|
2016-10-15 22:34:23 +00:00
|
|
|
|
2018-06-02 09:41:06 +00:00
|
|
|
.config.make:
|
|
|
|
./configure
|
|
|
|
|
2018-04-29 16:38:57 +00:00
|
|
|
PHONY_TARGETS:= all all-go check clean clean-go default help install
|
2017-07-02 10:03:29 +00:00
|
|
|
.PHONY: $(PHONY_TARGETS)
|
2016-07-09 21:12:25 +00:00
|
|
|
|
2018-04-29 16:38:57 +00:00
|
|
|
default: all
|
2017-07-19 12:12:29 +00:00
|
|
|
|
2018-04-29 16:38:57 +00:00
|
|
|
all:
|
|
|
|
./build.sh
|
|
|
|
|
2018-05-27 04:59:36 +00:00
|
|
|
cc:
|
|
|
|
build-aux/build-cc.sh
|
|
|
|
|
2018-05-29 18:07:46 +00:00
|
|
|
mes-gcc:
|
|
|
|
build-aux/build-mes-gcc.sh
|
2018-05-27 04:59:36 +00:00
|
|
|
|
|
|
|
mes:
|
|
|
|
build-aux/build-mes.sh
|
|
|
|
|
2018-04-29 16:38:57 +00:00
|
|
|
clean:
|
2018-05-27 04:59:36 +00:00
|
|
|
git clean -dfx
|
2018-04-29 16:38:57 +00:00
|
|
|
|
|
|
|
all-go:
|
|
|
|
build-aux/build-guile.sh
|
|
|
|
|
|
|
|
clean-go:
|
|
|
|
rm -f $(shell find . -name '*.go')
|
|
|
|
|
|
|
|
check:
|
|
|
|
./check.sh
|
|
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
./install.sh
|
2017-07-19 17:53:21 +00:00
|
|
|
|
2017-07-19 12:12:29 +00:00
|
|
|
.config.make: ./configure
|
2018-04-29 16:38:57 +00:00
|
|
|
|
2018-05-25 06:05:02 +00:00
|
|
|
seed: all-go
|
2018-06-03 16:54:26 +00:00
|
|
|
build-aux/build-mes-gcc.sh
|
|
|
|
cd $(TINYCC_SEED) && MES_PREFIX=$(PWD) ./refresh.sh
|
2018-05-27 04:59:36 +00:00
|
|
|
cd $(MES_SEED) && git reset --hard HEAD
|
|
|
|
MES=$(GUILE) GUILE=$(GUILE) SEED=1 build-aux/build-mes.sh
|
|
|
|
cd $(MES_SEED) && MES_PREFIX=$(PWD) ./refresh.sh
|
|
|
|
MES=$(GUILE) GUILE=$(GUILE) SEED=1 build-aux/build-mes.sh
|
2018-06-16 04:37:20 +00:00
|
|
|
cp lib/x86-mes/elf32-header.hex2\
|
|
|
|
lib/x86-mes/x86.M1\
|
|
|
|
lib/x86-mes/libc+tcc.S\
|
|
|
|
lib/x86-mes/libc.S\
|
|
|
|
lib/x86-mes/crt1.S\
|
|
|
|
lib/x86-mes/libgetopt.S\
|
|
|
|
$(MESCC_TOOLS_SEED)/libs
|
|
|
|
cd $(MESCC_TOOLS_SEED) && MES_PREFIX=$(PWD) ./bootstrap.sh
|
2018-05-27 04:59:36 +00:00
|
|
|
|
|
|
|
define HELP_TOP
|
|
|
|
Usage: make [OPTION]... [TARGET]...
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
all update everything
|
|
|
|
all-go update .go files
|
|
|
|
cc update src/mes.gcc-out
|
2018-05-29 18:07:46 +00:00
|
|
|
mes-gcc update src/mes.mes-gcc-out
|
2018-05-27 04:59:36 +00:00
|
|
|
mes update src/mes
|
|
|
|
check run unit tests
|
|
|
|
clean run git clean -dfx
|
|
|
|
clean-go clean .go files
|
|
|
|
install install in $(PREFIX)
|
|
|
|
seed update mes-seed in $(MES_SEED)
|
|
|
|
endef
|
|
|
|
export HELP_TOP
|
|
|
|
help:
|
|
|
|
@echo "$$HELP_TOP"
|
2018-05-03 18:32:06 +00:00
|
|
|
|
|
|
|
ifdef PREFIX
|
|
|
|
export PREFIX
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef VERSION
|
|
|
|
export VERSION
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CC
|
|
|
|
export CC
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CC32
|
|
|
|
export CC32
|
|
|
|
endif
|
|
|
|
|
2018-05-27 04:59:36 +00:00
|
|
|
ifdef BLOOD_ELF
|
|
|
|
export BLOOD_ELF
|
|
|
|
endif
|
|
|
|
|
2018-05-03 18:32:06 +00:00
|
|
|
ifdef M1
|
|
|
|
export M1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef HEX2
|
|
|
|
export HEX2
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef GUILE
|
|
|
|
export GUILE
|
|
|
|
endif
|
|
|
|
|
2018-05-27 04:59:36 +00:00
|
|
|
ifdef GUILE_TOOLS
|
|
|
|
export GUILE_TOOLS
|
|
|
|
endif
|
|
|
|
|
2018-05-03 18:32:06 +00:00
|
|
|
ifdef GUILE_LOAD_PATH
|
|
|
|
export GUILE_LOAD_PATH
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef GUILE_LOAD_COMPILED_PATH
|
|
|
|
export GUILE_LOAD_COMPILED_PATH
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CFLAGS
|
|
|
|
export CFLAGS
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef C32FLAGS
|
|
|
|
export C32FLAGS
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef HEX2FLAGS
|
|
|
|
export HEX2FLAGS
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef M1FLAGS
|
|
|
|
export M1FLAGS
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MESCCFLAGS
|
|
|
|
export MESCCFLAGS
|
|
|
|
endif
|
|
|
|
|
2018-05-27 04:59:36 +00:00
|
|
|
ifdef MES_SEED
|
|
|
|
export MES_SEED
|
|
|
|
endif
|
2018-05-03 18:32:06 +00:00
|
|
|
|
2018-06-16 04:37:20 +00:00
|
|
|
ifdef MESCC_TOOLS_SEED
|
|
|
|
export MESCC_TOOLS_SEED
|
|
|
|
endif
|
|
|
|
|
2018-05-27 04:59:36 +00:00
|
|
|
ifdef TINYCC_SEED
|
|
|
|
export TINYCC_SEED
|
|
|
|
endif
|