xref: /petsc/src/sys/classes/viewer/impls/socket/mex-scripts/makefile (revision 66218dbd262911a26dc3973f56d9fd9d6c711f00)
1b75c6efcSBarry Smith-include ../../../../../../../petscdir.mk
2b75c6efcSBarry Smith#requirespackage  'PETSC_USE_MATLAB_SOCKET'
3b75c6efcSBarry Smith#requiresscalar real
4b75c6efcSBarry Smith#requiresprecision  double
5b75c6efcSBarry Smith#
6*66218dbdSBarry Smith#   mex-scripts makes the MATLAB mex files for receiving PETSc objects from sockets or files
7b75c6efcSBarry Smith#
8b75c6efcSBarry Smithmex-scripts: sread sopen sclose swrite
9b75c6efcSBarry Smith
10b75c6efcSBarry SmithMANSEC    = Sys
11b75c6efcSBarry SmithSUBMANSEC = Viewer
12b75c6efcSBarry Smith
13b75c6efcSBarry Smithinclude ${PETSC_DIR}/lib/petsc/conf/variables
14cb5db241SBarry Smithinclude ${PETSC_DIR}/lib/petsc/conf/rules_doc.mk
15b75c6efcSBarry Smith
16b75c6efcSBarry Smithsread:
17*66218dbdSBarry Smith	-@${MATLAB_MEX}  -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS}'  sread.c bread.c
18b75c6efcSBarry Smith	-@${RM} -f sread.o bread.o
19b75c6efcSBarry Smith	-@${MV} sread.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab
20b75c6efcSBarry Smith
21b75c6efcSBarry Smithswrite:
22*66218dbdSBarry Smith	-@${MATLAB_MEX} -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS}'  swrite.c bread.c
23b75c6efcSBarry Smith	-@${RM} -f swrite.o bread.o
24b75c6efcSBarry Smith	-@${MV} swrite.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab
25b75c6efcSBarry Smith
26b75c6efcSBarry Smithsopen:
27*66218dbdSBarry Smith	-@${MATLAB_MEX} -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS} ${PCC_FLAGS}' sopen.c
28b75c6efcSBarry Smith	-@${RM} -f sopen.o
29b75c6efcSBarry Smith	-@${MV} sopen.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab
30b75c6efcSBarry Smith
31b75c6efcSBarry Smithsclose:
32*66218dbdSBarry Smith	-@${MATLAB_MEX} -g GCC='${CC}' CC='${PCC}' CFLAGS='${COPTFLAGS} ${CC_FLAGS} ${CCPPFLAGS} ${PCC_FLAGS}' sclose.c
33b75c6efcSBarry Smith	-@${RM} -f sclose.o
34b75c6efcSBarry Smith	-@${MV} sclose.mex* ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab
35b75c6efcSBarry Smith
36