mirror of
https://github.com/tribufu/tribufu-java
synced 2026-05-06 14:57:27 +00:00
Add Native Project
This commit is contained in:
parent
1b018a2572
commit
f02814624e
4 changed files with 90 additions and 0 deletions
11
Native/Source/Library.c
Normal file
11
Native/Source/Library.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
#include "Library.h"
|
||||
#include "TribuFu.h"
|
||||
|
||||
char *Java_Hello(char *input)
|
||||
{
|
||||
char *result = Hello("C");
|
||||
|
||||
return result;
|
||||
}
|
||||
7
Native/Source/Library.h
Normal file
7
Native/Source/Library.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
#include "TribuFu.h"
|
||||
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
||||
EXPORT char *Java_Hello(char *input);
|
||||
62
Native/premake5.lua
Normal file
62
Native/premake5.lua
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
project "TribuFu.Jvm"
|
||||
location "."
|
||||
kind "SharedLib"
|
||||
language "C"
|
||||
|
||||
targetdir ("./Binaries/%{cfg.buildcfg}")
|
||||
objdir ("./Intermediate/")
|
||||
|
||||
files
|
||||
{
|
||||
"./Source/**.h",
|
||||
"./Source/**.c",
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"../Vendor/TribuFu"
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
staticruntime "Off"
|
||||
systemversion "latest"
|
||||
|
||||
links
|
||||
{
|
||||
"TribuFu.lib"
|
||||
}
|
||||
|
||||
libdirs
|
||||
{
|
||||
"../Vendor/TribuFu/Windows"
|
||||
}
|
||||
|
||||
filter { "system:windows", "configurations:debug" }
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
|
||||
filter { "system:windows", "configurations:release" }
|
||||
runtime "Release"
|
||||
optimize "on"
|
||||
|
||||
filter "system:linux"
|
||||
links
|
||||
{
|
||||
"TribuFu"
|
||||
}
|
||||
|
||||
libdirs
|
||||
{
|
||||
"../Vendor/TribuFu/Linux"
|
||||
}
|
||||
|
||||
filter "system:darwin"
|
||||
links
|
||||
{
|
||||
"TribuFu"
|
||||
}
|
||||
|
||||
libdirs
|
||||
{
|
||||
"../Vendor/TribuFu/Mac"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue