diff --git a/Makefile b/Makefile index a2e896d..83dc2b2 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,15 @@ -CPREFIX = x86_64-w64-mingw32 +ifndef MSYSTEM + CPREFIX = x86_64-w64-mingw32- +endif + WINDIVERTHEADERS = ../../include WINDIVERTLIBS = ../binary TARGET = goodbyedpi.exe -LIBS = -L $(WINDIVERTLIBS) -lWinDivert -lws2_32 -CC = $(CPREFIX)-gcc -CCWINDRES = $(CPREFIX)-windres -CFLAGS = -Wall -I $(WINDIVERTHEADERS) -L $(WINDIVERTLIBS) \ +LIBS = -L$(WINDIVERTLIBS) -lWinDivert -lws2_32 +CC = $(CPREFIX)gcc +CCWINDRES = $(CPREFIX)windres +CFLAGS = -Wall -I$(WINDIVERTHEADERS) -L$(WINDIVERTLIBS) \ -O2 -pie -fPIE -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 LDFLAGS = -pie diff --git a/README.md b/README.md index 6cae2b7..4110dba 100644 --- a/README.md +++ b/README.md @@ -65,11 +65,11 @@ This project can be build using **GNU Make** and [**mingw**](https://mingw-w64.o To build x86 exe run: -`make CPREFIX=i686-w64-mingw32 WINDIVERTHEADERS=/path/to/windivert/include WINDIVERTLIBS=/path/to/windivert/x86` +`make CPREFIX=i686-w64-mingw32- WINDIVERTHEADERS=/path/to/windivert/include WINDIVERTLIBS=/path/to/windivert/x86` And for x86_64: -`make CPREFIX=x86_64-w64-mingw32 WINDIVERTHEADERS=/path/to/windivert/include WINDIVERTLIBS=/path/to/windivert/amd64` +`make CPREFIX=x86_64-w64-mingw32- WINDIVERTHEADERS=/path/to/windivert/include WINDIVERTLIBS=/path/to/windivert/amd64` # How to install as Windows Service