1. james woodyatt
  2. oni

Commits

james woodyatt  committed 638448a

Move the C-language primitive static and dynamic libraries up to
the root of their component.

  • Participants
  • Parent commits 91b8e7d
  • Branches default

Comments (0)

Files changed (1)

File project/lang/OCaml.om

View file
             export
         return $(this)
     
+    ### Configuration-specific C-language library name
+    protected.specialized-name(config)=
+        if $(equal $(config), $"release")
+            return $(this.NAME)
+        else
+            return $(this.NAME)-$(config)
+    
     ### Auxillary composition method
     protected.compose-aux(config, cmo, cmx, dst)=
         private.outputs=
         private.clibs=
         export clibs outputs
         if $(defined this.CFILES)
+            dst=$(dirname $(dst))
             private.po=$(this.OCAMLC.c-primitives $(this.CFILES), $(dst))
-            clibs=$(this.OCAMLMKLIB.c-library $(this.NAME), $(po), $(dst))
+            private.name=$(specialized-name $(config))
+            clibs=$(this.OCAMLMKLIB.c-library $(name), $(po), $(dst))
             outputs+=$(clibs)
         olibs=$(this.OCAMLMKLIB.byte-library $(this.NAME), $(cmo), $(dst))
         $(olibs): $(clibs)
         search=
         export search
         foreach(r, $(this.LIBREFS))
-            search+=$(dir $(r.DIR)/$(config))
+            search+=$(dir $(r.DIR))
         return $(search)
     
     ### Auxillary composition method