From: Michael D. Lowis Date: Wed, 23 Aug 2017 15:14:29 +0000 (-0400) Subject: allow dynamic linking for ocamlc bytecode compiler. results in smaller but slower... X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=e7ae09a152a47505d0eea078c29ac80ce876d2c9;p=archive%2Ftide-ocaml.git allow dynamic linking for ocamlc bytecode compiler. results in smaller but slower distributable --- 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 $@ $^