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