This repository has been archived by the owner on Jan 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathMakefile_config_clang
53 lines (41 loc) · 3.23 KB
/
Makefile_config_clang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
rel ?= 1# 0=debug or 1=release (usually 1)
x64 = 0# x64 is not supported by c:/mingw/ 32-bit version (nor by cygwin clang).
include $(dir $(lastword $(MAKEFILE_LIST)))/Makefile_base_clang
# Note that clang finds c:/mingw/ automatically! (at least for clang 3.5 and mingw 4.7.2).
# However, it requires c:/mingw/bin to be in PATH for correct linking.
# default is -target i686-pc-mingw32
# I installed clang 3.4.2 under cygwin. When I try to run it, it cannot find:
# "/usr/lib/gcc/i686-pc-cygwin/4.8.3/include/c++".
# I suspect that I would have to install the entire 32-bit library and toolchain (ar, etc.) for g++.
# I decided not to do this as it would be confusing to have multiple toolchains.
# Would have modified: PATH, gfx_libs, openmp support.
# 20150918 installing clang 3.7 from http://llvm.org/releases/download.html
# relevant: http://stackoverflow.com/questions/32239122/what-do-you-need-to-install-to-use-clang-on-windows-to-build-c14-for-64-bit
# I selected: http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.3/threads-posix/seh/x86_64-4.9.3-release-posix-seh-rt_v4-rev1.7z/download
# then installed this into c:/mingw
# clang 3.5 on hhopped ("SVN r203967")
# $(call prepend_PATH,c:/Program Files (x86)/LLVM/bin)
# $(call prepend_PATH,c:/mingw/bin) # containing 4.7.2 installed how?
# # set path=( c:/mingw/bin 'c:/program files (x86)/llvm/bin' $path:q); unhash
# See http://clang.llvm.org/docs/UsersManual.html#clang-cl:
# Clang expects the GCC executable "gcc.exe" compiled for i686-w64-mingw32 (or x86_64-w64-mingw32)
# to be present on PATH.
# clang 3.7 (64bit) on hhoppew (gave up)
# $(call prepend_PATH,C:/Program Files/mingw-w64/x86_64-5.2.0-posix-seh-rt_v4-rev0/mingw64/x86_64-w64-mingw32/bin)
# $(call prepend_PATH,c:/Program Files/mingw-w64/x86_64-5.2.0-posix-seh-rt_v4-rev0/mingw64/bin)
# $(call prepend_PATH,C:/Program Files/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev0/mingw64/bin)
# $(call prepend_PATH,c:/mingw/bin) # http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/ # does not work
# $(call prepend_PATH,c:/mingw64/bin) # containing x86_64-4.9.3-release-posix-seh-rt_v4-rev1.7z
# $(call prepend_PATH,c:/mingw/bin) # link errors "C:\mingw32_old_4.7.2\bin\ld.exe: unrecognised emulation mode: i386pep Supported emulations: i386pe"
# $(call prepend_PATH,c:/Program Files/LLVM/bin)
# clang 3.7 (32bit) on hhoppew
$(call prepend_PATH,c:/Program Files (x86)/LLVM/bin)
$(call prepend_PATH,c:/mingw/bin) # http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.5-beta-20120426-1/ # same as used with clang 3.5
# set path=( c:/mingw/bin 'c:/program files (x86)/llvm/bin' $path:q); unhash
# This was helpful in ~/src/lib_src/CLAPACK/make.inc to define the constant _EM_DENORMAL from <float.h>
# used in ~/src/lib_src/CLAPACK/F2CLIBS/libf2c/uninit.c
# as hinted by http://mingw.5.n7.nabble.com/Problem-building-libf2c-with-mingw-get-setup-exe-td33596.html
# Also avoided problems with "#define bool bool" and linker errors with "sincos()" and "sincosf()".
CFLAGS += -isystem c:/MinGW/include
gfx_libs ?= -lglu32 -lopengl32 -lwinmm -lgdi32 -lcomdlg32
## See also notes in ./Makefile_config_clangcl and ~/doc/computer/pc.txt