link() fixups
This commit is contained in:
parent
95a6cfcfd9
commit
f1cc21d7b5
|
@ -48,6 +48,9 @@ public class VMControlLibrary {
|
||||||
private static final String VMCONTROL_DLL =
|
private static final String VMCONTROL_DLL =
|
||||||
VMCONTROL + "lib.dll";
|
VMCONTROL + "lib.dll";
|
||||||
|
|
||||||
|
private static final String VMCONTROL_SO =
|
||||||
|
VMCONTROL + ".so";
|
||||||
|
|
||||||
private static final String VMCONTROL_OBJ =
|
private static final String VMCONTROL_OBJ =
|
||||||
getProperty("vmcontrol.o", "control-only/" + VMCONTROL + ".o");
|
getProperty("vmcontrol.o", "control-only/" + VMCONTROL + ".o");
|
||||||
|
|
||||||
|
@ -99,7 +102,7 @@ public class VMControlLibrary {
|
||||||
public static void link()
|
public static void link()
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
link(VMCONTROL + ".so");
|
link(VMCONTROL_SO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void linkWin32() {
|
private static void linkWin32() {
|
||||||
|
@ -168,6 +171,10 @@ public class VMControlLibrary {
|
||||||
}
|
}
|
||||||
|
|
||||||
File out = new File(name).getAbsoluteFile();
|
File out = new File(name).getAbsoluteFile();
|
||||||
|
if (out.isDirectory()) {
|
||||||
|
out = new File(out, VMCONTROL_SO);
|
||||||
|
}
|
||||||
|
|
||||||
setSharedLibrary(out.getPath());
|
setSharedLibrary(out.getPath());
|
||||||
|
|
||||||
if (out.exists()) {
|
if (out.exists()) {
|
||||||
|
@ -185,7 +192,8 @@ public class VMControlLibrary {
|
||||||
throw new FileNotFoundException(libssl.toString());
|
throw new FileNotFoundException(libssl.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!new File(dir, VMCONTROL_OBJ).exists()) {
|
File obj = new File(dir, VMCONTROL_OBJ);
|
||||||
|
if (!obj.exists()) {
|
||||||
//extract vmcontrol.o
|
//extract vmcontrol.o
|
||||||
String[] extract_args = {
|
String[] extract_args = {
|
||||||
TAR,
|
TAR,
|
||||||
|
@ -202,8 +210,8 @@ public class VMControlLibrary {
|
||||||
String[] link_args = {
|
String[] link_args = {
|
||||||
GCC,
|
GCC,
|
||||||
"-shared",
|
"-shared",
|
||||||
"-o", name,
|
"-o", out.getPath(),
|
||||||
VMCONTROL_OBJ,
|
obj.getPath(),
|
||||||
libssl.getPath()
|
libssl.getPath()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue