Add Native Project

This commit is contained in:
GuilhermeWerner 2021-05-05 10:27:52 -03:00
parent 1b018a2572
commit f02814624e
4 changed files with 90 additions and 0 deletions

11
Native/Source/Library.c Normal file
View 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
View 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
View 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"
}