diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -50,8 +50,10 @@ MAP := $(B)/core/map COREINC := -Isrc/core -I$(MAP) --embed-dir=$(B)/core CORE_H := src/core/genome.h src/core/fops.h src/core/bops.h src/core/stack.h $(MAP)/memmap.h # the sources the compiler genome is built from, and the files it embeds -ZC_SRC := src/runtime/rt.zc src/core/core.zc src/compiler/compiler.zc -ZC_DEPS := $(ZC_SRC) src/lib/std.zc src/lib/icon.zc src/tools/build.zc +# the compiler is the files named in src/compiler/parts, in that order +ZC_PARTS := $(addprefix src/compiler/,$(shell cat src/compiler/parts)) +ZC_SRC := src/runtime/rt.zc src/core/core.zc $(ZC_PARTS) +ZC_DEPS := $(ZC_SRC) src/compiler/parts src/lib/std.zc src/lib/icon.zc src/tools/build.zc TOOLS := $(BIN)/zc0$(EXE) $(BIN)/mkgenome$(EXE) $(BIN)/genmap$(EXE) PROGS := $(BIN)/zy$(EXE) $(BIN)/zym$(EXE) $(BIN)/zclsp$(EXE) @@ -64,7 +66,7 @@ $(BIN): # genmap needs no map of its own; everything else is built against the one it writes $(BIN)/genmap$(EXE): src/tools/genmap.c | $(BIN) $(CC) $(CFLAGS) src/tools/genmap.c -o $@ -$(MAP)/memmap.h: $(BIN)/genmap$(EXE) src/runtime/rt.zc src/compiler/compiler.zc +$(MAP)/memmap.h: $(BIN)/genmap$(EXE) src/runtime/rt.zc src/compiler/parts $(ZC_PARTS) mkdir -p $(B)/core $(BIN)/genmap$(EXE) --preset default --check -o $(MAP) >$(B)/core/genmap.log 2>&1 || { cat $(B)/core/genmap.log; exit 1; } $(BIN)/zc0$(EXE): src/tools/zc0.c src/core/fops.h src/core/bops.h $(MAP)/memmap.h | $(BIN) |
