From 8086d7cedf5dd006652ce921b83246fb5930d3ab Mon Sep 17 00:00:00 2001 From: Peacoor Date: Wed, 15 Feb 2023 16:42:57 +0800 Subject: [PATCH] Add static link option for binary --- 230130-hookgamesendto/hookdll/Makefile | 2 +- 230130-hookgamesendto/injector/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/230130-hookgamesendto/hookdll/Makefile b/230130-hookgamesendto/hookdll/Makefile index a5965d8..57289f0 100644 --- a/230130-hookgamesendto/hookdll/Makefile +++ b/230130-hookgamesendto/hookdll/Makefile @@ -1,7 +1,7 @@ vpath %.cpp ../src cxx = g++ cxxflags = -c -O1 -I ../inc -linkflags = -shared -l ws2_32 +linkflags = -shared -static -l ws2_32 cxx32prefix = i686-w64-mingw32- cxx64prefix = x86_64-w64-mingw32- objdir = ./obj/ diff --git a/230130-hookgamesendto/injector/Makefile b/230130-hookgamesendto/injector/Makefile index 335e553..5dea127 100644 --- a/230130-hookgamesendto/injector/Makefile +++ b/230130-hookgamesendto/injector/Makefile @@ -14,10 +14,10 @@ target64 = $(bindir)injector64.exe all: check $(target32) $(target64) $(target32): $(obj32) - $(cxx32prefix)$(cxx) -o $@ $^ + $(cxx32prefix)$(cxx) -o $@ $^ -static $(target64): $(obj64) - $(cxx64prefix)$(cxx) -o $@ $^ + $(cxx64prefix)$(cxx) -o $@ $^ -static $(objdir)%_32.o: %.cpp $(cxx32prefix)$(cxx) $(cxxflags) -o $@ $< -- GitLab