forked from flyover/box2d.ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
216 lines (190 loc) · 10.7 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#
# Copyright (c) Flyover Games, LLC
#
SHELL := /usr/bin/env bash
ANSI_NONE = "\e[1;0m"
ANSI_BLACK = "\e[1;30m"
ANSI_RED = "\e[1;31m"
ANSI_GREEN = "\e[1;32m"
ANSI_YELLOW = "\e[1;33m"
ANSI_BLUE = "\e[1;34m"
ANSI_MAGENTA = "\e[1;35m"
ANSI_CYAN = "\e[1;36m"
ANSI_WHITE = "\e[1;37m"
PATH := $(shell npm bin):$(PATH)
DONE = @printf "done: "$(ANSI_GREEN)"%s"$(ANSI_NONE)"\n" $@
all: help
help:
@echo $(PATH)
@printf "usage:\n"
@printf "$$ make <"$(ANSI_YELLOW)"target"$(ANSI_NONE)">\n"
@printf "target:\n"
@printf " "$(ANSI_YELLOW)"clean"$(ANSI_NONE)" : clean project\n"
@printf " "$(ANSI_YELLOW)"build"$(ANSI_NONE)" : build project\n"
# box2d
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Box2D.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Common/b2Settings.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Common/b2Math.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Common/b2Draw.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Common/b2Timer.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Common/b2GrowableStack.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Common/b2BlockAllocator.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Common/b2StackAllocator.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2Collision.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2Distance.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2BroadPhase.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2DynamicTree.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2TimeOfImpact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2CollideCircle.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2CollidePolygon.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/b2CollideEdge.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/Shapes/b2Shape.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/Shapes/b2CircleShape.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/Shapes/b2PolygonShape.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/Shapes/b2EdgeShape.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Collision/Shapes/b2ChainShape.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/b2Fixture.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/b2Body.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/b2World.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/b2WorldCallbacks.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/b2Island.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/b2TimeStep.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/b2ContactManager.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2Contact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ContactFactory.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ContactSolver.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2CircleContact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2PolygonContact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2Joint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2AreaJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2DistanceJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2FrictionJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2GearJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2MotorJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2MouseJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2PrismaticJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2PulleyJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2RevoluteJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2RopeJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2WeldJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Dynamics/Joints/b2WheelJoint.ts
BOX2D_SOURCE_TS_FILES += Box2D/Box2D/Rope/b2Rope.ts
BOX2D_OUTPUT_JS_FILE = Box2D/Build/Box2D/box2d.js
BOX2D_OUTPUT_D_TS_FILE = Box2D/Build/Box2D/box2d.d.ts
BOX2D_OUTPUT_JS_MAP_FILE = Box2D/Build/Box2D/box2d.js.map
clean: clean-box2d
clean: clean-box2d-helloworld
clean: clean-box2d-testbed
build: build-box2d
build: build-box2d-helloworld
build: build-box2d-testbed
clean-box2d:
@rm -f $(BOX2D_OUTPUT_JS_FILE)
@rm -f $(BOX2D_OUTPUT_D_TS_FILE)
@rm -f $(BOX2D_OUTPUT_JS_MAP_FILE)
$(DONE)
build-box2d: $(BOX2D_OUTPUT_JS_FILE)
# @$$(npm bin)/tsc -p Box2D/HelloWorld
# @$$(npm bin)/tsc --declaration --sourcemap --target ES6 --module commonjs --outDir build/Box2D $(BOX2D_SOURCE_TS_FILES)
$(DONE)
$(BOX2D_OUTPUT_JS_FILE): $(BOX2D_SOURCE_TS_FILES)
@$$(npm bin)/tsc --declaration --sourcemap --target ES6 --module system --outFile $@ $<
$(DONE)
# box2d-helloworld
BOX2D_HELLOWORLD_SOURCE_TS_FILES += Box2D/HelloWorld/HelloWorld.ts
BOX2D_HELLOWORLD_OUTPUT_JS_FILE = Box2D/Build/HelloWorld/box2d-helloworld.js
BOX2D_HELLOWORLD_OUTPUT_D_TS_FILE = Box2D/Build/HelloWorld/box2d-helloworld.d.ts
BOX2D_HELLOWORLD_OUTPUT_JS_MAP_FILE = Box2D/Build/HelloWorld/box2d-helloworld.js.map
clean-box2d-helloworld:
@rm -f $(BOX2D_HELLOWORLD_OUTPUT_JS_FILE)
@rm -f $(BOX2D_HELLOWORLD_OUTPUT_D_TS_FILE)
@rm -f $(BOX2D_HELLOWORLD_OUTPUT_JS_MAP_FILE)
$(DONE)
build-box2d-helloworld: $(BOX2D_HELLOWORLD_OUTPUT_JS_FILE)
# @$$(npm bin)/tsc -p Box2D/HelloWorld
# @$$(npm bin)/tsc --declaration --sourcemap --target ES6 --module commonjs --outDir build/HelloWorld $(BOX2D_HELLOWORLD_SOURCE_TS_FILES)
$(DONE)
$(BOX2D_HELLOWORLD_OUTPUT_JS_FILE): $(BOX2D_HELLOWORLD_SOURCE_TS_FILES)
@$$(npm bin)/tsc --declaration --sourcemap --target ES6 --module system --outFile $@ $<
$(DONE)
# box2d-testbed
BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Testbed.ts
BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Framework/Main.ts
BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Framework/DebugDraw.ts
BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Framework/Test.ts
BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/TestEntries.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/AddPair.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/ApplyForce.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/BlobTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/BodyTypes.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Breakable.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Bridge.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/BulletTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/BuoyancyTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Cantilever.ts
BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Car.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Chain.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/CharacterCollision.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/CollisionFiltering.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/CollisionProcessing.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/CompoundShapes.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Confined.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/ContinuousTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/ConvexHull.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/ConveyorBelt.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/DistanceTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Dominos.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/DumpShell.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/DynamicTreeTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/EdgeShapes.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/EdgeTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Gears.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Mobile.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/MobileBalanced.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/MotorJoint.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/OneSidedPlatform.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Pinball.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/PolyCollision.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/PolyShapes.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Prismatic.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Pulleys.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Pyramid.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/RayCast.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Revolute.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Rope.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/RopeJoint.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/SensorTest.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/ShapeEditing.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/SliderCrank.ts
BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/SphereStack.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/TestCCD.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/TestRagdoll.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/TestStack.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/TheoJansen.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Tiles.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/TimeOfImpact.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Tumbler.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/VaryingFriction.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/VaryingRestitution.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/VerticalStack.ts
#BOX2D_TESTBED_SOURCE_TS_FILES += Box2D/Testbed/Tests/Web.ts
BOX2D_TESTBED_OUTPUT_JS_FILE = Box2D/Build/Testbed/box2d-testbed.js
BOX2D_TESTBED_OUTPUT_D_TS_FILE = Box2D/Build/Testbed/box2d-testbed.d.ts
BOX2D_TESTBED_OUTPUT_JS_MAP_FILE = Box2D/Build/Testbed/box2d-testbed.js.map
clean-box2d-testbed:
@rm -f $(BOX2D_TESTBED_OUTPUT_JS_FILE)
@rm -f $(BOX2D_TESTBED_OUTPUT_D_TS_FILE)
@rm -f $(BOX2D_TESTBED_OUTPUT_JS_MAP_FILE)
$(DONE)
build-box2d-testbed: $(BOX2D_TESTBED_OUTPUT_JS_FILE)
# @$$(npm bin)/tsc -p Box2D/Testbed
# @$$(npm bin)/tsc --declaration --sourcemap --target ES6 --module commonjs --outDir build/Testbed $(BOX2D_TESTBED_SOURCE_TS_FILES)
$(DONE)
$(BOX2D_TESTBED_OUTPUT_JS_FILE): $(BOX2D_TESTBED_SOURCE_TS_FILES)
@$$(npm bin)/tsc --declaration --sourcemap --target ES6 --module system --outFile $@ $<
$(DONE)