Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libclfft
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
einsteinathome
libclfft
Commits
137b4784
Commit
137b4784
authored
5 years ago
by
Bernd Machenschalk
Browse files
Options
Downloads
Plain Diff
Merge branch 'improve_Makefile' into 'master'
Makefile improvements See merge request
!3
parents
7439e79e
4967ca64
No related branches found
No related tags found
1 merge request
!3
Makefile improvements
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+10
-5
10 additions, 5 deletions
Makefile
example/Makefile
+13
-1
13 additions, 1 deletion
example/Makefile
src/Makefile
+29
-11
29 additions, 11 deletions
src/Makefile
src/Makefile.mingw
+1
-1
1 addition, 1 deletion
src/Makefile.mingw
with
53 additions
and
18 deletions
Makefile
+
10
−
5
View file @
137b4784
default
:
linux
linux
:
$(
MAKE
)
-C
src
$(
MAKE
)
-C
example
linux
:
static shared sample
macos
:
linux
static
:
$(
MAKE
)
-C
src static
shared
:
$(
MAKE
)
-C
src shared
macos
:
$(
MAKE
)
-C
src
sample
:
$(
MAKE
)
-C
example
win32
:
...
...
This diff is collapsed.
Click to expand it.
example/Makefile
+
13
−
1
View file @
137b4784
...
...
@@ -5,7 +5,19 @@ CXX ?= g++
TARGET
=
clfft_example
CXXFLAGS
+=
-O3
-Wall
-g
-I
$(
NVIDIA_SDK_INSTALL_PATH
)
/OpenCL/common/inc
-I
$(
AMDAPPSDKROOT
)
/include
-I
../include
ifndef
OPENCL_INCLUDE
ifdef
CUDA_INSTALL_PATH
OPENCL_INCLUDE
=
$(
CUDA_INSTALL_PATH
)
/include
endif
ifdef
OPENCL_INSTALL_PATH
OPENCL_INCLUDE
=
$(
OPENCL_INSTALL_PATH
)
/include
endif
endif
ifndef
OPENCL_INCLUDE
OPENCL_INCLUDE
=
$(
AMDAPPSDKROOT
)
/include
-I
$(
NVIDIA_SDK_INSTALL_PATH
)
/OpenCL/common/inc
endif
CXXFLAGS
+=
-O3
-Wall
-g
-I
$(
OPENCL_INCLUDE
)
-I
../include
-fPIC
LDFLAGS
+=
$(
PWD
)
/../lib/libclfft.a
OS
=
$(
shell
uname
-s
)
...
...
This diff is collapsed.
Click to expand it.
src/Makefile
+
29
−
11
View file @
137b4784
...
...
@@ -3,25 +3,45 @@ AMDAPPSDKROOT ?= /opt/AMDAPP
CXX
?=
g++
AR
?=
ar
TARGET
=
libclfft.a
TARGET2
=
libclfft.so
TARGET
=
lib
e
clfft.a
TARGET2
=
lib
e
clfft.so
CXXFLAGS
+=
-O3
-Wall
-g
-I
$(
NVIDIA_SDK_INSTALL_PATH
)
/OpenCL/common/inc
-I
$(
AMDAPPSDKROOT
)
/include
-I
../include
-fPIC
ifndef
OPENCL_INCLUDE
ifdef
CUDA_INSTALL_PATH
OPENCL_INCLUDE
=
$(
CUDA_INSTALL_PATH
)
/include
endif
ifdef
OPENCL_INSTALL_PATH
OPENCL_INCLUDE
=
$(
OPENCL_INSTALL_PATH
)
/include
endif
endif
ifndef
OPENCL_INCLUDE
OPENCL_INCLUDE
=
$(
AMDAPPSDKROOT
)
/include
-I
$(
NVIDIA_SDK_INSTALL_PATH
)
/OpenCL/common/inc
endif
CXXFLAGS
+=
-O3
-Wall
-g
-I
$(
OPENCL_INCLUDE
)
-I
../include
-fPIC
OS
=
$(
shell
uname
-s
)
ifeq
($(OS), Darwin)
CXXFLAGS
+=
-I
/System/Library/Frameworks
LDFLAGS
+=
-framework
OpenCL
endif
OBJECTS
=
fft_setup.o fft_execute.o fft_kernelstring.o
PREFIX
?=
"."
default
:
static shared
static
:
$(TARGET)
shared
:
$(TARGET2)
$(TARGET)
:
$(OBJECTS)
$(
AR
)
rcs
$(
TARGET
)
$(
OBJECTS
)
$(
CXX
)
-shared
-o
$(
TARGET2
)
$(
OBJECTS
)
mkdir
-p
../lib
cp
$(
TARGET
)
../lib/
cp
$(
TARGET2
)
../lib/
cp
$(
TARGET
)
../lib/libclfft.a
$(TARGET2)
:
$(OBJECTS)
$(
CXX
)
$(
LDFLAGS
)
-shared
-o
$(
TARGET2
)
$(
OBJECTS
)
fft_setup.o
:
fft_setup.cpp fft_internal.h fft_base_kernels.h
$(
CXX
)
$(
CXXFLAGS
)
-c
fft_setup.cpp
...
...
@@ -32,12 +52,10 @@ fft_execute.o: fft_execute.cpp ../include/clFFT.h fft_internal.h
fft_kernelstring.o
:
fft_kernelstring.cpp ../include/clFFT.h fft_internal.h
$(
CXX
)
$(
CXXFLAGS
)
-c
fft_kernelstring.cpp
install
:
$(TARGET)
../include/clFFT.h
install
:
../include/clFFT.h
libeclfft.*
mkdir
-p
$(
PREFIX
)
/lib
$(
PREFIX
)
/include
cp
../include/clFFT.h
$(
PREFIX
)
/include/eclfft.h
cp
$(
TARGET
)
$(
PREFIX
)
/lib/libeclfft.a
cp
$(
TARGET2
)
$(
PREFIX
)
/lib/libeclfft.so
cp
libeclfft.
*
$(
PREFIX
)
/lib/
clean
:
rm
-f
*
.o
rm
-f
*
.a
rm
-f
*
.o
*
.a
*
.so
This diff is collapsed.
Click to expand it.
src/Makefile.mingw
+
1
−
1
View file @
137b4784
...
...
@@ -3,7 +3,7 @@ AMDAPPSDKROOT ?= /opt/AMDAPP
CXX
?=
i586-mingw32msvc-g++
AR
?=
i586-mingw32msvc-ar
TARGET
=
libclfft.a
TARGET
=
lib
e
clfft.a
CXXFLAGS
+=
-O3
-Wall
-g
-I
$(
NVIDIA_SDK_INSTALL_PATH
)
/OpenCL/common/inc
-I
$(
AMDAPPSDKROOT
)
/include
-I
../include
...
...
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