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.
This commit is contained in:
31
bindings/c/examples/Makefile
Normal file
31
bindings/c/examples/Makefile
Normal file
@@ -0,0 +1,31 @@
|
||||
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
|
||||
Reference in New Issue
Block a user