shithub: mc

Download patch

ref: 46ed41336621a10e35d0febce05d0ac1a4dcfa48
parent: 94932c665b01982ed386de8fe958168001a95dec
author: Ori Bernstein <[email protected]>
date: Fri Oct 19 10:33:03 EDT 2012

Make builds a bit more OSX friendly

--- a/libstd/Makefile
+++ b/libstd/Makefile
@@ -30,7 +30,7 @@
 	cp start-$(SYS).s start.s
 
 test: libstd.a
-	myrbuild -b test test.myr -I.
+	../myrbuild/myrbuild -b test test.myr -I.
 
 
 $(MYRLIB): $(MYRSRC) $(ASMSRC)
--- a/myrbuild/myrbuild.c
+++ b/myrbuild/myrbuild.c
@@ -287,8 +287,7 @@
             die("Unknown file type %s", files[i]);
         lappend(&args, &nargs, strdup(buf));
     }
-    lappend(&args, &nargs, strdup("-L"));
-    snprintf(buf, sizeof buf, "%s%s", Instroot, "/myr/lib");
+    snprintf(buf, sizeof buf, "-L%s%s", Instroot, "/lib/myr");
     lappend(&args, &nargs, strdup(buf));
     for (i = 0; i < nincpaths; i++) {
         lappend(&args, &nargs, strdup("-L"));
@@ -295,8 +294,8 @@
         lappend(&args, &nargs, strdup(incpaths[i]));
     }
     for (i = 0; i < nlibs; i++) {
-        lappend(&args, &nargs, strdup("-l"));
-        lappend(&args, &nargs, strdup(libs[i]));
+        snprintf(buf, sizeof buf, "-l%s", libs[i]);
+        lappend(&args, &nargs, strdup(buf));
     }
     lappend(&args, &nargs, NULL);