Mercurial > octave
changeset 28747:b12ff2cea46a stable
build: Add LDFLAGS to Octave libraries for MKOCTFILE and MKMEXFILE commands.
* test/mex/module.mk: .oct and .mex files are linked with -loctinterp -loctave
on MacOS. Add -L flags with path to these libraries when calling mkoctfile.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Mon, 14 Sep 2020 19:22:01 +0200 |
parents | 56b9a468145a |
children | 9cd608134ec5 8e8cfb6304e1 |
files | test/mex/module.mk |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/test/mex/module.mk Mon Sep 14 13:36:36 2020 -0700 +++ b/test/mex/module.mk Mon Sep 14 19:22:01 2020 +0200 @@ -10,8 +10,8 @@ MEX_TEST_FUNCTIONS = $(MEX_TEST_SRC:%.c=%.mex) ## Since these definitions for MKOCTFILE and MKMEXFILE are only used -## here, defining them in this file is probably OK. If there are ever -## used elsewhre, maybe then they could be moved to build-aux/module.mk +## here, defining them in this file is probably OK. If they are ever +## used elsewhere, maybe then they could be moved to build-aux/module.mk ## or the main Makefile.am file. The MKOCTFILE variables are included ## for completeness, in case we someday want to test building .oct ## files as well. @@ -30,14 +30,22 @@ MKOCTFILECPPFLAGS = \ -I$(top_srcdir)/libinterp/corefcn \ -Ilibinterp/corefcn +MKOCTFILELDFLAGS = \ + -L$(top_builddir)/libinterp/.lib \ + -L$(top_builddir)/liboctave/.lib -MKOCTFILE = $(top_builddir)/src/mkoctfile $(MKOCTFILECPPFLAGS) +MKOCTFILE = \ + $(top_builddir)/src/mkoctfile $(MKOCTFILECPPFLAGS) $(MKOCTFILELDFLAGS) MKMEXFILECPPFLAGS = \ -I$(top_srcdir)/libinterp/corefcn \ -Ilibinterp/corefcn +MKMEXFILELDFLAGS = \ + -L$(top_builddir)/libinterp/.lib \ + -L$(top_builddir)/liboctave/.lib -MKMEXFILE = $(top_builddir)/src/mkoctfile --mex $(MKMEXFILECPPFLAGS) +MKMEXFILE = \ + $(top_builddir)/src/mkoctfile --mex $(MKMEXFILECPPFLAGS) $(MKMEXFILELDFLAGS) $(MEX_TEST_FUNCTIONS) : %.mex : %.c | %reldir%/$(octave_dirstamp) $(AM_V_mkmexfile)$(MKMEXFILE) $(AM_VOPT_mkmexfile) $< -o $@ || rm -f $@