mes/GNUmakefile
Jan Nieuwenhuizen 1de0f33020 mescc: Produce object files in hex2 format, remove hex3.
* GNUmakefile (HEX2_FLAGS): New variable.
* make/mescc-guile.make ($(OUT)/$(TARGET)): Use HEX2 for linking.
* make/mescc-mes.make ($(OUT)/$(TARGET)): Likewise.
* guile/mescc.scm (main): Remove hex3 support.
* scripts/mescc.mes (main): Likewise.
* stage0/elf32-0header.hex2: New file, merging of elf32.hex and elf32-header.hex2.
* stage0/elf-0footer.hex2: New file.
* stage0/elf32-header.hex2: Rename from elf32-header-exit-42.hex2,
  repurpose as generic debug heder.
* stage0/elf32-footer-single-main.hex2: Rename from elf32-footer-exit-42.hex2,
  repurpose as generic debug footer for single-main source.
* stage0/exit-42.c: New file.
* stage0/stage0.make ($(OUT)/0exit-42): Test 0header, 0footer.
  ($(OUT)/exit-42.guile): Test generic debug header, footer.
* stage0/elf32.hex2: Remove.
2017-06-25 09:33:55 +02:00

62 lines
1.5 KiB
Makefile

SHELL:=bash
export SHELL
.export: SHELL
QUIET:=@
default: all
MES_DEBUG:=1
CFLAGS:=--std=gnu99 -O0 -g --include libc-gcc.c
HEX2_FLAGS:=--LittleEndian --Architecture 1 --BaseAddress 0x1000000
OUT:=out
SUBDIRS:=\
module\
src\
scaffold\
scripts\
stage0\
tests\
tinycc\
#
include make/common.make
-include .local.make
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
help: help-top
install: all
release: all
help:
@echo
define HELP_TOP
Usage: make [OPTION]... [TARGET]...
Targets:
all update everything
build-scripts generate build scripts
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
endef
export HELP_TOP
help-top:
@echo "$$HELP_TOP"