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
2ce3c2d2
Commit
2ce3c2d2
authored
4 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: Honour compilation flags defined in the environment
parent
f14bd2c4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/buildSettings.mk
+16
-16
16 additions, 16 deletions
config/buildSettings.mk
config/common/vars.mk
+29
-25
29 additions, 25 deletions
config/common/vars.mk
with
45 additions
and
41 deletions
config/buildSettings.mk
+
16
−
16
View file @
2ce3c2d2
...
...
@@ -12,14 +12,14 @@ SYSTYPE := $(shell uname -s)
# Standard commands
#
#####################################################################
SHELL
=
/bin/sh
RM
=
/bin/rm
CP
=
/bin/cp
MV
=
/bin/mv
CHMOD
=
/bin/chmod
MKDIR
=
/bin/mkdir
INSTALL
=
install
-p
TCLSH
=
${
FSLDIR
}
/bin/fsltclsh
SHELL
?
=
/bin/sh
RM
?
=
/bin/rm
CP
?
=
/bin/cp
MV
?
=
/bin/mv
CHMOD
?
=
/bin/chmod
MKDIR
?
=
/bin/mkdir
INSTALL
?
=
install
-p
TCLSH
?
=
${
FSLDIR
}
/bin/fsltclsh
#####################################################################
#
...
...
@@ -53,10 +53,10 @@ ARCHLIBS =
ifeq
($(SYSTYPE), Darwin)
# Commands
CC
=
cc
CXX
=
c++
CXX11
=
clang++
RANLIB
=
ranlib
CC
?
=
cc
CXX
?
=
c++
CXX11
?
=
clang++
RANLIB
?
=
ranlib
# Compiler flags
ARCHCXXFLAGS
+=
-arch
x86_64
-O3
-ansi
-Wall
-pedantic
...
...
@@ -87,10 +87,10 @@ endif # if Darwin
ifeq
($(SYSTYPE), Linux)
# Commands
CC
=
gcc
CXX
=
c++
CXX11
=
c++
RANLIB
=
echo
CC
?
=
gcc
CXX
?
=
c++
CXX11
?
=
c++
RANLIB
?
=
echo
# Compiler flags
ARCHCFLAGS
+=
-m64
-fPIC
-O3
-fexpensive-optimizations
\
...
...
This diff is collapsed.
Click to expand it.
config/common/vars.mk
+
29
−
25
View file @
2ce3c2d2
...
...
@@ -7,38 +7,38 @@ PROJNAME =
# Project-specific compiler/linker flags - these
# can be overridden in the project Makefile
USRLDFLAGS
=
USRLDFLAGS
=
USRINCFLAGS
=
USRCFLAGS
=
USRCFLAGS
=
USRCXXFLAGS
=
LIBS
=
LIBS
=
# Project outputs - these variables control
# what gets installed from a project. May
# be customised/overridden in project
# Makefiles
HFILES
=
*
.h
AFILES
=
*
.a
SOFILES
=
*
.so
XFILES
=
SCRIPTS
=
TCLFILES
=
*
.tcl
MANFILES
=
man/
*
HFILES
=
*
.h
AFILES
=
*
.a
SOFILES
=
*
.so
XFILES
=
SCRIPTS
=
TCLFILES
=
*
.tcl
MANFILES
=
man/
*
TESTXILES
=
# Final install destinations for project outputs
DESTDIR
=
${
FSLDEVDIR
}
dest_INCDIR
=
${
DESTDIR
}
/include
dest_LIBDIR
=
${
DESTDIR
}
/lib
dest_BINDIR
=
${
DESTDIR
}
/bin
dest_MANDIR
=
${
DESTDIR
}
/man
dest_TCLDIR
=
${
DESTDIR
}
/tcl
dest_DOCDIR
=
${
DESTDIR
}
/doc
DESTDIR
=
${
FSLDEVDIR
}
dest_INCDIR
=
${
DESTDIR
}
/include
dest_LIBDIR
=
${
DESTDIR
}
/lib
dest_BINDIR
=
${
DESTDIR
}
/bin
dest_MANDIR
=
${
DESTDIR
}
/man
dest_TCLDIR
=
${
DESTDIR
}
/tcl
dest_DOCDIR
=
${
DESTDIR
}
/doc
dest_REFDOCDIR
=
${
DESTDIR
}
/refdoc
# Standard header/library locations for compiling/linking
INCDIR
=
${
FSLDIR
}
/include
LIBDIR
=
${
FSLDIR
}
/lib
INCDIR
=
${
FSLDIR
}
/include
LIBDIR
=
${
FSLDIR
}
/lib
DEVINCDIR
=
${
FSLDEVDIR
}
/include
DEVLIBDIR
=
${
FSLDEVDIR
}
/lib
...
...
@@ -49,6 +49,11 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
# Final compiler/linker flags
#############################
# Honour any flags provided by the environment
CFLAGS
?=
CXXFLAGS
?=
LDFLAGS
?=
# All projects must use these flags for
# compilation/linking, using the form:
#
...
...
@@ -57,9 +62,8 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
#
# LDFLAGS *must* come at the end, to ensure proper linking.
LDFLAGS
=
${
ARCHLDFLAGS
}
${
USRLDFLAGS
}
\
-L
.
-L
${
DEVLIBDIR
}
-L
${
LIBDIR
}
\
${
LIBS
}
${
ARCHLIBS
}
CFLAGS
=
${
ARCHCFLAGS
}
${
USRCFLAGS
}
${
USRINCFLAGS
}
${
INCFLAGS
}
CXXFLAGS
=
${
ARCHCXXFLAGS
}
${
USRCXXFLAGS
}
${
USRINCFLAGS
}
${
INCFLAGS
}
LDFLAGS
+=
${
ARCHLDFLAGS
}
${
USRLDFLAGS
}
\
-L
.
-L
${
DEVLIBDIR
}
-L
${
LIBDIR
}
\
${
LIBS
}
${
ARCHLIBS
}
CFLAGS
+=
${
ARCHCFLAGS
}
${
USRCFLAGS
}
${
INCFLAGS
}
CXXFLAGS
+=
${
ARCHCXXFLAGS
}
${
USRCXXFLAGS
}
${
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