diff --git a/Makefile.windows b/Makefile.windows index cbf43e4b..b2044561 100644 --- a/Makefile.windows +++ b/Makefile.windows @@ -1,20 +1,14 @@ all: jou.exe -config.jou: - echo "# auto-generated by Makefile" > config.jou - echo "@public" >> config.jou - echo "def get_jou_clang_path() -> byte*:" >> config.jou - echo " return NULL" >> config.jou - jou_bootstrap.exe: bootstrap.sh ./bootstrap.sh -jou.exe: jou_bootstrap.exe config.jou $(wildcard compiler/*.jou compiler/*/*.jou) +jou.exe: jou_bootstrap.exe $(wildcard compiler/*.jou compiler/*/*.jou) rm -rf compiler/jou_compiled && ./jou_bootstrap.exe -o jou.exe --linker-flags "$(wildcard libs/lib*.a)" compiler/main.jou # Does not delete tmp/bootstrap_cache because bootstrapping is slow. .PHONY: clean clean: bash -O extglob -c "rm -rvf tmp/!(bootstrap_cache)" - rm -vf *.exe config.jou + rm -vf *.exe find . -name jou_compiled -print -exec rm -rf '{}' + diff --git a/compiler/run.jou b/compiler/run.jou index a3a2c988..6ba156ea 100644 --- a/compiler/run.jou +++ b/compiler/run.jou @@ -3,10 +3,12 @@ import "stdlib/mem.jou" import "stdlib/io.jou" import "stdlib/process.jou" -import "../config.jou" import "./command_line_args.jou" import "./paths.jou" +if not WINDOWS: + import "../config.jou" + @public def run_linker(objpaths: byte**, exepath: byte*) -> None: @@ -38,7 +40,7 @@ def run_linker(objpaths: byte**, exepath: byte*) -> None: strcat(quoted_object_files, "\"") size = strlen(instdir) + strlen(quoted_object_files) + strlen(exepath) + strlen(linker_flags) + 100 - if get_jou_clang_path() != NULL: + if not WINDOWS: size += strlen(get_jou_clang_path()) command: byte* = malloc(size)