From e7ae09a152a47505d0eea078c29ac80ce876d2c9 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 23 Aug 2017 11:14:29 -0400 Subject: [PATCH] allow dynamic linking for ocamlc bytecode compiler. results in smaller but slower distributable --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c60b9ed..67bab47 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ # Toolchain Configuration #------------------------------------------------------------------------------- -# -nostdlib - Reimplement the Pervasives module to not suck. ifeq ($(NATIVE), 1) OC = ocamlopt OCFLAGS = -compact @@ -13,7 +12,7 @@ else OC = ocamlc OCFLAGS = MKLIB = ocamlmklib - MKLIBFLAGS = -custom + MKLIBFLAGS = OBJEXT = cmo LIBEXT = cma OLDFLAGS = @@ -26,7 +25,7 @@ endif all: tide clean: - $(RM) tide *.cm* *.o *.a + $(RM) tide *.cm* *.o *.a *.so env.$(LIBEXT): env.$(OBJEXT) env_set.o env_get.o env_unset.o tide: env.$(LIBEXT) tide.$(OBJEXT) @@ -34,10 +33,10 @@ tide: env.$(LIBEXT) tide.$(OBJEXT) # Implicit Rule Definitions #------------------------------------------------------------------------------- %: - $(OC) $(OCFLAGS) $(OLDFLAGS) -o $@ $^ -I . + $(OC) $(OLDFLAGS) -o $@ $^ -I . %.$(LIBEXT): - $(MKLIB) $(MKLIBFLAGS) $(OCFLAGS) -o $* $^ + $(MKLIB) $(MKLIBFLAGS) $(OCFLAGS) -o $* -oc $* $^ %.$(OBJEXT): %.ml $(OC) $(OCFLAGS) -c -o $@ $^ -- 2.49.0