1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-18 14:44:48 +00:00

Add -undefined dynamic_lookup on mac.

This commit is contained in:
Calvin Rose 2019-03-03 15:18:17 -05:00
parent 009bed158b
commit 6158ec0ce5
2 changed files with 7 additions and 2 deletions

View File

@ -240,7 +240,7 @@ install: $(JANET_TARGET)
cp janet.1 $(MANPATH) cp janet.1 $(MANPATH)
test-install: test-install:
cd test/install && janet test cd test/install && rm -rf build && janet test
uninstall: uninstall:
-rm $(BINDIR)/../$(JANET_TARGET) -rm $(BINDIR)/../$(JANET_TARGET)

View File

@ -3,6 +3,7 @@
# Windows is the OS outlier # Windows is the OS outlier
(def- is-win (= (os/which) :windows)) (def- is-win (= (os/which) :windows))
(def- is-mac (= (os/which) :macos))
(def- sep (if is-win "\\" "/")) (def- sep (if is-win "\\" "/"))
(def- objext (if is-win ".obj" ".o")) (def- objext (if is-win ".obj" ".o"))
(def- modext (if is-win ".dll" ".so")) (def- modext (if is-win ".dll" ".so"))
@ -93,7 +94,11 @@
# Defaults # Defaults
(def OPTIMIZE 2) (def OPTIMIZE 2)
(def CC (if is-win "cl" "cc")) (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 (def CFLAGS (string
(if is-win "/I" "-I") (if is-win "/I" "-I")
module/*syspath* module/*syspath*