Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
base
Commits
202d87d7
Commit
202d87d7
authored
4 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Variables for CUDA compilation, some clean up and comments
parent
227326d7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/common/buildSettings.mk
+14
-6
14 additions, 6 deletions
config/common/buildSettings.mk
config/common/rules.mk
+22
-19
22 additions, 19 deletions
config/common/rules.mk
config/common/vars.mk
+46
-28
46 additions, 28 deletions
config/common/vars.mk
with
82 additions
and
53 deletions
config/common/buildSettings.mk
+
14
−
6
View file @
202d87d7
...
...
@@ -45,6 +45,12 @@ ARCHLDFLAGS =
# Libraries available for linking by all projects.
ARCHLIBS
=
# Compiler flags for CUDA projects.
ARCHCUDACXXFLAGS
=
# Linker flags for CUDA projects.
ARCHCUDALDFLAGS
=
#####################################################################
#
# Darwin specific sys vars and ext libs
...
...
@@ -105,12 +111,14 @@ ifneq ($(shell which nvcc), )
# - Do not use -pedantic, otherwise *every single line* of
# transpiled cuda code will trigger "warning: style of line
# directive is a GCC extension".
CUDACXXFLAGS
=
-I
${
CUDADIR
}
/include
\
${
GENCODE_FLAGS
}
\
-DARMA_ALLOW_FAKE_GCC
\
--compiler-options
\
"
$(
filter-out -pedantic,
${
ARCHCXXFLAGS
})
"
CUDALDFLAGS
=
-lcurand
-lcudart
ARCCUDACXXFLAGS
=
-I
${
CUDADIR
}
/include
\
-maxrregcount
=
64
\
${
GENCODE_FLAGS
}
\
-DARMA_ALLOW_FAKE_GCC
\
--compiler-options
\
"
$(
filter-out -pedantic,
${
ARCHCXXFLAGS
})
"
ARCHCUDALDFLAGS
=
-L
${
CUDADIR
}
/lib
\
-L
${
CUDADIR
}
/lib/stubs
ifeq
($(SYSTYPE), Darwin)
...
...
This diff is collapsed.
Click to expand it.
config/common/rules.mk
+
22
−
19
View file @
202d87d7
# $Id$
# Make rules for FSL projects
#
# Automatic GNU make rules are used for compiling C and C++ files.
all
:
help
:
@
echo
" make Rebuild project targets"
;
@
echo
" make clean Remove executables, libraries and object files"
;
@
echo
" make install Install into your local FSLDEVDIR"
;
clean
:
${
RM
}
-f
*
.o
*
.a
*
.so
*
.exe depend.mk
\
${
XFILES
}
${
FXFILES
}
${
SOFILES
}
${
AFILES
}
${
TESTXFILES
}
insertcopyright
:
${
FSLCONFDIR
}
/common/insertcopyright
*
*
/
*
depend
:
${
RM
}
-f
depend.mk
${
MAKE
}
depend.mk
depend.mk
:
@
echo
Building dependency file depend.mk
@
for
srcfile
in
`
find
.
-name
"*.c"
-or
-name
"*.cc"
-or
-name
"*.cxx"
-or
-name
"*.cpp"
-or
-name
"*.inc"
-or
-name
"*.hpp"
`
verylongdummyname
;
do
\
if
[
-f
$$
srcfile
]
;
then
\
${
CC
}
-MM
${
INCFLAGS
}
$$
srcfile
>>
depend.mk
;
\
else
\
touch
depend.mk
;
\
fi
\
done
install
:
@${
MAKE
}
"DESTDIR=
${
FSLDEVDIR
}
"
master-install-script
...
...
@@ -164,22 +185,4 @@ datainstall:
fi
;
\
done
insertcopyright
:
${
FSLCONFDIR
}
/common/insertcopyright
*
*
/
*
depend
:
${
RM
}
-f
depend.mk
${
MAKE
}
depend.mk
depend.mk
:
@
echo
Building dependency file depend.mk
@
for
srcfile
in
`
find
.
-name
"*.c"
-or
-name
"*.cc"
-or
-name
"*.cxx"
-or
-name
"*.cpp"
-or
-name
"*.inc"
-or
-name
"*.hpp"
`
verylongdummyname
;
do
\
if
[
-f
$$
srcfile
]
;
then
\
${
CC
}
-MM
${
INCFLAGS
}
$$
srcfile
>>
depend.mk
;
\
else
\
touch
depend.mk
;
\
fi
\
done
include
depend.mk
This diff is collapsed.
Click to expand it.
config/common/vars.mk
+
46
−
28
View file @
202d87d7
...
...
@@ -7,25 +7,37 @@ PROJNAME =
# Project-specific compiler/linker flags - these
# can be overridden in the project Makefile.
USRLDFLAGS
=
USRINCFLAGS
=
USRCFLAGS
=
USRCXXFLAGS
=
LIBS
=
USRLDFLAGS
=
# Project-specific linker flags
USRINCFLAGS
=
# Project-specific include directories
USRCFLAGS
=
# Project-specific compiler flags for C projects
USRCXXFLAGS
=
# Project-specific compiler flags for C++ projects
LIBS
=
# Project-specific libraries to link against for C
# and C++ projects - these are incorporated into the
# final LDFLAGS, below.
USRCUDACXXFLAGS
=
# Project-specific compiler flags for CUDA projects
USRCUDALDFLAGS
=
# Project-specific linker flags for CUDA projects
CUDALIBS
=
# Project-specific libraries to link against for CUDA
# projects - these are incorporated into the final
# CUDALDFLAGS, below.
# Project outputs - these variables control
# what gets installed from a project. The
# values given below are the defaults -
# they may be customised/overridden in
# project Makefiles
HFILES
=
*
.h
AFILES
=
*
.a
SOFILES
=
*
.so
XFILES
=
SCRIPTS
=
PYFILES
=
*
.py
TCLFILES
=
*
.tcl
TESTXILES
=
# values given below are the defaults - they
# may be customised/overridden in project
# Makefiles.
HFILES
=
*
.h
# installed into $FSLDIR/include/$PROJNAME/
AFILES
=
*
.a
# installed into $FSLDIR/lib/
SOFILES
=
*
.so
# installed into $FSLDIR/lib/
XFILES
=
# installed into $FSLDIR/bin/
SCRIPTS
=
# installed into $FSLDIR/bin/
RUNTCLS
=
# link to Runtcl created in $FSLDIR/bin/ which assumes
# that <file>.tcl has been installed into
# $FSLDIR/tcl/
PYFILES
=
*
.py
# installed into $FSLDIR/etc/fsl/python/$PROJNAME/
TCLFILES
=
*
.tcl
# installed into $FSLDIR/tcl/
DATAFILES
=
# installed into $FSLDIR/data/$PROJNAME/
TESTXILES
=
# not currently used
# Final install destinations
# for project outputs
...
...
@@ -52,22 +64,28 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
#############################
# Ignore flags provided by the environment
CFLAGS
=
CXXFLAGS
=
CPPFLAGS
=
LDFLAGS
=
CFLAGS
=
CXXFLAGS
=
CPPFLAGS
=
CUDACXXFLAGS
=
LDFLAGS
=
CUDALDFLAGS
=
# All projects must use these flags for
# compilation/linking, using the form:
#
# $(CXX) $(CXXFLAGS) <project flags/files> $(LDFLAGS)
# $(CC) $(CFLAGS) <project flags/files> $(LDFLAGS)
# $(CC) $(CFLAGS) <project flags/files> $(LDFLAGS)
# $(CXX) $(CXXFLAGS) <project flags/files> $(LDFLAGS)
# $(NVCC) $(CUDACXXFLAGS) <project flags/files> $(LDFLAGS) $(CUDALDFLAGS)
#
# LDFLAGS *must* come at the end, to ensure proper linking.
LDFLAGS
+=
${
ARCHLDFLAGS
}
${
USRLDFLAGS
}
\
-L
.
-L
${
DEVLIBDIR
}
-L
${
LIBDIR
}
\
${
LIBS
}
${
ARCHLIBS
}
CFLAGS
+=
${
ARCHCFLAGS
}
${
USRCFLAGS
}
${
INCFLAGS
}
CXXFLAGS
+=
${
ARCHCXXFLAGS
}
${
USRCXXFLAGS
}
${
INCFLAGS
}
CUDACXXFLAGS
+=
${
INCFLAGS
}
LDFLAGS
+=
${
ARCHLDFLAGS
}
${
USRLDFLAGS
}
\
-L
.
-L
${
DEVLIBDIR
}
-L
${
LIBDIR
}
\
${
LIBS
}
${
ARCHLIBS
}
CUDALDFLAGS
+=
${
ARCHCUDALDFLAGS
}
${
USRCUDALDFLAGS
}
\
-L
.
-L
${
DEVLIBDIR
}
-L
${
LIBDIR
}
\
${
CUDALIBS
}
CFLAGS
+=
${
ARCHCFLAGS
}
${
USRCFLAGS
}
${
INCFLAGS
}
CXXFLAGS
+=
${
ARCHCXXFLAGS
}
${
USRCXXFLAGS
}
${
INCFLAGS
}
CUDACXXFLAGS
+=
${
ARCHCUDACXXFLAGS
}
${
USRCUDACXXFLAGS
}
${
INCFLAGS
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment