-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
os-paths.jam
60 lines (55 loc) · 2.04 KB
/
os-paths.jam
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
54
55
56
57
58
59
60
# Copyright 2020-present Ksyun
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os ;
import path ;
if [ os.name ] = LINUX {
if [ os.platform ] = ARM {
.include-paths = /usr/local/include /usr/include /usr/include/aarch64-linux-gnu ;
.lib-paths = /usr/local/lib /usr/lib /usr/lib/aarch64-linux-gnu ;
} else {
local cc = [ os.environ CC ] ;
if $(cc) = ARM64 {
.include-paths = /usr/aarch64-linux-gnu/include /usr/include/aarch64-linux-gnu /usr/local/include /usr/include ;
.lib-paths = /usr/aarch64-linux-gnu/lib /usr/lib/aarch64-linux-gnu /usr/local/lib /usr/lib ;
} else {
.include-paths = /usr/local/include /usr/include /usr/include/x86_64-linux-gnu ;
.lib-paths = /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu ;
}
}
} else if [ os.name ] = MACOSX {
if [ os.platform ] = ARM {
.include-paths = /opt/homebrew/include ;
.lib-paths = /opt/homebrew/lib ;
} else {
.include-paths = /usr/local/Homebrew/include ;
.lib-paths = /usr/local/Homebrew/lib ;
}
} else if [ os.name ] = NT {
local third-party-sdk = [ os.environ THIRD_PARTY_SDK ] ;
if $(third-party-sdk) {
.include-paths = [ path.join $(third-party-sdk) include ] ;
.lib-paths = [ path.join $(third-party-sdk) lib ] ;
} else {
.include-paths = C:/dev/include D:/dev/include E:/dev/include ;
.lib-paths = C:/dev/lib D:/dev/lib E:/dev/lib ;
}
}
ECHO "include paths:" $(.include-paths) ;
ECHO "lib paths:" $(.lib-paths) ;
rule include-paths ( ) {
return $(.include-paths) ;
}
rule lib-paths ( ) {
return $(.lib-paths) ;
}