|
4 | 4 |
|
5 | 5 | WINDIVERTHEADERS = ../../../include |
6 | 6 | WINDIVERTLIBS = ../../binary |
| 7 | +MINGWLIB = /usr/x86_64-w64-mingw32/lib/ |
7 | 8 |
|
8 | 9 | TARGET = goodbyedpi.exe |
| 10 | +# Linking SSP does not work for some reason, the executable doesn't start. |
| 11 | +#LIBS = -L$(WINDIVERTLIBS) -Wl,-Bstatic -lssp -Wl,-Bdynamic -lWinDivert -lws2_32 |
9 | 12 | LIBS = -L$(WINDIVERTLIBS) -lWinDivert -lws2_32 |
10 | 13 | CC = $(CPREFIX)gcc |
11 | 14 | CCWINDRES = $(CPREFIX)windres |
12 | | -CFLAGS = -Wall -Wextra -I$(WINDIVERTHEADERS) -L$(WINDIVERTLIBS) \ |
13 | | - -O2 -pie -fPIE -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 |
14 | | -LDFLAGS = -Wl,-O1,--sort-common,--as-needed |
| 15 | +CFLAGS = -std=c99 -pie -fPIE -pipe -I$(WINDIVERTHEADERS) -L$(WINDIVERTLIBS) \ |
| 16 | + -O2 -D_FORTIFY_SOURCE=2 \ |
| 17 | + -Wall -Wextra -Wpedantic -Wformat=2 -Wshadow -Wstrict-aliasing=1 -Werror=format-security \ |
| 18 | + -Wfloat-equal -Wcast-align -Wsign-conversion \ |
| 19 | + #-fstack-protector-strong |
| 20 | +LDFLAGS = -Wl,-O1,-pie,--dynamicbase,--nxcompat,--sort-common,--as-needed \ |
| 21 | +-Wl,--image-base,0x140000000 -Wl,--disable-auto-image-base |
| 22 | + |
| 23 | +ifdef BIT64 |
| 24 | + LDFLAGS += -Wl,--high-entropy-va -Wl,--pic-executable,-e,mainCRTStartup |
| 25 | +else |
| 26 | + LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup |
| 27 | +endif |
15 | 28 |
|
16 | 29 | .PHONY: default all clean |
17 | 30 |
|
|
0 commit comments