1b75c6efcSBarry Smith-include ../../../../../../../petscdir.mk 2b75c6efcSBarry Smith#requirespackage 'PETSC_USE_MATLAB_SOCKET' 3b75c6efcSBarry Smith#requiresscalar real 4b75c6efcSBarry Smith#requiresprecision double 5b75c6efcSBarry Smith# 6b75c6efcSBarry Smith# mex-scripts makes the MATLAB mex files for receiving PETSc objects 7b75c6efcSBarry Smith# in MATLAB. You cannot use a complex numbers. 8b75c6efcSBarry Smith# 9b75c6efcSBarry Smithmex-scripts: sread sopen sclose swrite 10b75c6efcSBarry Smith 11b75c6efcSBarry SmithMANSEC = Sys 12b75c6efcSBarry SmithSUBMANSEC = Viewer 13b75c6efcSBarry SmithLIBBASE = libpetscsys 14b75c6efcSBarry Smith 15b75c6efcSBarry Smithinclude ${PETSC_DIR}/lib/petsc/conf/variables 16*cb5db241SBarry Smithinclude ${PETSC_DIR}/lib/petsc/conf/rules_doc.mk 17b75c6efcSBarry Smith 18b75c6efcSBarry Smithsread: 19b75c6efcSBarry Smith -@${MATLAB_MEX} -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS}' LDFLAGS='${PETSC_EXTERNAL_LIB_BASIC}' sread.c bread.c 20b75c6efcSBarry Smith -@${RM} -f sread.o bread.o 21b75c6efcSBarry Smith -@${MV} sread.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab 22b75c6efcSBarry Smith 23b75c6efcSBarry Smithswrite: 24b75c6efcSBarry Smith -@${MATLAB_MEX} -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS}' LDFLAGS='${PETSC_EXTERNAL_LIB_BASIC}' swrite.c bread.c 25b75c6efcSBarry Smith -@${RM} -f swrite.o bread.o 26b75c6efcSBarry Smith -@${MV} swrite.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab 27b75c6efcSBarry Smith 28b75c6efcSBarry Smithsopen: 29b75c6efcSBarry Smith -@${MATLAB_MEX} -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS} ${PCC_FLAGS}' LDFLAGS='${PETSC_EXTERNAL_LIB_BASIC}' sopen.c 30b75c6efcSBarry Smith -@${RM} -f sopen.o 31b75c6efcSBarry Smith -@${MV} sopen.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab 32b75c6efcSBarry Smith 33b75c6efcSBarry Smithsclose: 34b75c6efcSBarry Smith -@${MATLAB_MEX} -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS} ${PCC_FLAGS}' LDFLAGS='${PETSC_EXTERNAL_LIB_BASIC}' sclose.c 35b75c6efcSBarry Smith -@${RM} -f sclose.o 36b75c6efcSBarry Smith -@${MV} sclose.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab 37b75c6efcSBarry Smith 38