mkoctfile1
Compile dynamic-load modules for gnu octave
Usage
mkoctfile [option] ...
FILE ...
Overview
mkoctfile is used to compile C, C++, or Fortran source code in to a dynamically loadable .oct file for octave(1).
Options
-
-h, --help -
Print help message.
-
-Idir -
Add include directory dir to compile command.
-
-idirafter dir -
Add include directory to second include search path for compilation after '
-I'.
-
-Ddef -
Add definition def to compile command.
-
-llib -
Add library lib to link command.
-
-Ldir -
Add library directory dir to link command.
-
-M, --depend -
Generate dependency files (
.d) for C and C++ source files.
-
-pthread -
Add
-pthreadto link command.
-
-Rdir -
Pass
-Rdir to link command.
-Wl,option-
Pass option to the linker such as
-Wl,-rpath=...
-
-W... -
Pass flags to the compiler such as
-Wa,option.
-
-c, --compile -
Compile, but do not link.
-
-o file, --output file -
Output filename. Default extension is "
.oct" (or ".mex" if--mexis specified) unless linking a stand-alone executable.
-
-g -
Enable debugging option for all compilers.
-
-p VAR, --print VAR -
Print configuration variable VAR. There are three categories of variables:
-
Octave configuration variables that users may override with environment variables. These are used in commands that
mkoctfileexecutes.ALL_CFLAGS INCLUDEDIRALL_CXXFLAGS LAPACK_LIBSALL_FFLAGS LDFLAGSALL_LDFLAGS LD_STATIC_FLAGBLAS_LIBS LFLAGSCC LIBDIRCFLAGS LIBOCTAVECPICFLAG LIBOCTINTERPCPPFLAGS OCTAVE_LINK_OPTSCXX OCTINCLUDEDIRCXXFLAGS OCTAVE_LIBSCXXLD OCTAVE_LINK_DEPSCXXPICFLAG OCTLIBDIRDL_LDFLAGS OCT_LINK_DEPSF77 OCT_LINK_OPTSF77_INTEGER8_FLAG RDYNAMIC_FLAGFFLAGS SPECIAL_MATH_LIBFPICFLAG XTRA_CFLAGSINCFLAGS XTRA_CXXFLAGS
-
Octave configuration variables as above, but currently unused by
mkoctfile.ARDEPEND_EXTRA_SED_PATTERNDEPEND_FLAGSFFTW3F_LDFLAGSFFTW3F_LIBSFFTW3_LDFLAGSFFTW3_LIBSFFTW_LIBSFLIBSLIBSRANLIBREADLINE_LIBS
-
Octave configuration variables that are provided for informational purposes only. Except for OCTAVE_HOME and OCTAVE_EXEC_HOME, users may not override these variables.
-
If OCTAVE_HOME or OCTAVE_EXEC_HOME are set in the environment, then other variables are adjusted accordingly with OCTAVE_HOME or OCTAVE_EXEC_HOME substituted for the original value of the directory specified by the --prefix or --exec-prefix options that were used when Octave was configured.
API_VERSION LOCALARCHLIBDIRARCHLIBDIR LOCALFCNFILEDIRBINDIR LOCALOCTFILEDIRCANONICAL_HOST_TYPE LOCALSTARTUPFILEDIRDATADIR LOCALVERARCHLIBDIRDATAROOTDIR LOCALVERFCNFILEDIRDEFAULT_PAGER LOCALVEROCTFILEDIREXEEXT MAN1DIRFCNFILEDIR MAN1EXTIMAGEDIR MANDIRINCLUDEDIR OCTAVE_EXEC_HOMEINFODIR OCTAVE_HOMEINFOFILE OCTDATADIRLIBDIR OCTDOCDIRLIBEXECDIR OCTFILEDIRLOCALAPIARCHLIBDIR OCTFONTSDIRLOCALAPIFCNFILEDIR OCTINCLUDEDIRLOCALAPIOCTFILEDIR OCTLIBDIRLOCALAPIPKGDIR STARTUPFILEDIRVERSION
-
--link-stand-alone -
Link a stand-alone executable file.
-
--mex -
Create a MEX file. Set the default output extension to "
.mex". Link to liboctmex instead of liboctinterp and liboctave.
-
-s, --strip -
Strip output file.
-
-n, --dry-run, --just-print -
Print commands, but do not execute them.
-
-v, --verbose -
Echo commands as they are executed.
- FILE
-
Compile or link FILE. Recognized file types are:
.c C source.cc C++ source.cp C++ source.cpp C++ source.CPP C++ source.cxx C++ source.c++ C++ source.C C++ source.f Fortran source (fixed form).F Fortran source (fixed form).f90 Fortran source (free form).F90 Fortran source (free form).o object file.a library file
Releases
12 releases since Debian 2.0 (Hamm); the text changed 9 times.
--compile since Arch Linux 2026-11-01;
--depend since Debian 7 (Wheezy);
--dry-run since Arch Linux 2026-11-01;
--help since Debian 7 (Wheezy);
--just-print since Arch Linux 2026-11-01;
--link-stand-alone since Debian 7 (Wheezy);
--mex since Debian 7 (Wheezy);
--output since Debian 7 (Wheezy);
--print since Debian 7 (Wheezy);
--strip since Debian 7 (Wheezy);
--verbose since Debian 7 (Wheezy);
-Ddef since Debian 7 (Wheezy);
-Idir since Debian 7 (Wheezy);
-Ldir since Debian 7 (Wheezy);
-M since Debian 7 (Wheezy);
-Rdir since Debian 7 (Wheezy);
-W... since Debian 7 (Wheezy);
-c since Debian 7 (Wheezy);
-g since Debian 7 (Wheezy);
-h since Debian 7 (Wheezy);
-idirafter since Arch Linux 2026-11-01;
-llib since Debian 7 (Wheezy);
-n since Arch Linux 2026-11-01;
-o since Debian 7 (Wheezy);
-p since Debian 7 (Wheezy);
-pthread since Debian 7 (Wheezy);
-s since Debian 7 (Wheezy);
-v since Debian 7 (Wheezy).
-? until Debian 13 (Trixie);
-idirafterdir until Debian 13 (Trixie).