Skip to content

Commit 5ce2c0d

Browse files
committed
refix 7.5 library creation
recent 7.6 fixes broke 7.5 again: don't fail for old-style .ctf darcs-hash:20080708002215-56c21-aab42f7602d52247ade0cc873898e1718c45d160
1 parent df124ac commit 5ce2c0d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Makefile.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@ MCC=@MATLAB_MCC@
22
MCCFLAGS=@MCCFLAGS@
33

44
libhsmatlab.so: hsmatlab.m hsmatlab.c
5+
rm -f $@ $@.post
6+
# just create the wrapper
57
$(MCC) $(MCCFLAGS) -W lib:$(basename $@) -c hsmatlab.m
6-
[ -f $@ ] && mv $@ $@.post
8+
# matlab 7.6 sticks the ctf at the end of the library, but has a bug when not creating libraries that it tries anyway, so we check that here
9+
-[ -f $@ ] && mv $@ $@.post
10+
# stick our own call into the wrapper
711
cat hsmatlab.c >> $(basename $@).c
12+
# build the library
813
$(MCC) $(MCCFLAGS) -W none -T link:lib $(basename $@).c
9-
[ -f $@.post ] && cat $(basename $@).ctf >> $@
14+
# 7.6: do what mcc tried to do before
15+
-[ -f $@.post ] && cat $(basename $@).ctf >> $@
1016

1117
clean:
1218
rm -rf libhsmatlab_mcr

src/hsmatlab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
/* a thin wrapper to add to the library to allow for arbitrary function calls */
22
LIB_libhsmatlab_C_API
33
bool MW_CALL_CONV mlHsFeval(const char *fun, int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[])
44
{

0 commit comments

Comments
 (0)