1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
# To run this makefile, you must provide your system specific EXT and MATLABROOT
# variables on the command line e.g.:
#
# make -f Makefile_unix MATLABROOT="/usr/local/MATLAB/R2011a" EXT=mexa64 ARCH=glnxa64
ifndef MATLABROOT
$(warning MATLABROOT variable is undefined. Using default MATLABROOT="C:\Program Files\MATLAB\R2011b" )
MATLABROOT=/usr/local/MATLAB/R2011a
endif
ifndef EXT
$(warning EXT variable is undefined. Using default EXT=mexa64 )
EXT=mexa64
endif
ifndef ARCH
$(warning ARCH variable is undefined. Using default ARCH=win64 )
ARCH=glnxa64
endif
include ../../libltfat/ostools.mk
MEXTGT=polyboolmex.$(EXT)
MEXSRC=polyboolmex.cpp clipper.cpp
LIBS=-Wl,--no-undefined -L. -L"$(MATLABROOT)/bin/$(ARCH)" -lmex -lmx -lm
INCLUDES= -I"$(MATLABROOT)/extern/include" -I.
CXXFLAGS=-fPIC -O3 -Wall -shared -DMATLAB_MEX_FILE -DMATLAB_MEXCMD_RELEASE=R2017b
all:
$(CXX) $(CXXFLAGS) $(INCLUDES) $(MEXSRC) $(LIBS) -o $(MEXTGT)
clean:
$(RM) $(MEXTGT)
.PHONY: all clean
|