Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaXser committed Aug 13, 2024
1 parent 3ee2876 commit b9d603c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@ endif

WINDIVERTHEADERS = ../../../include
WINDIVERTLIBS = ../../binary
MINGWLIB = /usr/x86_64-w64-mingw32/lib/
MINGWLIB = /usr/$(CPREFIX)/lib/
MINGWINCLUDE = /usr/$(CPREFIX)/include/

TARGET = goodbyedpi.exe
LIBS = -L$(WINDIVERTLIBS) -lWinDivert -lws2_32
LIBS = -L$(WINDIVERTLIBS) -lWinDivert -lws2_32 -l:libssp.a
CC = clang --target=$(CPREFIX) --sysroot=/usr/$(CPREFIX)

CCWINDRES = llvm-windres --target=$(CPREFIX)
ifeq (, $(shell which $(CPREFIX)llvm-windres))
CCWINDRES = llvm-windres
endif

CFLAGS = -std=c99 -I$(WINDIVERTHEADERS) \
CFLAGS = -std=c99 -fPIE -pipe -I$(WINDIVERTHEADERS) -I$(MINGWINCLUDE) -L$(WINDIVERTLIBS) \
-O3 -march=x86-64-v3 -D_FORTIFY_SOURCE=2 -fstack-protector \
-Wall -Wextra -Wpedantic \
-Wformat-security -Wno-format-nonliteral -Wshadow \
-Wstrict-aliasing=1 -Wnull-dereference \
-Wimplicit-fallthrough=3 -Wstringop-overflow=4 \
-Wformat-signedness -Wstrict-overflow=2 \
-Wcast-align -Wsign-conversion
-Wall -Wextra -Wpedantic -Wformat=2 -Wshadow -Wstrict-aliasing=1 \
-Wnull-dereference -Wcast-align -Wsign-conversion

LDFLAGS = -fstack-protector -Wl,-O1,--dynamicbase,--nxcompat,--sort-common,--as-needed \
-Wl,--disable-auto-image-base
LDFLAGS = -fstack-protector -Wl,-O1,-pie,--dynamicbase,--nxcompat,--sort-common,--as-needed \
-Wl,--disable-auto-image-base -L$(MINGWLIB)

ifdef BIT64
LDFLAGS += -Wl,--high-entropy-va -Wl,--pic-executable,-e,mainCRTStartup
Expand All @@ -51,8 +48,7 @@ goodbyedpi-rc.o:
.PRECIOUS: $(TARGET) $(OBJECTS)

$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@

clean:
-rm -f *.o utils/*.o
-rm -f $(TARGET)
-rm -f $(TARGET)
1 change: 1 addition & 0 deletions src/blackwhitelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Domain records are added from a text file, where every
* domain is separated with a new line.
*/
#include <windows.h>
#include <stdio.h>
#include "goodbyedpi.h"
#include "utils/uthash.h"
Expand Down
1 change: 1 addition & 0 deletions src/fakepackets.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
Expand Down

0 comments on commit b9d603c

Please sign in to comment.