Skip to content

Commit

Permalink
compile on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Apr 3, 2020
1 parent 50fbcc7 commit c20ed88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 8 additions & 7 deletions commons/Makefile_common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,17 @@ ifeq ($(findstring MINGW64,$(PLATFORM)), MINGW64)
MKMEXOPT =-f mexopts_msys2_gcc.xml COMPFLAGS='$$COMPFLAGS $(CCFLAGS) $(USERCCFLAGS)' LDFLAGS='$$LDFLAGS -static $(OPENMPLIB) $(LIBOPENCL) $(MEXLINKOPT)' $(FASTMATH) -outdir ../mmclab
EXTRALIB +=-static
DLLFLAG =
endif
ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
else ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
MKMEX :=cmd /c mex.bat
MKMEXOPT =-f mexopts_cygwin64_gcc.bat COMPFLAGS='$$COMPFLAGS $(CCFLAGS) $(USERCCFLAGS)' LINKFLAGS='$$LINKFLAGS $(OPENMPLIB) $(MEXLINKOPT)' $(FASTMATH) -outdir ../mmclab
MKMEXOPT =-f mexopts_msys2_gcc.xml COMPFLAGS='$$COMPFLAGS $(CCFLAGS) $(USERCCFLAGS)' LDFLAGS='$$LDFLAGS -static $(OPENMPLIB) $(LIBOPENCL) $(MEXLINKOPT)' $(FASTMATH) -outdir ../mmclab
LIBOPENCL ="c:\Windows\System32\OpenCL.dll"
INCLUDEDIRS+=-I"./mingw64/include"
DLLFLAG =
else ifeq ($(findstring Darwin,$(PLATFORM)), Darwin)
INCLUDEDIRS=-I/System/Library/Frameworks/OpenCL.framework/Headers
LIBOPENCL=-framework OpenCL
LIBOPENCLDIR=/System/Library/Frameworks/OpenCL.framework/Versions/A
OPENMPLIB=-static-libgcc /usr/local/lib/libgomp.a
INCLUDEDIRS=-I/System/Library/Frameworks/OpenCL.framework/Headers
LIBOPENCL=-framework OpenCL
LIBOPENCLDIR=/System/Library/Frameworks/OpenCL.framework/Versions/A
OPENMPLIB=-static-libgcc /usr/local/lib/libgomp.a
endif

INCLUDEDIR+=$(INCLUDEDIRS)
Expand Down
6 changes: 1 addition & 5 deletions src/mcx_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
#include <math.h>
#include <ctype.h>
#include <time.h>
#ifdef __MINGW32__
#include <termcap.h>
#else
#include <sys/ioctl.h>
#endif
#include <sys/ioctl.h>
#include "mcx_utils.h"
#include "mcx_const.h"

Expand Down

0 comments on commit c20ed88

Please sign in to comment.