diff --git a/Makefile b/Makefile index 5755409e..3d08650e 100644 --- a/Makefile +++ b/Makefile @@ -240,7 +240,7 @@ install: $(JANET_TARGET) cp janet.1 $(MANPATH) test-install: - cd test/install && janet test + cd test/install && rm -rf build && janet test uninstall: -rm $(BINDIR)/../$(JANET_TARGET) diff --git a/tools/cook.janet b/tools/cook.janet index 28597eca..7803d30f 100644 --- a/tools/cook.janet +++ b/tools/cook.janet @@ -3,6 +3,7 @@ # Windows is the OS outlier (def- is-win (= (os/which) :windows)) +(def- is-mac (= (os/which) :macos)) (def- sep (if is-win "\\" "/")) (def- objext (if is-win ".obj" ".o")) (def- modext (if is-win ".dll" ".so")) @@ -93,7 +94,11 @@ # Defaults (def OPTIMIZE 2) (def CC (if is-win "cl" "cc")) -(def LD (if is-win "link" (string CC " -shared"))) +(def LD (if is-win + "link" + (string CC + " -shared" + (if is-mac " -undefined dynamic_lookup" "")))) (def CFLAGS (string (if is-win "/I" "-I") module/*syspath*