Sepehr fa480ed303 feat: implement mass balance validation for Story 7.1
- Added port_mass_flows to Component trait and implements for core components.
- Added System::check_mass_balance and integrated it into the solver.
- Restored connect methods for ExpansionValve, Compressor, and Pipe to fix integration tests.
- Updated Python and C bindings for validation errors.
- Updated sprint status and story documentation.
2026-02-21 23:21:34 +01:00

32 lines
798 B
Makefile

CC ?= gcc
CFLAGS = -Wall -Wextra -O2 -I../../../target
# Platform-specific library extension
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
LIB_EXT = dylib
LDFLAGS = -L../../../target/release -lentropyk_ffi
else ifeq ($(UNAME_S),Linux)
LIB_EXT = so
LDFLAGS = -L../../../target/release -lentropyk_ffi -Wl,-rpath,'$$ORIGIN/../../../target/release'
else
LIB_EXT = dll
LDFLAGS = -L../../../target/release -lentropyk_ffi
endif
.PHONY: all clean run
all: example
example: example.c ../../../target/entropyk.h ../../../target/release/libentropyk.$(LIB_EXT)
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
../../../target/entropyk.h ../../../target/release/libentropyk.$(LIB_EXT):
cd ../../.. && cargo build --release -p entropyk-c
run: example
./example
clean:
rm -f example