Makefile to add library

In my game I need to add a library. While in a normal project I could simply do this by adding it in Project properties/Linker/Input, in an Unreal Engine project, that tab isn’t there. Someone told me that I need to edit “Makefile”. Here lies the problem, I’m not a C++ programmer, and I have no idea how to use those (that is why I even use blueprints, that way I only need the logic and not the code). I did a file search but that returned 60 files, but most of them are in a Plugins folder so I think I can skip those, some that aren’t there say not to edit, and that leaves only one from this location UE_5.0\Engine\Source\Programs\Shared\EpicGames.Perforce.Native.

Normally what I would add in /Linker/Input is C:\Program Files\Java\jdk1.8.0_333\lib\jvm.lib, and so I gave it a try and added first:
JNIPATH=C:\Program Files\Java\jdk1.8.0_333
JNILIB=-LIBPATH:"$(JNIPATH)\lib"
But that didn’t worked, I’m still getting the error:
Error LNK2019 unresolved external symbol __imp_JNI_CreateJavaVM referenced in function "private: static void __cdecl UTestSocket
Then I tried another way:
JNIPATH=C:\Program Files\Java\jdk1.8.0_333
JNILIB=-LIBPATH:"$(JNIPATH)\lib\jvm.lib"
To specify the file, but still no use, same error.

Do I have to edit another “Makefile” or how else can I do this? I need to specify somehow that library to get past the error, and the usual way I was doing it, I can’t because like I said, /Linker/Input tab isn’t there in an UE project.

This is the full “Makefile” I only added the 2 lines, the rest was there:

EpicGames.Perforce.Native

OBJDIR=obj/linux-x64/Release
OUTDIR=bin/linux-x64/Release

CXXFLAGS=-fPIC -std=c++14 -O1 -I…/…/…/ThirdParty/Perforce/p4api-2018.1/Include/Linux/p4

LIBPATH=…/…/…/ThirdParty/Perforce/p4api-2018.1/Lib/Linux
LIBS=$(LIBPATH)/libclient.a $(LIBPATH)/librpc.a $(LIBPATH)/libsupp.a -lssl -lcrypto -lpthread -ldl -lstdc++ -L…/…/…/ThirdParty/OpenSSL/1.1.1c/lib/Unix/x86_64-unknown-linux-gnu

$(OBJDIR):
mkdir -p $(OBJDIR)

$(OBJDIR)/%.o: %.cpp | $(OBJDIR)
$(CC) $(CXXFLAGS) -c -o $@ $<

JNIPATH=C:\Program Files\Java\jdk1.8.0_333 # set this to the correct version
JNILIB=-LIBPATH:"$(JNIPATH)\lib\jvm.lib"

note by default we strip debug info for size

client: $(OBJDIR)/Client.o
mkdir -p $(OUTDIR)/
$(CC) $(LDFLAGS) -shared -o $(OUTDIR)/EpicGames.Perforce.Native.so $^ $(LIBS)

clean:
rm -rf $(OBJDIR)/
rm -rf $(OUTDIR)/

all: client