| # Makefile for tools/loading_tip_patcher | |
| # | |
| # Build: produces a standalone .exe that does NOT require MSVC runtime. | |
| # Run `make` to build. Use the same toolchain that ships with msys2. | |
| CC ?= x86_64-w64-mingw32-gcc | |
| CFLAGS ?= -O2 -Wall -Wextra -Wno-unused-parameter | |
| LDFLAGS ?= -static -static-libgcc | |
| LDLIBS ?= -lbcrypt -lkernel32 -lpsapi | |
| SRC := src/main.cpp | |
| OUT := bin/loading_tip_patcher.exe | |
| all: $(OUT) | |
| $(OUT): $(SRC) | |
| @mkdir -p bin | |
| $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(LDLIBS) | |
| @echo "Built $@" | |
| clean: | |
| rm -rf bin | |