diff options
| author | Tor Aamodt <[email protected]> | 2010-07-15 18:09:46 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-07-15 18:09:46 -0800 |
| commit | 69f2911e04ffb1b19eef1fafb8c040af271f656e (patch) | |
| tree | 231d3b6bdc3a202f7c255bfcf7bf2c36e32cee9e /benchmarks/CUDA/CP/common/mk/common.mk | |
creating branch for adding support for CUDA 3.x and Fermi
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6829]
Diffstat (limited to 'benchmarks/CUDA/CP/common/mk/common.mk')
| -rw-r--r-- | benchmarks/CUDA/CP/common/mk/common.mk | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/benchmarks/CUDA/CP/common/mk/common.mk b/benchmarks/CUDA/CP/common/mk/common.mk new file mode 100644 index 0000000..93c76c0 --- /dev/null +++ b/benchmarks/CUDA/CP/common/mk/common.mk @@ -0,0 +1,51 @@ +# (c) 2007 The Board of Trustees of the University of Illinois. + +# Definitions common to all makefiles + +######################################## +# Environment variable check +# +# The environment variables BUILDDIR, SRCDIR, and PARBOIL_ROOT +# should be set on the command line to `make'. +######################################## + +ifeq ("$(SRCDIR)", "") +$(error $$SRCDIR is not set) +endif + +ifeq ("$(PARBOIL_ROOT)", "") +$(error $$PARBOIL_ROOT is not set) +endif + +######################################## +# Variables +######################################## + +# Programs +CC=gcc +CXX=g++ +AR=ar +RANLIB=ranlib + +# Command line options +INCLUDEFLAGS=-I$(CUDAHOME)/include -I$(PARBOIL_ROOT)/common/include +CFLAGS=$(GCCSTD) $(INCLUDEFLAGS) -g $(EXTRA_CFLAGS) +CXXFLAGS=$(INCLUDEFLAGS) -g $(EXTRA_CXXFLAGS) +LDFLAGS=-L$(PARBOIL_ROOT)/common/lib $(EXTRA_LDFLAGS) +LIBS=-lparboil $(EXTRA_LIBS) + +# Pass an extra source language option to GCC +ifeq ("$(CC)","gcc") +GCCSTD=-std=gnu99 +endif + + +######################################## +# Functions +######################################## + +# Add BUILDDIR as a prefix to each element of $1 +INBUILDDIR=$(addprefix $(BUILDDIR)/,$(1)) + +# Add SRCDIR as a prefix to each element of $1 +INSRCDIR=$(addprefix $(SRCDIR)/,$(1)) |
