Skip to content

Commit

Permalink
Merge pull request #8 from mgab/master
Browse files Browse the repository at this point in the history
Modify Makefile so that it is compatible with GCC v5
  • Loading branch information
Sebastian Riedel committed Oct 8, 2015
2 parents 1bab7cf + c9c61d4 commit 3614a40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ INSTALL_DIR=/usr
CC=gcc
CPP=g++
NVCC=nvcc
GCCVERSION := $(shell expr `$(CC) -dumpversion | cut -f1 -d.`)
GCC5NEWER := $(shell expr `echo $(GCCVERSION)` \>= 5)
#MEX=mex
LINK=ar rcs
CFLAGS=-Wall -I$(IDIR) -O3 -msse2
Expand All @@ -21,6 +23,9 @@ CUDAFLAGS=-O3 -lcuda -lcudart -lcurand -arch=compute_20
#CYGWIN=1
#WINDOWS=1

ifeq "$(GCC5NEWER)" "1"
CFLAGS += -fgnu89-inline
endif

ifdef WINDOWS
CFLAGS += -static -mno-cygwin -I"C:\Program Files\GnuWin32\include" -DHAVE_WINDOWS #-mwindows -I/usr/include
Expand Down

0 comments on commit 3614a40

Please sign in to comment.