servicepoint-binding-c/example/Makefile
Vinzenz Schroeter 1319415543
Some checks failed
Rust / build (push) Failing after 27s
simplify example
2025-02-16 17:52:26 +01:00

31 lines
575 B
Makefile

CC := gcc
THIS_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
REPO_ROOT := $(THIS_DIR)/..
build: out/example
clean:
rm -r out || true
rm include/servicepoint.h || true
cargo clean
run: out/example
out/example
PHONY: build clean dependencies run
out/example: dependencies main.c
mkdir -p out || true
${CC} main.c \
-I $(REPO_ROOT)/include \
-L $(REPO_ROOT)/target/release \
-Wl,-Bstatic -lservicepoint_binding_c \
-Wl,-Bdynamic -llzma \
-o out/example
dependencies: FORCE
cargo build --manifest-path=$(REPO_ROOT)/Cargo.toml --release
FORCE: ;