File size: 551 Bytes
e93c9cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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

.PHONY: all clean

all: $(OUT)

$(OUT): $(SRC)
	@mkdir -p bin
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(LDLIBS)
	@echo "Built $@"

clean:
	rm -rf bin