mirror of
https://github.com/copypasteonly/HearthDB.git
synced 2026-11-17 08:24:34 +00:00
Runs cargo check against the cross-compile target with the same CC/CFLAGS/RUSTFLAGS environment as a full build. Faster than make release for iterative type-checking during development. Signed-off-by: txtsd <code@ihavea.quest>
34 lines
906 B
Makefile
34 lines
906 B
Makefile
TRIPLE = i686-pc-windows-msvc
|
|
XWIN_SDK = $(CURDIR)/xwinSDK
|
|
|
|
# Both the C compiler (cc crate) and the linker (lld-link) are invoked with
|
|
# their working directory set to the build output dir, so all xwinSDK paths
|
|
# must be absolute. Makefile provides $(CURDIR) for this purpose.
|
|
export CC_i686_pc_windows_msvc := clang-cl
|
|
export CFLAGS_i686_pc_windows_msvc := \
|
|
-imsvc $(XWIN_SDK)/crt/include \
|
|
-imsvc $(XWIN_SDK)/sdk/include/ucrt \
|
|
-imsvc $(XWIN_SDK)/sdk/include/um \
|
|
-imsvc $(XWIN_SDK)/sdk/include/shared
|
|
export RUSTFLAGS := \
|
|
-Clinker-flavor=msvc \
|
|
-Lnative=$(XWIN_SDK)/crt/lib/x86 \
|
|
-Lnative=$(XWIN_SDK)/sdk/lib/ucrt/x86 \
|
|
-Lnative=$(XWIN_SDK)/sdk/lib/um/x86
|
|
|
|
.PHONY: all release debug check clean
|
|
|
|
all: release
|
|
|
|
release:
|
|
cargo build --release --target $(TRIPLE)
|
|
|
|
debug:
|
|
cargo build --target $(TRIPLE)
|
|
|
|
check:
|
|
cargo check --target $(TRIPLE)
|
|
|
|
clean:
|
|
cargo clean
|