2017-04-02 16:50:07 +00:00
|
|
|
SHELL:=bash
|
2017-04-17 00:24:20 +00:00
|
|
|
export SHELL
|
2017-05-21 20:25:02 +00:00
|
|
|
.export: SHELL
|
2017-04-12 19:27:59 +00:00
|
|
|
QUIET:=@
|
2017-04-02 16:50:07 +00:00
|
|
|
|
2016-10-15 22:34:23 +00:00
|
|
|
default: all
|
|
|
|
|
2017-04-12 19:27:59 +00:00
|
|
|
MES_DEBUG:=1
|
2017-05-21 20:25:02 +00:00
|
|
|
CFLAGS:=--std=gnu99 -O0 -g --include libc-gcc.c
|
2017-06-25 07:33:55 +00:00
|
|
|
HEX2_FLAGS:=--LittleEndian --Architecture 1 --BaseAddress 0x1000000
|
2016-10-15 22:34:23 +00:00
|
|
|
OUT:=out
|
2016-07-09 21:12:25 +00:00
|
|
|
|
2017-04-12 19:27:59 +00:00
|
|
|
SUBDIRS:=\
|
|
|
|
module\
|
|
|
|
src\
|
|
|
|
scaffold\
|
|
|
|
scripts\
|
2017-06-23 18:18:09 +00:00
|
|
|
stage0\
|
2017-04-12 19:27:59 +00:00
|
|
|
tests\
|
2017-05-04 17:41:45 +00:00
|
|
|
tinycc\
|
2016-10-12 21:40:11 +00:00
|
|
|
#
|
|
|
|
|
2017-04-12 19:27:59 +00:00
|
|
|
include make/common.make
|
|
|
|
-include .local.make
|
2016-12-19 18:41:43 +00:00
|
|
|
|
2017-05-28 16:32:53 +00:00
|
|
|
build-scripts:
|
|
|
|
make --dry-run MES=$(OUT)/mes CC= CC32= GUILE= MES_BOOTSTRAP=1 > $(OUT)/make.sh
|
|
|
|
make --dry-run MES=$(OUT)/mes CC= CC32= GUILE= MES_BOOTSTRAP=1 | tail +$(wc -l make.sh) > $(OUT)/make-check.sh
|
|
|
|
make --dry-run MES=$(OUT)/mes CC= CC32= GUILE= MES_BOOTSTRAP=1 | tail +$(wc -l make.sh) > $(OUT)/make-install.sh
|
|
|
|
|
|
|
|
make --dry-run > $(OUT)/make-dev.sh
|
|
|
|
make --dry-run | tail +$(wc -l make.sh) > $(OUT)/make-dev-check.sh
|
|
|
|
make --dry-run | tail +$(wc -l make.sh) > $(OUT)/make-dev-install.sh
|
|
|
|
|
2016-10-15 22:34:23 +00:00
|
|
|
help: help-top
|
|
|
|
|
|
|
|
install: all
|
|
|
|
release: all
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo
|
|
|
|
|
|
|
|
define HELP_TOP
|
|
|
|
Usage: make [OPTION]... [TARGET]...
|
|
|
|
|
|
|
|
Targets:
|
2017-04-12 19:27:59 +00:00
|
|
|
all update everything
|
2017-05-28 16:32:53 +00:00
|
|
|
build-scripts generate build scripts
|
2017-04-12 19:27:59 +00:00
|
|
|
check run unit tests
|
|
|
|
clean remove all generated stuff
|
|
|
|
dist create tarball in $(TARBALL)
|
|
|
|
distclean also clean configuration
|
|
|
|
maintainer-clean also clean expensive targets [$(strip $(MAINTAINER-CLEAN))]
|
|
|
|
mescc compile cc/main.c to a.out
|
|
|
|
install install in $$(DESTDIR)$$(PREFIX) [$(DESTDIR)$(PREFIX)]
|
|
|
|
release make a release
|
|
|
|
update-hash update hash in guix.scm
|
2016-10-15 22:34:23 +00:00
|
|
|
endef
|
|
|
|
export HELP_TOP
|
|
|
|
help-top:
|
|
|
|
@echo "$$HELP_TOP"
|