5 @@ -22,12 +22,12 @@ MLTON_BASIC = mlton $(MLTON_FLAGS) -verbose $(MLTON_VERB) -output
6 MLTON_NATIVE := mlton -default-ann "redundantMatch error" -default-ann "sequenceNonUnit error"
7 MLTON_NATIVE += -link-opt "-lpthread -ldl -rdynamic" -cc-opt "-Iinclude" -default-ann "allowFFI true"
8 MLTON_NATIVE += -cc-opt "-I../externals/"
9 -MLTON_NATIVE += -link-opt "../externals/readline/libreadline.a ../externals/readline/libhistory.a"
10 +MLTON_NATIVE += -link-opt "$(shell pkg-config readline --libs)"
11 MLTON_NATIVE += -link-opt "$(shell pkg-config libpng --libs)"
13 # libreadline dependencies
14 ifeq ($(PLATFORM),osx)
15 -MLTON_NATIVE += -link-opt "-ltermcap"
16 +MLTON_NATIVE += -link-opt "-lncurses"
19 MLTON_NATIVE += -link-opt "-ltinfo"
20 @@ -122,9 +122,9 @@ endef
22 $(foreach rt,$(RUNTIMES),$(eval $(call runtime_template,$(rt))))
24 -c0rt/$(call dllname,c0rt): gc libbacktrace
25 +c0rt/$(call dllname,c0rt):
27 -unsafe/$(call dllname,unsafe): gc
28 +unsafe/$(call dllname,unsafe):
31 ### cc0 - the C0 compiler
32 @@ -222,7 +222,6 @@ NATIVE_COIN = $(NATIVE_CYMBOL) $(NATIVE_CALLING)
33 NATIVE_COIN += coin/c0readline.c
35 COIN_DEPS = $(CC0_DEPS) $(NATIVE_COIN) cymbol/cymbol*.cm cymbol/*.sml cymbol/*.mlb coin/coin*.cm coin/*.sml coin/*.sml
36 -COIN_DEPS += readline
42 @@ -15,9 +15,9 @@ TARGET = $(call dllname,$(LIBNAME))
45 # These libs are handled specially by this file
46 -NATIVELIBS = gc ncurses backtrace
48 C0LIBS = $(filter-out $(NATIVELIBS),$(REQUIRES))
49 -LIBS = -L$(abspath $(DEPTH)/lib) $(patsubst %,$(DEPTH)/lib/$(call dllname,%),$(C0LIBS))
50 +LIBS = -L$(abspath $(DEPTH)/lib)
53 # -fPIC is not supported on Windows and is not necessary there because we link statically