-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
687 lines (589 loc) · 35.6 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
#
# Copyright (c) Flyover Games, LLC
#
SHELL := /usr/bin/env bash
__default__: help
rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
OSTYPE := $(shell echo $${OSTYPE})
# trace
T ?= $(if $(findstring trace,$(MAKECMDGOALS)),1)
# debug
D ?= $(if $(findstring debug,$(MAKECMDGOALS)),1)
# verbose
V ?= $(if $(findstring verbose,$(MAKECMDGOALS)),1)
COLOR ?= $(if $(V),,true)
ANSI_NONE := $(if $(COLOR),\033[1;0m)
ANSI_BLACK := $(if $(COLOR),\033[1;30m)
ANSI_RED := $(if $(COLOR),\033[1;31m)
ANSI_GREEN := $(if $(COLOR),\033[1;32m)
ANSI_YELLOW := $(if $(COLOR),\033[1;33m)
ANSI_BLUE := $(if $(COLOR),\033[1;34m)
ANSI_MAGENTA := $(if $(COLOR),\033[1;35m)
ANSI_CYAN := $(if $(COLOR),\033[1;36m)
ANSI_WHITE := $(if $(COLOR),\033[1;37m)
HOST_SYSTEM = unknown
HOST_SUDO = echo HOST_SUDO $1
HOST_OPEN = echo HOST_OPEN $1
HOST_KILL = echo HOST_KILL $1
HOST_BROWSE = echo HOST_BROWSE $1
# linux (Ubuntu)
ifneq (,$(findstring linux,$(OSTYPE)))
HOST_IS_LINUX = true
HOST_SYSTEM = linux-x86_64
HOST_SUDO = sudo $1
HOST_OPEN = echo HOST_OPEN $1
HOST_KILL = kill $1
HOST_BROWSE = ( google-chrome $1 & )
endif
# darwin (OS X)
ifneq (,$(findstring darwin,$(OSTYPE)))
HOST_IS_DARWIN = true
HOST_SYSTEM = darwin-x86_64
HOST_SUDO = sudo $1
HOST_OPEN = open $1
HOST_KILL = kill $1
HOST_BROWSE = ( $(call HOST_OPEN,$1) & )
endif
# cygwin (Windows)
ifneq (,$(findstring cygwin,$(OSTYPE)))
HOST_IS_CYGWIN = true
HOST_SYSTEM = windows-x86_64
HOST_SUDO = $1
HOST_OPEN = cygstart $1
HOST_KILL = taskkill /F /T /PID $$( ps -a | awk '{ if ($$1 == pid) { print $$4 } }' pid=$(strip $1) )
HOST_BROWSE = ( $(call HOST_OPEN,$1) & )
endif
# Release, Debug
BUILDTYPE = $(if $(D),Debug,Release)
# $1: rule
# $2=: message
NOTE = printf "$(ANSI_NONE)note$(ANSI_NONE): $(ANSI_GREEN)%s$(ANSI_NONE)$(if $2, $(ANSI_CYAN)%s$(ANSI_NONE))\n" $1 $2
# $1: rule
# $2=: message
DONE = printf "$(ANSI_NONE)done$(ANSI_NONE): $(ANSI_GREEN)%s$(ANSI_NONE)$(if $2, $(ANSI_MAGENTA)%s$(ANSI_NONE))\n" $1 $2
# $1: rule
# $2=: message
TODO = printf "$(ANSI_NONE)todo$(ANSI_NONE): $(ANSI_GREEN)%s$(ANSI_NONE)$(if $2, $(ANSI_YELLOW)%s$(ANSI_NONE))\n" $1 $2
# $1: rule
# $2=: message
FAIL = printf "$(ANSI_NONE)fail$(ANSI_NONE): $(ANSI_GREEN)%s$(ANSI_NONE)$(if $2, $(ANSI_RED)%s$(ANSI_NONE))\n" $1 $2
# $1: name
# $2=: message
HAVE = $$( hash $1 2>/dev/null ) || ( $(call FAIL,"need \"$1\"",$2) && false )
# $1: output directory
# $2: git url
GIT_CLONE = [ -d $1/.git ] || (git clone $2 $1)
# $1: output directory
# $2: git url
GIT_LATEST = [ -d $1/.git ] && (cd $1 && git pull --recurse-submodules) || (git clone $2 $1 --recurse-submodules)
# $1: output directory
# $2: tag
GIT_CHECKOUT = [ -d $1/.git ] && (cd $1 && git checkout $2)
# $1: output file
# $2: url
CURL_LATEST = [ -e $1 ] && (curl -o $1 -z $1 $2) || (curl -o $1 $2)
# $1: label
SCRIPT_INIT = $(if $(T),$(call NOTE,$1,"script init"),true)
# $1: label
# $2=: code
SCRIPT_EXIT = $(if $(T),$(call NOTE,$1,"script exit"),true) && exit $(or $2,0)
# $1: label
# $2: script
SCRIPT_RUN = $(if $(V),,@) $(if $(T),$(call NOTE,$1,"script run"),true) && ( $2 ) && $(call DONE,$1)
TRACE_PRINT = $(if $(T),$(warning $1))
TRACE_PRINT_MAKE_VARIABLES += $(call TRACE_PRINT,MAKECMDGOALS: "$(MAKECMDGOALS)")
TRACE_PRINT_MAKE_VARIABLES += $(call TRACE_PRINT,MAKEFILE_LIST: "$(MAKEFILE_LIST)")
TRACE_PRINT_MAKE_VARIABLES += $(call TRACE_PRINT,MAKELEVEL: "$(MAKELEVEL)")
TRACE_PRINT_GOAL_VARIABLES += $(call TRACE_PRINT,KEYWORD_GOALS: "$(KEYWORD_GOALS)")
TRACE_PRINT_GOAL_VARIABLES += $(call TRACE_PRINT,COMMAND_GOALS: "$(COMMAND_GOALS)")
TRACE_PRINT_GOAL_VARIABLES += $(call TRACE_PRINT,PROJECT_GOALS: "$(PROJECT_GOALS)")
TRACE_PRINT_GOAL_VARIABLES += $(call TRACE_PRINT,MACHINE_GOALS: "$(MACHINE_GOALS)")
TRACE_PRINT_GOAL_VARIABLES += $(call TRACE_PRINT,OTHER_GOALS: "$(OTHER_GOALS)")
KEYWORD_GOALS = $(filter $(KEYWORDS),$(MAKECMDGOALS))
COMMAND_GOALS = $(filter $(COMMANDS),$(MAKECMDGOALS))
PROJECT_GOALS = $(if $(filter projects,$(KEYWORD_GOALS)),$(PROJECTS),$(filter $(PROJECTS),$(MAKECMDGOALS)))
MACHINE_GOALS = $(if $(filter machines,$(KEYWORD_GOALS)),$(MACHINES),$(filter $(MACHINES),$(MAKECMDGOALS)))
OTHER_GOALS = $(filter-out $(KEYWORDS) $(COMMANDS) $(PROJECTS) $(MACHINES),$(MAKECMDGOALS))
# keywords
KEYWORDS += and on for all trace debug verbose commands projects machines
# commands
COMMANDS += help reset setup clean build stop run
__help__:
@printf "usage:\n"
@printf "$$ make <$(ANSI_YELLOW)command$(ANSI_NONE)>-<$(ANSI_YELLOW)project$(ANSI_NONE)>\n"
@printf "command:\n"
@printf " $(ANSI_YELLOW)help$(ANSI_NONE)\n"
@printf " $(ANSI_YELLOW)reset$(ANSI_NONE)\n"
@printf " $(ANSI_YELLOW)setup$(ANSI_NONE)\n"
@printf " $(ANSI_YELLOW)clean$(ANSI_NONE)\n"
@printf " $(ANSI_YELLOW)build$(ANSI_NONE)\n"
@printf " $(ANSI_YELLOW)stop$(ANSI_NONE)\n"
@printf " $(ANSI_YELLOW)run$(ANSI_NONE)\n"
@printf "project:\n"
@for PROJECT in $(PROJECTS); do printf " $(ANSI_YELLOW)$${PROJECT}$(ANSI_NONE)\n"; done
DEFAULT_COMMAND = help
$(DEFAULT_COMMAND)-%: ; @ $(call TODO,$@)
DEFAULT_PROJECT = default
default-help:__help__;@true
default-%: ; @ $(call DONE,$*)
# setup-have
setup-have-git: ; @ $(call HAVE,git,"install") && $(call DONE,$@)
setup-have-curl: ; @ $(call HAVE,curl,"install") && $(call DONE,$@)
setup-have-python: ; @ $(call HAVE,python,"install") && $(call DONE,$@)
setup-have-java: ; @ $(call HAVE,java,"install from java.com") && $(call DONE,$@)
setup-have-ant: ; @ $(call HAVE,ant,"install from ant.apache.org") && $(call DONE,$@)
setup-have-node: ; @ $(call HAVE,node,"install from nodejs.org") && $(call DONE,$@)
setup-have-npm: ; @ $(call HAVE,npm,"install from nodejs.org") && $(call DONE,$@)
setup-have-node-gyp: ; @ $(call HAVE,$(HOST_NODE_GYP),"install using npm") && $(call DONE,$@)
setup-have-node-inspector: ; @ $(call HAVE,$(HOST_NODE_INSPECTOR),"install using npm") && $(call DONE,$@)
setup-have-cordova: ; @ $(call HAVE,$(HOST_CORDOVA),"install using npm") && $(call DONE,$@)
# google
default-setup: google-setup
GOOGLE_PATH ?= google
GOOGLE_CLOSURE_COMPILER_PATH ?= node_modules/google-closure-compiler
GOOGLE_CLOSURE_LIBRARY_PATH ?= node_modules/google-closure-library
# $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/bin/build/depswriter.py --help
# $(call GOOGLE_DEPSWRITER_SCRIPT, foo/path1 foo/path2, foo/file1.js foo/file2.js, foo.dep.js)
# $1: SOURCE_JS_PATHS
# $2: SOURCE_JS_FILES
# $3: OUTPUT_DEP_JS_FILE
# depswriter needs the relative path from base.js to working directory
GOOGLE_DEPSWRITER_SCRIPT = true
GOOGLE_DEPSWRITER_SCRIPT += && export PREFIX=$$(python -c "import os.path; print os.path.relpath('.', '$(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog');")
#GOOGLE_DEPSWRITER_SCRIPT += && export PREFIX=$$(node -p "var path = require('path'); path.relative('$(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog', '.').split(path.sep).join('/');")
GOOGLE_DEPSWRITER_SCRIPT += && python $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/bin/build/depswriter.py
GOOGLE_DEPSWRITER_SCRIPT += $(foreach path,$1,--root_with_prefix="$(path) $${PREFIX}/$(path)")
GOOGLE_DEPSWRITER_SCRIPT += $(foreach file,$2,--path_with_depspath="$(file) $${PREFIX}/$(file)")
GOOGLE_DEPSWRITER_SCRIPT += > $3
GOOGLE_DEPSWRITER_DEPS += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/bin/build/depswriter.py
# java -jar $(GOOGLE_CLOSURE_COMPILER_PATH)/compiler.jar --help
GOOGLE_COMPILER_FLAGS += --generate_exports
# --language_in: ECMASCRIPT3 | ECMASCRIPT5 | ECMASCRIPT5_STRICT
GOOGLE_COMPILER_FLAGS += --language_in=ECMASCRIPT5
# --compilation-level: WHITESPACE_ONLY | SIMPLE | ADVANCED
GOOGLE_COMPILER_FLAGS += --compilation_level=SIMPLE
GOOGLE_COMPILER_FLAGS += --define=goog.DEBUG=false
GOOGLE_COMPILER_FLAGS += --jscomp_error=accessControls
GOOGLE_COMPILER_FLAGS += --jscomp_error=ambiguousFunctionDecl
GOOGLE_COMPILER_FLAGS += --jscomp_error=checkEventfulObjectDisposal
GOOGLE_COMPILER_FLAGS += --jscomp_error=checkRegExp
#GOOGLE_COMPILER_FLAGS += --jscomp_error=checkStructDictInheritance
GOOGLE_COMPILER_FLAGS += --jscomp_error=checkTypes
#GOOGLE_COMPILER_FLAGS += --jscomp_error=checkVars
GOOGLE_COMPILER_FLAGS += --jscomp_error=const
GOOGLE_COMPILER_FLAGS += --jscomp_error=constantProperty
GOOGLE_COMPILER_FLAGS += --jscomp_error=deprecated
GOOGLE_COMPILER_FLAGS += --jscomp_error=duplicateMessage
GOOGLE_COMPILER_FLAGS += --jscomp_error=es3
GOOGLE_COMPILER_FLAGS += --jscomp_error=es5Strict
GOOGLE_COMPILER_FLAGS += --jscomp_error=externsValidation
GOOGLE_COMPILER_FLAGS += --jscomp_error=fileoverviewTags
GOOGLE_COMPILER_FLAGS += --jscomp_error=globalThis
GOOGLE_COMPILER_FLAGS += --jscomp_error=inferredConstCheck
GOOGLE_COMPILER_FLAGS += --jscomp_error=internetExplorerChecks
GOOGLE_COMPILER_FLAGS += --jscomp_error=invalidCasts
GOOGLE_COMPILER_FLAGS += --jscomp_error=misplacedTypeAnnotation
GOOGLE_COMPILER_FLAGS += --jscomp_error=missingGetCssName
GOOGLE_COMPILER_FLAGS += --jscomp_error=missingProperties
#GOOGLE_COMPILER_FLAGS += --jscomp_error=missingProvide
#GOOGLE_COMPILER_FLAGS += --jscomp_error=missingRequire
GOOGLE_COMPILER_FLAGS += --jscomp_error=missingReturn
GOOGLE_COMPILER_FLAGS += --jscomp_error=newCheckTypes
GOOGLE_COMPILER_FLAGS += --jscomp_error=nonStandardJsDocs
#GOOGLE_COMPILER_FLAGS += --jscomp_error=reportUnknownTypes
GOOGLE_COMPILER_FLAGS += --jscomp_error=strictModuleDepCheck
GOOGLE_COMPILER_FLAGS += --jscomp_error=suspiciousCode
GOOGLE_COMPILER_FLAGS += --jscomp_error=typeInvalidation
GOOGLE_COMPILER_FLAGS += --jscomp_error=undefinedNames
#GOOGLE_COMPILER_FLAGS += --jscomp_error=undefinedVars
GOOGLE_COMPILER_FLAGS += --jscomp_error=unknownDefines
GOOGLE_COMPILER_FLAGS += --jscomp_error=uselessCode
#GOOGLE_COMPILER_FLAGS += --jscomp_error=useOfGoogBase
GOOGLE_COMPILER_FLAGS += --jscomp_error=visibility
# $(call GOOGLE_CLOSURE_COMPILER_SCRIPT, "foo", foo/path1 foo/path2, foo/file1.js foo/file2.js, foo/file.ext.js, foo.map.json, foo.min.js)
# $1: OUTPUT_NAMESPACE
# $2: SOURCE_JS_PATHS
# $3: SOURCE_JS_FILES
# $4: SOURCE_EXT_JS_FILES
# $5: OUTPUT_MAP_JSON_FILE
# $6: OUTPUT_MIN_JS_FILE
# $7: COMPILER_FLAGS
GOOGLE_CLOSURE_COMPILER_SCRIPT = java
GOOGLE_CLOSURE_COMPILER_SCRIPT += -client
GOOGLE_CLOSURE_COMPILER_SCRIPT += -jar $(GOOGLE_CLOSURE_COMPILER_PATH)/compiler.jar
GOOGLE_CLOSURE_COMPILER_SCRIPT += --only_closure_dependencies
GOOGLE_CLOSURE_COMPILER_SCRIPT += --closure_entry_point $(strip $1)
GOOGLE_CLOSURE_COMPILER_SCRIPT += $(strip $2)
GOOGLE_CLOSURE_COMPILER_SCRIPT += $(strip $3)
GOOGLE_CLOSURE_COMPILER_SCRIPT += $(patsubst %,--externs=%,$(strip $4))
GOOGLE_CLOSURE_COMPILER_SCRIPT += --create_source_map=$(strip $5)
GOOGLE_CLOSURE_COMPILER_SCRIPT += --source_map_format=V3
GOOGLE_CLOSURE_COMPILER_SCRIPT += --source_map_location_mapping="|../../../"
GOOGLE_CLOSURE_COMPILER_SCRIPT += --js_output_file=$(strip $6)
GOOGLE_CLOSURE_COMPILER_SCRIPT += $(strip $7)
GOOGLE_CLOSURE_COMPILER_SCRIPT += && printf "\n//\# sourceMappingURL=../../../$(strip $5)\n" >> $(strip $6)
GOOGLE_CLOSURE_COMPILER_DEPS += $(GOOGLE_CLOSURE_COMPILER_PATH)/compiler.jar
google-setup: google-closure-compiler-setup
google-closure-compiler-setup: setup-have-npm
google-closure-compiler-setup: SCRIPT = $(call SCRIPT_INIT,$@)
google-closure-compiler-setup: SCRIPT += && $(call NOTE,$@,"install closure compiler")
google-closure-compiler-setup: SCRIPT += && npm install google-closure-compiler
google-closure-compiler-setup: SCRIPT += && $(call SCRIPT_EXIT,$@)
google-closure-compiler-setup: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
google-setup: google-closure-library-setup
google-closure-library-setup: setup-have-npm
google-closure-library-setup: SCRIPT = $(call SCRIPT_INIT,$@)
google-closure-library-setup: SCRIPT += && $(call NOTE,$@,"install closure library")
google-closure-library-setup: SCRIPT += && npm install google-closure-library
google-closure-library-setup: SCRIPT += && $(call SCRIPT_EXIT,$@)
google-closure-library-setup: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
# box2d
PROJECTS += box2d
default-clean: box2d-clean
default-build: box2d-build
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Box2D.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2BroadPhase.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2CollideCircle.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2CollideEdge.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2CollidePolygon.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2Collision.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2Distance.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2DynamicTree.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/b2TimeOfImpact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/Shapes/b2ChainShape.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/Shapes/b2CircleShape.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/Shapes/b2EdgeShape.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/Shapes/b2PolygonShape.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Collision/Shapes/b2Shape.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Common/b2BlockAllocator.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Common/b2Draw.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Common/b2GrowableStack.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Common/b2Math.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Common/b2Settings.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Common/b2StackAllocator.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Common/b2Timer.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/b2Body.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/b2ContactManager.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/b2Fixture.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/b2Island.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/b2TimeStep.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/b2World.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/b2WorldCallbacks.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2CircleContact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2Contact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ContactFactory.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2ContactSolver.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Contacts/b2PolygonContact.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2AreaJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2DistanceJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2FrictionJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2GearJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2Joint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2JointFactory.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2MotorJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2MouseJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2PrismaticJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2PulleyJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2RevoluteJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2RopeJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2WeldJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Dynamics/Joints/b2WheelJoint.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Particle/b2Particle.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Particle/b2ParticleGroup.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Particle/b2ParticleSystem.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Particle/b2StackQueue.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Particle/b2VoronoiDiagram.js
BOX2D_SOURCE_JS_FILES += Box2D/Box2D/Rope/b2Rope.js
BOX2D_CONTRIBUTIONS_SOURCE_JS_FILES += Contributions/Enhancements/Controllers/b2BuoyancyController.js
BOX2D_CONTRIBUTIONS_SOURCE_JS_FILES += Contributions/Enhancements/Controllers/b2ConstantAccelController.js
BOX2D_CONTRIBUTIONS_SOURCE_JS_FILES += Contributions/Enhancements/Controllers/b2ConstantForceController.js
BOX2D_CONTRIBUTIONS_SOURCE_JS_FILES += Contributions/Enhancements/Controllers/b2Controller.js
BOX2D_CONTRIBUTIONS_SOURCE_JS_FILES += Contributions/Enhancements/Controllers/b2GravityController.js
BOX2D_CONTRIBUTIONS_SOURCE_JS_FILES += Contributions/Enhancements/Controllers/b2TensorDampingController.js
BOX2D_SOURCE_JS_FILES += $(BOX2D_CONTRIBUTIONS_SOURCE_JS_FILES)
BOX2D_OUTPUT_NAMESPACE = "box2d"
BOX2D_OUTPUT_MIN_JS_FILE = Box2D/Build/Box2D/box2d.min.js
BOX2D_OUTPUT_MAP_JSON_FILE = Box2D/Build/Box2D/box2d.map.json
BOX2D_OUTPUT_DEP_JS_FILE = Box2D/Build/Box2D/box2d.dep.js
BOX2D_OUTPUT_FILES = $(BOX2D_OUTPUT_MIN_JS_FILE) $(BOX2D_OUTPUT_MAP_JSON_FILE) $(BOX2D_OUTPUT_DEP_JS_FILE)
box2d-clean: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-clean: SCRIPT += && rm -f $(BOX2D_OUTPUT_FILES)
box2d-clean: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-clean: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
box2d-build: $(BOX2D_OUTPUT_FILES)
box2d-build: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-build: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-build: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_OUTPUT_DEP_JS_FILE): $(GOOGLE_DEPSWRITER_DEPS)
$(BOX2D_OUTPUT_DEP_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_OUTPUT_DEP_JS_FILE): $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_OUTPUT_DEP_JS_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_OUTPUT_DEP_JS_FILE): SCRIPT += && $(call GOOGLE_DEPSWRITER_SCRIPT,
$(BOX2D_OUTPUT_DEP_JS_FILE): SCRIPT += $(SOURCE_JS_PATHS), $(SOURCE_JS_FILES),
$(BOX2D_OUTPUT_DEP_JS_FILE): SCRIPT += $(BOX2D_OUTPUT_DEP_JS_FILE))
$(BOX2D_OUTPUT_DEP_JS_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_OUTPUT_DEP_JS_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_COMPILER_DEPS)
$(BOX2D_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_OUTPUT_MIN_JS_FILE): $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += && $(call GOOGLE_CLOSURE_COMPILER_SCRIPT,
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_OUTPUT_NAMESPACE),
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += $(SOURCE_JS_PATHS), $(SOURCE_JS_FILES),
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += $(SOURCE_EXT_JS_FILES),
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_OUTPUT_MAP_JSON_FILE),
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_OUTPUT_MIN_JS_FILE),
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += $(GOOGLE_COMPILER_FLAGS))
$(BOX2D_OUTPUT_MIN_JS_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_OUTPUT_MIN_JS_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_OUTPUT_MAP_JSON_FILE): $(BOX2D_OUTPUT_MIN_JS_FILE)
$(BOX2D_OUTPUT_MAP_JSON_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_OUTPUT_MAP_JSON_FILE): SCRIPT += && touch $@
$(BOX2D_OUTPUT_MAP_JSON_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_OUTPUT_MAP_JSON_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
box2d-run: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-run: SCRIPT += && $(call HOST_BROWSE,"Box2D/Build/Box2D/"$(if $(D),"index-debug.html","index.html"))
box2d-run: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-run: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
# box2d-helloworld
PROJECTS += box2d-helloworld
default-clean: box2d-helloworld-clean
default-build: box2d-helloworld-build
BOX2D_HELLOWORLD_SOURCE_JS_FILES += Box2D/HelloWorld/HelloWorld.js
#BOX2D_HELLOWORLD_SOURCE_JS_FILES += Box2D/Build/HelloWorld/main.js
BOX2D_HELLOWORLD_OUTPUT_NAMESPACE = "box2d.HelloWorld"
#BOX2D_HELLOWORLD_OUTPUT_NAMESPACE = "main.start"
BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE = Box2D/Build/HelloWorld/box2d-helloworld.min.js
BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE = Box2D/Build/HelloWorld/box2d-helloworld.map.json
BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE = Box2D/Build/HelloWorld/box2d-helloworld.dep.js
BOX2D_HELLOWORLD_OUTPUT_FILES = $(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE) $(BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE) $(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE)
box2d-helloworld-clean: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-helloworld-clean: SCRIPT += && rm -f $(BOX2D_HELLOWORLD_OUTPUT_FILES)
box2d-helloworld-clean: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-helloworld-clean: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
box2d-helloworld-build: $(BOX2D_HELLOWORLD_OUTPUT_FILES)
box2d-helloworld-build: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-helloworld-build: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-helloworld-build: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): $(GOOGLE_DEPSWRITER_DEPS)
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): $(BOX2D_HELLOWORLD_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(BOX2D_HELLOWORLD_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SCRIPT += && $(call GOOGLE_DEPSWRITER_SCRIPT,
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SCRIPT += $(SOURCE_JS_PATHS), $(SOURCE_JS_FILES),
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SCRIPT += $(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE))
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_HELLOWORLD_OUTPUT_DEP_JS_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_COMPILER_DEPS)
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): $(BOX2D_HELLOWORLD_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(BOX2D_HELLOWORLD_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += && $(call GOOGLE_CLOSURE_COMPILER_SCRIPT,
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_HELLOWORLD_OUTPUT_NAMESPACE),
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += $(SOURCE_JS_PATHS), $(SOURCE_JS_FILES),
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += $(SOURCE_EXT_JS_FILES),
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE),
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE),
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += $(GOOGLE_COMPILER_FLAGS))
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE): $(BOX2D_HELLOWORLD_OUTPUT_MIN_JS_FILE)
$(BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE): SCRIPT += && touch $@
$(BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_HELLOWORLD_OUTPUT_MAP_JSON_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
box2d-helloworld-run: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-helloworld-run: SCRIPT += && $(call HOST_BROWSE,"Box2D/Build/HelloWorld/"$(if $(D),"index-debug.html","index.html"))
box2d-helloworld-run: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-helloworld-run: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
# box2d-testbed
PROJECTS += box2d-testbed
default-clean: box2d-testbed-clean
default-build: box2d-testbed-build
default-run: box2d-testbed-run
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Framework/DebugDraw.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Framework/FullscreenUI.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Framework/Main.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Framework/ParticleEmitter.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Framework/ParticleParameter.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Framework/Test.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Testbed.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/AddPair.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/AntiPointy.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/ApplyForce.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/BasicSliderCrank.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/BlobTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/BodyTypes.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Breakable.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Bridge.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/BulletTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/BuoyancyTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Cantilever.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Car.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Chain.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/CharacterCollision.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/CollisionFiltering.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/CollisionProcessing.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/CompoundShapes.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Confined.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/ContinuousTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/ConvexHull.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/ConveyorBelt.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/CornerCase.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/DamBreak.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/DistanceTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Dominos.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/DominoTower.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/DrawingParticles.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/DumpShell.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/DynamicTreeTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/EdgeShapes.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/EdgeTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/ElasticParticles.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Empty.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/EyeCandy.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Faucet.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Fracker.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Gears.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/HeavyOnLight.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/HeavyOnLightTwo.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Impulse.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/LiquidTimer.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Maxwell.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Mobile.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/MobileBalanced.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/MotorJoint.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/MultipleParticleSystems.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/OneSidedPlatform.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Particles.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/ParticlesSurfaceTension.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Pinball.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Pointy.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/PolyCollision.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/PolyShapes.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Prismatic.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Pulleys.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Pyramid.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/PyramidTopple.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Ramp.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/RayCast.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Revolute.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/RigidParticles.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Rope.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/RopeJoint.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Sandbox.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/SensorTest.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/ShapeEditing.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/SliderCrank.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Soup.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/SoupStirrer.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Sparky.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/SphereStack.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/TestCCD.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/TestEntries.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/TestRagdoll.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/TestStack.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/TheoJansen.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Tiles.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/TimeOfImpact.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/TopdownCar.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Tumbler.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/VaryingFriction.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/VaryingRestitution.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/VerticalStack.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/WaveMachine.js
BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Testbed/Tests/Web.js
#BOX2D_TESTBED_SOURCE_JS_FILES += Box2D/Build/Testbed/main.js
BOX2D_TESTBED_OUTPUT_NAMESPACE = "box2d.Testbed"
#BOX2D_TESTBED_OUTPUT_NAMESPACE = "main.start"
BOX2D_TESTBED_OUTPUT_MIN_JS_FILE = Box2D/Build/Testbed/box2d-testbed.min.js
BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE = Box2D/Build/Testbed/box2d-testbed.map.json
BOX2D_TESTBED_OUTPUT_DEP_JS_FILE = Box2D/Build/Testbed/box2d-testbed.dep.js
BOX2D_TESTBED_OUTPUT_FILES = $(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE) $(BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE) $(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE)
box2d-testbed-clean: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-testbed-clean: SCRIPT += && rm -f $(BOX2D_TESTBED_OUTPUT_FILES)
box2d-testbed-clean: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-testbed-clean: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
box2d-testbed-build: $(BOX2D_TESTBED_OUTPUT_FILES)
box2d-testbed-build: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-testbed-build: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-testbed-build: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): $(GOOGLE_DEPSWRITER_DEPS)
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/third_party/closure/goog
#$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): $(BOX2D_TESTBED_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SOURCE_JS_PATHS += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SOURCE_JS_PATHS += $(GOOGLE_CLOSURE_LIBRARY_PATH)/third_party/closure/goog
#$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(BOX2D_TESTBED_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SOURCE_JS_FILES += $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SCRIPT += && $(call GOOGLE_DEPSWRITER_SCRIPT,
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SCRIPT += $(SOURCE_JS_PATHS), $(SOURCE_JS_FILES),
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SCRIPT += $(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE))
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_TESTBED_OUTPUT_DEP_JS_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_COMPILER_DEPS)
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/third_party/closure/goog
#$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): $(BOX2D_TESTBED_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SOURCE_JS_PATHS += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SOURCE_JS_PATHS += $(GOOGLE_CLOSURE_LIBRARY_PATH)/third_party/closure/goog
#$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(GOOGLE_CLOSURE_LIBRARY_PATH)/closure/goog/base.js
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(BOX2D_TESTBED_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SOURCE_JS_FILES += $(BOX2D_SOURCE_JS_FILES)
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += && $(call GOOGLE_CLOSURE_COMPILER_SCRIPT,
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_TESTBED_OUTPUT_NAMESPACE),
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += $(SOURCE_JS_PATHS), $(SOURCE_JS_FILES),
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += $(SOURCE_EXT_JS_FILES),
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE),
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += $(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE),
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += $(GOOGLE_COMPILER_FLAGS))
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
$(BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE): $(BOX2D_TESTBED_OUTPUT_MIN_JS_FILE)
$(BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE): SCRIPT = $(call SCRIPT_INIT,$@)
$(BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE): SCRIPT += && touch $@
$(BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE): SCRIPT += && $(call SCRIPT_EXIT,$@)
$(BOX2D_TESTBED_OUTPUT_MAP_JSON_FILE): ; $(call SCRIPT_RUN,$@,$(SCRIPT))
box2d-testbed-run: SCRIPT = $(call SCRIPT_INIT,$@)
box2d-testbed-run: SCRIPT += && $(call HOST_BROWSE,"Box2D/Build/Testbed/"$(if $(D),"index-debug.html","index.html"))
box2d-testbed-run: SCRIPT += && $(call SCRIPT_EXIT,$@)
box2d-testbed-run: ; $(call SCRIPT_RUN,$@,$(SCRIPT))
# rules
# link each command to default
$(foreach command,$(COMMANDS),\
$(eval $(command): default-$(command) ; @true)\
)
# generate verb/noun (<command>-<project>) aliases
$(foreach project,$(PROJECTS),\
$(foreach command,$(COMMANDS),\
$(eval $(command)-$(project): $(project)-$(command) ; @true)\
)\
)
# generate default rule for each project
$(foreach project,$(PROJECTS),\
$(eval $(project)-%: ; @ $(call TODO,$$@))\
)