Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions messenger/mexmaci64/make.py → messenger/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,26 @@
import sys
import fnmatch
import subprocess
import shutil

# Check the system platform first
platform = sys.platform
print "This is a " + platform + " system"

if platform.startswith('linux'):
messenger_dir = 'mexa64'
elif platform.startswith('darwin'):
messenger_dir = 'mexmaci64'
if platform.startswith('win32'):
# We further need to differniate 32 from 64 bit:
maxint = sys.maxint()
if maxint == 9223372036854775807:
messenger_dir = 'mexw64'
elif maxint == 2147483647:
messenger_dir = 'mexw32'

# Open the configure file and start parsing
config = open('local.cfg', 'r')
config = open(os.path.join(messenger_dir, 'local.cfg'), 'r')

for line in config:
path = line.split('=')
Expand Down Expand Up @@ -56,6 +69,8 @@
mex = "\\mex.bat"
else:
mex = "/mex"
make_cmd = '"' + matlab_bin + mex + '"' + " -O -I" + header_path + " -L" + lib_path + " -lzmq ../src/messenger.c"
make_cmd = '"' + matlab_bin + mex + '"' + " -O -I" + header_path + " -L" + lib_path + " -lzmq ./src/messenger.c"
os.system(make_cmd)

shutil.move('messenger.%s'%extension, messenger_dir)

61 changes: 0 additions & 61 deletions messenger/mexa64/make.py

This file was deleted.

2 changes: 1 addition & 1 deletion messenger/mexmaci64/local.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
MATLAB_BIN=/Applications/MATLAB_R2012a.app/bin
MATLAB_BIN=/Applications/MATLAB_R2012b.app/bin
HEADER_PATH=/usr/include
LIB_PATH=/usr/local/lib