add build and rutime rebuild

This commit is contained in:
danyaberezun 2024-02-06 15:05:19 +01:00 committed by Roman Venediktov
parent db9067b748
commit b532e90ea0

View file

@ -1,6 +1,7 @@
EXECUTABLE = src/lamac EXECUTABLE = src/lamac
INSTALL ?= install -v INSTALL ?= install -v
MKDIR ?= mkdir MKDIR ?= mkdir
BUILDDIR = build
.PHONY: all regression .PHONY: all regression
@ -8,13 +9,22 @@ all:
$(MAKE) -C src $(MAKE) -C src
$(MAKE) -C runtime $(MAKE) -C runtime
# $(MAKE) -C byterun # $(MAKE) -C byterun
# $(MAKE) -C stdlib $(MAKE) -C stdlib
# $(MAKE) -C runtime unit_tests.o # $(MAKE) -C runtime unit_tests.o
# $(MAKE) -C runtime invariants_check.o # $(MAKE) -C runtime invariants_check.o
# $(MAKE) -C runtime invariants_check_debug_print.o # $(MAKE) -C runtime invariants_check_debug_print.o
STD_FILES=$(shell ls stdlib/*.[oi] stdlib/*.lama runtime/runtime.a runtime/Std.i) STD_FILES=$(shell ls stdlib/*.[oi] stdlib/*.lama runtime/runtime.a runtime/Std.i)
remake_runtime:
$(MAKE) -C runtime clean
$(MAKE) -C runtime all
copy_to_build: all
mkdir -p $(BUILDDIR)
cp runtime/Std.i runtime/runtime.a stdlib/* $(BUILDDIR)
install: all install: all
$(INSTALL) $(EXECUTABLE) `opam var bin` $(INSTALL) $(EXECUTABLE) `opam var bin`
$(MKDIR) -p `opam var share`/Lama $(MKDIR) -p `opam var share`/Lama
@ -49,3 +59,4 @@ clean:
$(MAKE) clean -C regression $(MAKE) clean -C regression
$(MAKE) clean -C byterun $(MAKE) clean -C byterun
$(MAKE) clean -C bench $(MAKE) clean -C bench
rm -rf $(BUILDDIR)