This repository has been archived by the owner on Oct 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
137 lines (110 loc) · 2.43 KB
/
makefile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# © 2014 George King.
# Permission to use this file is granted in license-qk.txt.
# $@: The file name of the target of the rule.
# $<: The name of the first prerequisite.
# $^: The names of all the prerequisites, with spaces between them.
default: all
src/core/mat-generated.swift: tools/gen-mat.py
$^ > $@
src/core/vec-generated.swift: tools/gen-vec.py
$^ > $@
src/cr/CGPoint-generated.swift: tools/gen-vec.py
$^ CGPoint 2 Flt Flt CoreGraphics > $@
src/cr/CGVector-generated.swift: tools/gen-vec.py
$^ CGVector 2 Flt Flt CoreGraphics > $@
src/scn/V3-generated.swift: tools/gen-vec.py
$^ V3 3 Flt Flt SceneKit > $@
src/scn/V4-generated.swift: tools/gen-vec.py
$^ V4 4 Flt Flt SceneKit > $@
_build/gen-cd-entities: src/core/*.swift src/cd/*.swift src/foundation/*.swift src/std/*.swift tools/gen-cd-entities.swift tools/main.swift
mkdir -p _build
xcrun -sdk macosx swiftc $^ -o $@
.PHONY: default clean gen all cd core cr foundation geom gl img ios scn std parse
clean:
rm -rf _build
rm -f \
src/core/mat-generated.swift \
src/core/vec-generated.swift \
src/cr/CGPoint-generated.swift \
src/cr/CGVector-generated.swift
# all generated source targets.
gen: \
src/core/mat-generated.swift \
src/core/vec-generated.swift \
src/cr/CGPoint-generated.swift \
src/cr/CGVector-generated.swift \
src/scn/V3-generated.swift \
src/scn/V4-generated.swift
# all real targets.
all: _build/gen-cd-entities gen
# parse targets ordered by dependency.
std:
tools/swift-parse-both.sh \
src/std
core:
tools/swift-parse-both.sh \
src/std \
src/core
foundation:
tools/swift-parse-both.sh \
src/std \
src/core \
src/foundation
cd:
tools/swift-parse-both.sh \
src/std \
src/core \
src/foundation \
src/cd
cr:
tools/swift-parse-both.sh \
src/std \
src/core \
src/foundation \
src/cr
mac:
echo tools/swift-parse-mac.sh \
src/std \
src/core \
src/foundation \
src/mac
ios:
echo tools/swift-parse-ios.sh \
src/std \
src/core \
src/foundation \
src/ios
img:
tools/swift-parse-both.sh \
src/std \
src/core \
src/foundation \
src/img
gl:
tools/swift-parse-both.sh \
src/std \
src/core \
src/foundation \
src/cr \
src/img \
src/gl
scn:
tools/swift-parse-both.sh \
src/std \
src/core \
src/foundation \
src/cr \
src/img \
src/gl \
src/scn
geom:
tools/swift-parse-both.sh \
src/std \
src/core \
src/foundation \
src/cr \
src/img \
src/gl \
src/scn \
src/geom
parse: std core foundation cd cr mac ios img geom gl scn