996c449a81
* module/mes/libc-i386.mes (i386:_start): Push environment pointer. * module/mes/libc.mes (g_environment): New global. (_env): New function. (_start): Use it to set g_environment. (getenv): New function. * lib/mlibc.c (strncmp): New function. (getenv): Implement. * lib/mstart.c (_start): Set g_environment. * module/mes/libc.mes (strncmp): New function. (libc): Add it. * scaffold/t.c: (array_ref): Test it.
48 lines
870 B
Makefile
48 lines
870 B
Makefile
SHELL:=bash
|
|
export SHELL
|
|
QUIET:=@
|
|
|
|
default: all
|
|
|
|
MES_DEBUG:=1
|
|
CFLAGS:=--std=gnu99 -O0 -g
|
|
OUT:=out
|
|
|
|
SUBDIRS:=\
|
|
module\
|
|
src\
|
|
scaffold\
|
|
scripts\
|
|
tests\
|
|
#
|
|
|
|
include make/common.make
|
|
-include .local.make
|
|
|
|
help: help-top
|
|
|
|
install: all
|
|
release: all
|
|
|
|
help:
|
|
@echo
|
|
|
|
define HELP_TOP
|
|
Usage: make [OPTION]... [TARGET]...
|
|
|
|
Targets:
|
|
all update everything
|
|
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"
|