Skip to content
Snippets Groups Projects

Makefile improvements

Merged Bernd Machenschalk requested to merge improve_Makefile into master
3 unresolved threads
  • allow to build shared and static versions separately
  • fix OSX shared build

Apparently for use in LALPulsar ResamplingOpenCL it's occasionally necessary to build a shared version of this library. This modification allows to build (and install) static and shared versions separately, and also fixes building the shared version on Mac OSX.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
3 3 CXX ?= g++
4 4 AR ?= ar
5 5
6 TARGET = libclfft.a
7 TARGET2 = libclfft.so
6 TARGET = libeclfft.a
7 TARGET2 = libeclfft.so
8 8
9 CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(AMDAPPSDKROOT)/include -I../include -fPIC
9 ifndef OPENCL_INCLUDE
10 ifdef AMDAPPSDKROOT
11 OPENCL_INCLUDE = $(AMDAPPSDKROOT)/include
  • Thanks, good catch! Well, at least you could override by setting OPENCL_INCLUDE or CUDA_INSTALL_PATH, but indeed the AMDAPPSDKROOT will never be used. Need to think about this some more, I hate to hardcode paths in Makefiles of (ultimately) public projects.

  • 35 58 install: $(TARGET) ../include/clFFT.h
  • added 2 commits

    • 9ba1bd5c - fix selection of possible include paths
    • 6123b933 - allow static and shared builds from top level

    Compare with previous version

  • added 1 commit

    • cec37b69 - don't force building the static version when installing

    Compare with previous version

  • 3 linux:
    4 $(MAKE) -C src
    5 $(MAKE) -C example
    3 linux: static shared example
    4
    5 macos: linux
    6
    7 static:
    8 $(MAKE) -C src static
    9
    10 shared:
    11 $(MAKE) -C src shared
    6 12
    7 macos:
    8 $(MAKE) -C src
    13 example:
  • added 1 commit

    • 06adfda0 - Makefile: renamed target 'sample' to avoid conflict with directory name

    Compare with previous version

  • @maxBensch any further comments on this? If not, I'll merge that.

  • I would also include OPENCL_INCLUDE and CUDA_INSTALL_PATH in the Makefile from the example for completeness, but apart from that I have no comments on this more.

  • added 1 commit

    • 4967ca64 - example/Makefile: adapt the include path selection from src/Makefile here

    Compare with previous version

  • @bema yes, this is good. No further comments then.

  • mentioned in commit 137b4784

  • Please register or sign in to reply
    Loading