diff --git a/makefile b/makefile index 21f94eae..d6e02c49 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ SHELL = /usr/bin/env bash -MAKEFLAGS+= --no-print-directory +MAKEFLAGS+= --no-print-directory --no-builtin-rules # note: do not manually define any i_… arguments, or incremental compiling will not work properly! # various configurations @@ -167,10 +167,15 @@ endif ${MAKE} run_incremental_1 bd="$$bd" endif -run_incremental_1: builtins core base jit utils # build the final binary - @$(i_CC) ${CCFLAGS} -o ${OUTPUT} ${bd}/*.o $(ALL_LD_FLAGS) +run_incremental_1: ${bd}/BQN +ifneq (${bd}/BQN,${OUTPUT}) + @cp -f ${bd}/BQN ${OUTPUT} +endif @echo ${postmsg} +${bd}/BQN: builtins core base jit utils # build the final binary + @$(i_CC) ${CCFLAGS} -o ${bd}/BQN ${bd}/*.o $(ALL_LD_FLAGS) + CC_INC = $(i_CC) $(ALL_CC_FLAGS) -MMD -MP -MF # build individual object files core: ${addprefix ${bd}/, tyarr.o harr.o fillarr.o stuff.o derv.o mm.o heap.o} @@ -198,6 +203,8 @@ ${bd}/%.o: src/builtins/%.c @echo $< | cut -c 5- @$(CC_INC) $@.d -o $@ -c $< +.INTERMEDIATE: core base utils jit builtins + src/gen/customRuntime: @echo "Copying precompiled bytecode from the bytecode branch" git checkout remotes/origin/bytecode src/gen/{compiles,formatter,runtime0,runtime1,src,explain}