diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 1f9d9cf..fa17225 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -79,7 +79,7 @@ jobs: make -C src oct CC=gcc CXX=g++ MEXLINKOPT="-static" otool -L zipmat.mex else - make -C src oct CC=gcc CXX=g++ MEXLINKOPT="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lm -lpthread -Wl,-Bdynamic" + make -C src oct CC=gcc CXX=g++ MEXLINKOPT="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lm -lpthread -Wl,-Bdynamic" LIBZLIB="-Wl,-Bstatic -lz" ldd zipmat.mex fi strip -S zipmat.mex diff --git a/src/Makefile b/src/Makefile index d123d00..e79688e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -94,7 +94,7 @@ else INCLUDEDIRS+=-Iblosc2/internal-complibs/zstd-1.5.2 LIBZLIB+=-Lblosc2/internal-complibs/zstd-1.5.2 -lzstd endif - LIBZLIB+=-Lblosc2/lib -lblosc2 -lpthread + LIBZLIB+=-Lblosc2/lib -lblosc2 -lpthread -lz INCLUDEDIRS+=-Iblosc2/include endif @@ -154,7 +154,7 @@ oct: LINKOPT+=--mex $(INCLUDEDIRS) $(LIBZLIB) mex: CXX=$(MEX) mex: OUTPUTFLAG:=-output mex: AR=$(MEX) zmat.cpp $(INCLUDEDIRS) -mex: LINKOPT+= -cxx LINKLIBS="-L\"\$$MATLABROOT/extern/lib/\$$ARCH\" -L\"\$$MATLABROOT/bin/\$$ARCH\" -lmx -lmex $(MEXLINKOPT) $(LIBZLIB)" CXXLIBS="\$$CXXLIBS $(MEXLINKOPT) $(LIBZLIB)" -outdir $(ZMATDIR) +mex: LINKOPT+=-cxx LINKLIBS="-L\"\$$MATLABROOT/extern/lib/\$$ARCH\" -L\"\$$MATLABROOT/bin/\$$ARCH\" -lmx -lmex $(MEXLINKOPT) $(LIBZLIB)" CXXLIBS="\$$CXXLIBS $(MEXLINKOPT) $(LIBZLIB)" -outdir $(ZMATDIR) mex: ARFLAGS := mex: OUTPUT_DIR=..