2017-05-17 12:57:15 +00:00
|
|
|
CPREFIX = x86_64-w64-mingw32
|
|
|
|
WINDIVERTHEADERS = ../../include
|
|
|
|
WINDIVERTLIBS = ../binary
|
|
|
|
|
2017-05-16 19:07:40 +00:00
|
|
|
TARGET = goodbyedpi.exe
|
2017-05-17 12:57:15 +00:00
|
|
|
LIBS = -L $(WINDIVERTLIBS) -lWinDivert -lws2_32
|
|
|
|
CC = $(CPREFIX)-gcc
|
|
|
|
CCWINDRES = $(CPREFIX)-windres
|
2017-05-17 18:44:19 +00:00
|
|
|
CFLAGS = -Wall -I $(WINDIVERTHEADERS) -L $(WINDIVERTLIBS) \
|
2017-09-07 14:35:57 +00:00
|
|
|
-O2 -pie -fPIE -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2
|
|
|
|
LDFLAGS = -pie
|
2017-05-16 19:07:40 +00:00
|
|
|
|
|
|
|
.PHONY: default all clean
|
|
|
|
|
|
|
|
default: manifest $(TARGET)
|
|
|
|
all: default
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) goodbyedpi-rc.o
|
|
|
|
HEADERS = $(wildcard *.h)
|
|
|
|
|
|
|
|
%.o: %.c $(HEADERS)
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
manifest:
|
|
|
|
$(CCWINDRES) goodbyedpi-rc.rc goodbyedpi-rc.o
|
|
|
|
|
|
|
|
.PRECIOUS: $(TARGET) $(OBJECTS)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
|
|
$(CC) $(OBJECTS) -Wall $(LIBS) -s -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o
|
|
|
|
-rm -f $(TARGET)
|