2009-10-02 19:22:19 +02:00
|
|
|
EXEEXT = $(MEXEXT)
|
|
|
|
|
2012-09-28 17:21:25 +02:00
|
|
|
AM_CPPFLAGS = $(MATLAB_CPPFLAGS)
|
|
|
|
AM_CPPFLAGS += -I$(top_srcdir)/../../sources
|
2009-10-02 19:22:19 +02:00
|
|
|
|
|
|
|
DEFS += $(MATLAB_DEFS)
|
|
|
|
DEFS += -DMATLAB_MEX_FILE
|
2012-01-09 12:37:55 +01:00
|
|
|
DEFS += -DMEXEXT=\"$(MEXEXT)\"
|
2009-10-02 19:22:19 +02:00
|
|
|
|
2012-09-28 17:21:25 +02:00
|
|
|
AM_LDFLAGS = $(MATLAB_LDFLAGS)
|
2009-10-02 19:22:19 +02:00
|
|
|
LIBS += $(MATLAB_LIBS)
|
|
|
|
|
2014-07-18 12:15:36 +02:00
|
|
|
mexdir = $(libdir)/dynare/mex/matlab
|
2014-07-16 16:18:06 +02:00
|
|
|
|
2016-12-01 23:25:01 +01:00
|
|
|
all-local: $(PROGRAMS)
|
2019-09-04 11:38:44 +02:00
|
|
|
## Create symlinks in mex/matlab/, but only if the build is not
|
|
|
|
## out-of-tree (because of the Windows installer)
|
|
|
|
if [ "$(abs_srcdir)" = "$(abs_builddir)" ]; then \
|
|
|
|
$(MKDIR_P) $(top_srcdir)/../../matlab && \
|
|
|
|
cd $(top_srcdir)/../../matlab && \
|
|
|
|
for p in $(PROGRAMS); do \
|
|
|
|
$(LN_S) -f $(abs_builddir)/$$p $$p; \
|
|
|
|
done; \
|
|
|
|
fi
|
2009-10-02 19:22:19 +02:00
|
|
|
|
|
|
|
clean-local:
|
2019-12-03 16:17:00 +01:00
|
|
|
rm -f *.mod # Fortran modules
|
2010-02-01 10:50:29 +01:00
|
|
|
if test -d $(top_srcdir)/../../matlab; then \
|
|
|
|
cd $(top_srcdir)/../../matlab && rm -f $(PROGRAMS); \
|
|
|
|
fi
|
2019-12-03 16:17:00 +01:00
|
|
|
|
|
|
|
# Automake provides a default rule for .f08 files, but not .F08
|
|
|
|
%.o: %.F08
|
|
|
|
$(AM_V_FC)$(FCCOMPILE) $(DEFS) -c -o $@ $<
|