Files
2026-03-10 11:35:19 -04:00

33 lines
954 B
Makefile

override CC_X64 := x86_64-w64-mingw32-gcc
STRIP_X64 ?= x86_64-w64-mingw32-strip
# Force x64 always available, x86 always disabled (Linux CI)
COMPILER_X64_AVAILABLE := yes
COMPILER_X86_AVAILABLE := no
# Standard BOF compilation flags (optimized, position-independent)
CFLAGS := -Os -std=c99 \
-fno-stack-protector -fno-stack-check -mno-stack-arg-probe \
-fno-builtin -fno-builtin-memset -fno-builtin-memcpy -fno-builtin-memmove \
-nostdlib \
-fno-asynchronous-unwind-tables -fno-unwind-tables -fno-ident \
-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable \
-fno-leading-underscore -fno-ms-extensions
SRC = proxy_enum.c
HEADERS = $(wildcard *.h)
OBJS_X64 = proxy_enum.x64.o
all: $(OBJS_X64)
proxy_enum.x64.o: $(SRC) $(HEADERS)
@echo "Building x64: $@"
$(CC_X64) $(CFLAGS) -c -o $@ $<
@if command -v $(STRIP_X64) >/dev/null 2>&1; then \
$(STRIP_X64) --strip-unneeded $@ 2>/dev/null || true; \
fi
clean:
rm -f *.o *.x64.o *.x86.o