mirror of
https://gitea.tendokyu.moe/self/even
synced 2025-02-21 20:49:38 +01:00
build: auto detect prefix
This commit is contained in:
parent
063da61931
commit
5fe8517623
14
Makefile
14
Makefile
@ -1,7 +1,15 @@
|
|||||||
CC = x86_64-w64-mingw32-gcc
|
TARGET = x86_64-w64-mingw32
|
||||||
RC = x86_64-w64-mingw32-windres
|
|
||||||
|
|
||||||
CFLAGS = -Wall -Wpedantic -DNDEBUG -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/ddk -O0 -std=c23
|
CC = $(TARGET)-gcc
|
||||||
|
RC = $(TARGET)-windres
|
||||||
|
|
||||||
|
ifdef prefix
|
||||||
|
PREFIX = $(prefix)
|
||||||
|
else
|
||||||
|
PREFIX = /usr/$(TARGET)
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS = -Wall -Wpedantic -DNDEBUG -I$(PREFIX)/include/ddk -O0 -std=c23
|
||||||
LDFLAGS = -Wl,--subsystem,native \
|
LDFLAGS = -Wl,--subsystem,native \
|
||||||
-Wl,--image-base,0x10000 \
|
-Wl,--image-base,0x10000 \
|
||||||
-Wl,--file-alignment,0x1000 \
|
-Wl,--file-alignment,0x1000 \
|
||||||
|
@ -12,6 +12,10 @@ This project uses the MinGW toolchain to build.
|
|||||||
```sh
|
```sh
|
||||||
make
|
make
|
||||||
|
|
||||||
|
# With custom sysroot (e.g. Fedora MinGW)
|
||||||
|
mingw64-make # on Fedora
|
||||||
|
make PREFIX=/path/to/sys-root/prefix # on other systems
|
||||||
|
|
||||||
# Update third party dependencies (requires peru)
|
# Update third party dependencies (requires peru)
|
||||||
make third_party
|
make third_party
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user