Skip to content

Commit

Permalink
Improve code / xml formatting, opensciencemap#54
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Jul 12, 2016
1 parent e793e88 commit 43ca550
Show file tree
Hide file tree
Showing 133 changed files with 2,874 additions and 2,862 deletions.
164 changes: 82 additions & 82 deletions jni/src/JniBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,98 +5,98 @@
import com.badlogic.gdx.jnigen.NativeCodeGenerator;

public class JniBuilder {
public static void main(String[] args) throws Exception {
String[] headers = { ".", "libtess2/Include" };
String[] sources = {
"gl/utils.c",
"libtess2/Source/bucketalloc.c",
"libtess2/Source/dict.c",
"libtess2/Source/geom.c",
"libtess2/Source/mesh.c",
"libtess2/Source/priorityq.c",
"libtess2/Source/sweep.c",
"libtess2/Source/tess.c",
};
public static void main(String[] args) throws Exception {
String[] headers = {".", "libtess2/Include"};
String[] sources = {
"gl/utils.c",
"libtess2/Source/bucketalloc.c",
"libtess2/Source/dict.c",
"libtess2/Source/geom.c",
"libtess2/Source/mesh.c",
"libtess2/Source/priorityq.c",
"libtess2/Source/sweep.c",
"libtess2/Source/tess.c",
};

String cflags = " -Wall -std=c99 -O2 -ffast-math";
cflags += " -DNDEBUG"; /* disable debug in libtess2 */
String cflags = " -Wall -std=c99 -O2 -ffast-math";
cflags += " -DNDEBUG"; /* disable debug in libtess2 */

//BuildTarget win32home = BuildTarget
// .newDefaultTarget(TargetOs.Windows, false);
//win32home.compilerPrefix = "";
//win32home.buildFileName = "build-windows32home.xml";
//win32home.excludeFromMasterBuildFile = true;
//win32home.headerDirs = headers;
//win32home.cIncludes = sources;
//win32home.cFlags += cflags;
//win32home.cppFlags += cflags;
//BuildTarget win32home = BuildTarget
// .newDefaultTarget(TargetOs.Windows, false);
//win32home.compilerPrefix = "";
//win32home.buildFileName = "build-windows32home.xml";
//win32home.excludeFromMasterBuildFile = true;
//win32home.headerDirs = headers;
//win32home.cIncludes = sources;
//win32home.cFlags += cflags;
//win32home.cppFlags += cflags;

BuildTarget win32 = BuildTarget
.newDefaultTarget(TargetOs.Windows, false);
win32.headerDirs = headers;
win32.cIncludes = sources;
win32.cFlags += cflags;
win32.cppFlags += cflags;
BuildTarget win32 = BuildTarget
.newDefaultTarget(TargetOs.Windows, false);
win32.headerDirs = headers;
win32.cIncludes = sources;
win32.cFlags += cflags;
win32.cppFlags += cflags;

BuildTarget win64 = BuildTarget
.newDefaultTarget(TargetOs.Windows, true);
win64.headerDirs = headers;
win64.cIncludes = sources;
win64.cFlags += cflags;
win64.cppFlags += cflags;
BuildTarget win64 = BuildTarget
.newDefaultTarget(TargetOs.Windows, true);
win64.headerDirs = headers;
win64.cIncludes = sources;
win64.cFlags += cflags;
win64.cppFlags += cflags;

BuildTarget lin32 = BuildTarget
.newDefaultTarget(TargetOs.Linux, false);
lin32.headerDirs = headers;
lin32.cIncludes = sources;
lin32.cFlags += cflags;
lin32.cppFlags += cflags;
BuildTarget lin32 = BuildTarget
.newDefaultTarget(TargetOs.Linux, false);
lin32.headerDirs = headers;
lin32.cIncludes = sources;
lin32.cFlags += cflags;
lin32.cppFlags += cflags;

BuildTarget lin64 = BuildTarget
.newDefaultTarget(TargetOs.Linux, true);
lin64.headerDirs = headers;
lin64.cIncludes = sources;
lin64.cFlags += cflags;
lin64.cppFlags += cflags;
BuildTarget lin64 = BuildTarget
.newDefaultTarget(TargetOs.Linux, true);
lin64.headerDirs = headers;
lin64.cIncludes = sources;
lin64.cFlags += cflags;
lin64.cppFlags += cflags;

BuildTarget mac = BuildTarget
.newDefaultTarget(TargetOs.MacOsX, false);
mac.headerDirs = headers;
mac.cIncludes = sources;
mac.cFlags += cflags;
mac.cppFlags += cflags;
mac.linkerFlags += " -framework CoreServices -framework Carbon";
BuildTarget mac = BuildTarget
.newDefaultTarget(TargetOs.MacOsX, false);
mac.headerDirs = headers;
mac.cIncludes = sources;
mac.cFlags += cflags;
mac.cppFlags += cflags;
mac.linkerFlags += " -framework CoreServices -framework Carbon";

BuildTarget android = BuildTarget
.newDefaultTarget(TargetOs.Android, false);
android.headerDirs = headers;
android.cIncludes = sources;
android.cFlags += cflags;
android.cppFlags += cflags;
android.linkerFlags += " -llog";
BuildTarget android = BuildTarget
.newDefaultTarget(TargetOs.Android, false);
android.headerDirs = headers;
android.cIncludes = sources;
android.cFlags += cflags;
android.cppFlags += cflags;
android.linkerFlags += " -llog";

BuildTarget ios = BuildTarget.newDefaultTarget(TargetOs.IOS, false);
ios.headerDirs = headers;
ios.cIncludes = sources;
ios.cFlags += cflags;
ios.cppFlags += cflags;
BuildTarget ios = BuildTarget.newDefaultTarget(TargetOs.IOS, false);
ios.headerDirs = headers;
ios.cIncludes = sources;
ios.cFlags += cflags;
ios.cppFlags += cflags;

new NativeCodeGenerator().generate();
new NativeCodeGenerator().generate();

new AntScriptGenerator()
.generate(new BuildConfig("vtm-jni"),
android,
lin64,
lin32,
mac,
ios,
//win32home,
win32,
win64
);
new AntScriptGenerator()
.generate(new BuildConfig("vtm-jni"),
android,
lin64,
lin32,
mac,
ios,
//win32home,
win32,
win64
);

// BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v clean");
// BuildExecutor.executeAnt("jni/build-linux64.xml", "-v");
// BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");
}
// BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v clean");
// BuildExecutor.executeAnt("jni/build-linux64.xml", "-v");
// BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");
}
}
Loading

0 comments on commit 43ca550

Please sign in to comment.