]> git.mdlowis.com Git - archive/tide-ocaml.git/commitdiff
allow dynamic linking for ocamlc bytecode compiler. results in smaller but slower...
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 23 Aug 2017 15:14:29 +0000 (11:14 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 23 Aug 2017 15:14:29 +0000 (11:14 -0400)
Makefile

index c60b9ed8b5a7a07eed9382a33bf2ded6ce53e0be..67bab47296900df8c46c06f9de3e472d5048dcbd 100644 (file)
--- 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 $@ $^