Skip to content

Commit

Permalink
fix travis error after adding cuda related targets
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jan 2, 2023
1 parent 9809be0 commit 423047b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions commons/Makefile_common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ endif

MEXLINKOPT +=$(OPENMPLIB)
MKMEX :=mex
MKMEXOPT =CC='$(CC)' CXX='$(CXX)' CXXLIBS='$$CXXLIBS $(LIBOPENCL)' CXXFLAGS='$(CCFLAGS) $(USERCCFLAGS)' LDFLAGS='-L$$TMW_ROOT$$MATLABROOT/sys/os/$$ARCH $$LDFLAGS $(MEXLINKOPT)' $(FASTMATH) -cxx -outdir $(BINDIR)
MKMEXOPT =CC='$(CC)' CXX='$(CXX)' CXXLIBS='$$CXXLIBS $(LIBOPENCL) $(LIBCUDART)' CXXFLAGS='$(CCFLAGS) $(USERCCFLAGS)' LDFLAGS='-L$$TMW_ROOT$$MATLABROOT/sys/os/$$ARCH $$LDFLAGS $(MEXLINKOPT)' $(FASTMATH) -cxx -outdir $(BINDIR)
MKOCT :=mkoctfile -v

DLLFLAG=-fPIC
Expand Down Expand Up @@ -152,13 +152,6 @@ mex mexomp: ARFLAGS+=$(MKMEXOPT)
prof: CCFLAGS+= -O3 -pg
prof: ARFLAGS+= -O3 -g -pg

pnacl: CC=$(PNACL_TC_PATH)/bin/pnacl-clang++
pnacl: AR=$(PNACL_TC_PATH)/bin/pnacl-ar
pnacl: ARFLAGS= cr
pnacl: EXTRALIB :=
pnacl: INCLUDEDIR+= -I$(NACL_SDK_ROOT)/include/pnacl
pnacl: BINARY=libmmc-pnacl.a

web: CCFLAGS+= -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3
web: CCFLAGS+= -O3 $(OPENMP) $(FASTMATH)
web: ARFLAGS+= $(OPENMPLIB) $(FASTMATH) -DUSE_SSE2 -DMMC_USE_SSE_MATH
Expand Down Expand Up @@ -204,7 +197,7 @@ cuda: sse
cudamex: mex
cudaoct: oct

all release sse ssemath prof omp mex oct mexomp octomp pnacl web debug cuda: $(SUBDIRS) $(BINDIR)/$(BINARY)
all release sse ssemath prof omp mex oct mexomp octomp web debug cuda: $(SUBDIRS) $(BINDIR)/$(BINARY)

$(SUBDIRS):
$(MAKE) -C $@ --no-print-directory
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ USERCCFLAGS=-DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT

DUMMY:=$(shell mkdir -p built/cjson)

ifeq ($(MAKECMDGOALS),$(filter $(MAKECMDGOALS),cuda cudamex cudaoct))
ifneq (,$(filter $(MAKECMDGOALS),cuda cudamex cudaoct))
FILES+=mmc_cu_host
USERCCFLAGS+=-DUSE_CUDA
CUCCOPT= -DUSE_ATOMIC -DMCX_SAVE_DETECTORS -DMCX_DO_REFLECTION -DUSE_DMMC -DUSE_BLBADOUEL -Xcompiler -fPIC
EXTRALIB+=-lcudart
MEXLINKOPT+=-lcudart
LIBCUDART=-L$(LIBOPENCLDIR) -lcudart
endif

include $(ROOTDIR)/commons/Makefile_common.mk

0 comments on commit 423047b

Please sign in to comment.