What is wrong in my Makefile?

No replies
ArdiSSchool10
Offline
Joined: 07/08/2010

When I use this makefile for my program to run under a GTX295 GPU it works perfectly while for a GTX480 GPU it compiles but fails at the first cuda Malloc if I try to run it (on a Fermi architecture). Does anybody have any idea about that?

####### Compiler, tools and options

CC       = gcc

LEX      = flex
YACC     = yacc

CFLAGS   = -D__USE_FIXED_PROTOTYPES__ -O3 -Wall
LEXFLAGS =

YACCFLAGS= -d
LINK     = gcc

LFLAGS   =
LIBS     = $(SUBLIBS) -lm

AR       = ar cqs

RANLIB   =

TAR      = tar -cf
GZIP     = gzip -9f

COPY     = cp -f

COPY_FILE= $(COPY)

COPY_DIR = $(COPY) -r

INSTALL_FILE= $(COPY_FILE)

INSTALL_DIR = $(COPY_DIR)

DEL_FILE = rm -f

SYMLINK  = ln -sf

DEL_DIR  = rmdir
MOVE     = mv -f

CHK_DIR_EXISTS= test -d

MKDIR    = mkdir -p

####### CUDA options

# path of cuda

CUDAPATH = /usr/local/cuda

# path of cuda compiler

NVCC = nvcc

# nvcc flags

NVCC_FLAGS = -O3 -use_fast_math

#
CXX_FLAGS = -I$(CUDAPATH)/include/

# linking library
LD_FLAGS = -L$(CUDAPATH)/lib64/

# necessary at linking phase device
LD_LIBRARIES = -lcuda -lcudart

 

....