-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathMakefile
1506 lines (1246 loc) · 54 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
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# To compile with voice chat, WITHVOICECHAT=yes,
# for no voice chat, make WITHVOICECHAT=no
WITHVOICECHAT=yes
USE_SNIS_XWINDOWS_HACKS=1
PKG_CONFIG?=pkg-config
SDL2_CONFIG?=sdl2-config
# use "make OSX=1" for mac
OSX=0
# -lrt is only needed for clock_gettime() and only for glibc before 2.17
LRTLIB=$(shell ./check_for_lrt.sh -q)
INSTALL ?= install
AWK ?= awk
# Type "make O=0" to get a debug build (-g)
# "make O=1" gets an optimized (-O3) build with no debug info, which is the default
# optimize/debug (-O3, -g: default 1=yes/no, 2=no/yes)
O ?= 1
# Type "make P=1" to get a build with profiling information for use with
# gprof. This is turned off by default
# profile (default 0=no, 1=yes)
P ?= 0
# Type "make V=1" to get a verbose build with all commands printed
# By default, this is turned off.
# verbose (default 0=no, 1=yes)
V ?= 0
CC ?= gcc
# DESTDIR=.
PREFIX?=.
ifeq (${UBSAN},1)
UBSANFLAG=-fsanitize=undefined
CC=clang
else
UBSANFLAG=
endif
# object fild directory
OD=object_files
DATADIR=${DESTDIR}/${PREFIX}/share/snis
CONFIGFILEDIR=${DATADIR}
CONFIGSRCDIR=./share/snis
CONFIGFILES=${CONFIGSRCDIR}/commodities.txt \
${CONFIGSRCDIR}/factions.txt \
${CONFIGSRCDIR}/ship_types.txt \
${CONFIGSRCDIR}/starbase_models.txt \
${CONFIGSRCDIR}/user_colors.cfg \
${CONFIGSRCDIR}/joystick_config.txt
SOLARSYSTEMSRCDIR=${CONFIGSRCDIR}/solarsystems
SOLARSYSTEMDIR=${DATADIR}/solarsystems
SOLARSYSTEMFILES=${SOLARSYSTEMSRCDIR}/default/assets.txt
ASSETSSRCDIR=share/snis
MODELSRCDIR=${ASSETSSRCDIR}/models
MODELDIR=${DATADIR}/models
SOUNDDIR=${DATADIR}/sounds
SOUNDSRCDIR=${ASSETSSRCDIR}/sounds
SOUNDFILES=${SOUNDSRCDIR}/Attribution.txt \
${SOUNDSRCDIR}/atmospheric-friction.ogg \
${SOUNDSRCDIR}/big_explosion.ogg \
${SOUNDSRCDIR}/bigshotlaser.ogg \
${SOUNDSRCDIR}/changescreen.ogg \
${SOUNDSRCDIR}/comms-hail.ogg \
${SOUNDSRCDIR}/crewmember-has-joined.ogg \
${SOUNDSRCDIR}/dangerous-radiation.ogg \
${SOUNDSRCDIR}/docking-sound.ogg \
${SOUNDSRCDIR}/docking-system-disengaged.ogg \
${SOUNDSRCDIR}/docking-system-engaged.ogg \
${SOUNDSRCDIR}/entering-high-security-area.ogg \
${SOUNDSRCDIR}/flak_gun_sound.ogg \
${SOUNDSRCDIR}/flak_hit.ogg \
${SOUNDSRCDIR}/fuel-levels-critical.ogg \
${SOUNDSRCDIR}/incoming-fire-detected.ogg \
${SOUNDSRCDIR}/laser-fail.ogg \
${SOUNDSRCDIR}/leaving-high-security-area.ogg \
${SOUNDSRCDIR}/mining-bot-deployed.ogg \
${SOUNDSRCDIR}/mining-bot-standing-by.ogg \
${SOUNDSRCDIR}/mining-bot-stowed.ogg \
${SOUNDSRCDIR}/new-starship.ogg \
${SOUNDSRCDIR}/offscreen.ogg \
${SOUNDSRCDIR}/onscreen.ogg \
${SOUNDSRCDIR}/permission-to-dock-denied.ogg \
${SOUNDSRCDIR}/permission-to-dock-has-expired.ogg \
${SOUNDSRCDIR}/permission-to-dock-granted.ogg \
${SOUNDSRCDIR}/proximity-alert.ogg \
${SOUNDSRCDIR}/red-alert.ogg \
${SOUNDSRCDIR}/reverse.ogg \
${SOUNDSRCDIR}/robot-insert-component.ogg \
${SOUNDSRCDIR}/robot-remove-component.ogg \
${SOUNDSRCDIR}/science-data-acquired.ogg \
${SOUNDSRCDIR}/science-probe.ogg \
${SOUNDSRCDIR}/short-warpdrive.ogg \
${SOUNDSRCDIR}/slider-noise.ogg \
${SOUNDSRCDIR}/spaceship-crash.ogg \
${SOUNDSRCDIR}/torpedo-loading.ogg \
${SOUNDSRCDIR}/transporter-sound.ogg \
${SOUNDSRCDIR}/tty-chatter.ogg \
${SOUNDSRCDIR}/warning-hull-breach-imminent.ogg \
${SOUNDSRCDIR}/warp-drive-fumble.ogg \
${SOUNDSRCDIR}/warpdrive.ogg \
${SOUNDSRCDIR}/welcome-to-starbase.ogg \
${SOUNDSRCDIR}/hull-creak-0.ogg \
${SOUNDSRCDIR}/hull-creak-1.ogg \
${SOUNDSRCDIR}/hull-creak-2.ogg \
${SOUNDSRCDIR}/hull-creak-3.ogg \
${SOUNDSRCDIR}/hull-creak-4.ogg \
${SOUNDSRCDIR}/hull-creak-5.ogg \
${SOUNDSRCDIR}/hull-creak-6.ogg \
${SOUNDSRCDIR}/hull-creak-7.ogg \
${SOUNDSRCDIR}/hull-creak-8.ogg \
${SOUNDSRCDIR}/hull-creak-9.ogg \
${SOUNDSRCDIR}/ui1.ogg \
${SOUNDSRCDIR}/ui2.ogg \
${SOUNDSRCDIR}/ui3.ogg \
${SOUNDSRCDIR}/ui4.ogg \
${SOUNDSRCDIR}/ui5.ogg \
${SOUNDSRCDIR}/ui6.ogg \
${SOUNDSRCDIR}/ui7.ogg \
${SOUNDSRCDIR}/ui8.ogg \
${SOUNDSRCDIR}/ui9.ogg \
${SOUNDSRCDIR}/ui10.ogg \
${SOUNDSRCDIR}/ui11.ogg \
${SOUNDSRCDIR}/ui12.ogg \
${SOUNDSRCDIR}/ui13.ogg \
${SOUNDSRCDIR}/ui14.ogg \
${SOUNDSRCDIR}/ui15.ogg \
${SOUNDSRCDIR}/ui16.ogg \
${SOUNDSRCDIR}/ui17.ogg \
${SOUNDSRCDIR}/ui18.ogg \
${SOUNDSRCDIR}/ui19.ogg \
${SOUNDSRCDIR}/ui20.ogg \
${SOUNDSRCDIR}/ui21.ogg \
${SOUNDSRCDIR}/ui22.ogg \
${SOUNDSRCDIR}/ui23.ogg \
${SOUNDSRCDIR}/ui24.ogg \
${SOUNDSRCDIR}/ui25.ogg \
${SOUNDSRCDIR}/ui26.ogg \
${SOUNDSRCDIR}/ui27.ogg \
${SOUNDSRCDIR}/ui28.ogg \
${SOUNDSRCDIR}/ui29.ogg \
${SOUNDSRCDIR}/spacemonster_slap.ogg \
${SOUNDSRCDIR}/alarm_buzzer.ogg \
${SOUNDSRCDIR}/atlas_rocket_sample.ogg \
${SOUNDSRCDIR}/maneuvering_thruster.ogg \
${SOUNDSRCDIR}/quindar-intro.ogg \
${SOUNDSRCDIR}/quindar-outro.ogg \
${SOUNDSRCDIR}/missile_launch.ogg
TEXTUREDIR=${DATADIR}/textures
TEXTURESRCDIR=${ASSETSSRCDIR}/textures
TEXTUREFILES=${TEXTURESRCDIR}/AreaTex.h \
${TEXTURESRCDIR}/asteroid1-0.png \
${TEXTURESRCDIR}/asteroid1-1.png \
${TEXTURESRCDIR}/asteroid1-2.png \
${TEXTURESRCDIR}/asteroid1-3.png \
${TEXTURESRCDIR}/asteroid1-4.png \
${TEXTURESRCDIR}/asteroid1-5.png \
${TEXTURESRCDIR}/asteroid2-0.png \
${TEXTURESRCDIR}/asteroid2-1.png \
${TEXTURESRCDIR}/asteroid2-2.png \
${TEXTURESRCDIR}/asteroid2-3.png \
${TEXTURESRCDIR}/asteroid2-4.png \
${TEXTURESRCDIR}/asteroid2-5.png \
${TEXTURESRCDIR}/Attribution.txt \
${TEXTURESRCDIR}/green-laser-texture.png \
${TEXTURESRCDIR}/image0.png \
${TEXTURESRCDIR}/image1.png \
${TEXTURESRCDIR}/image2.png \
${TEXTURESRCDIR}/image3.png \
${TEXTURESRCDIR}/image4.png \
${TEXTURESRCDIR}/image5.png \
${TEXTURESRCDIR}/nebula0.png \
${TEXTURESRCDIR}/nebula1.png \
${TEXTURESRCDIR}/nebula2.png \
${TEXTURESRCDIR}/nebula3.png \
${TEXTURESRCDIR}/nebula4.png \
${TEXTURESRCDIR}/nebula5.png \
${TEXTURESRCDIR}/orange-haze0.png \
${TEXTURESRCDIR}/orange-haze1.png \
${TEXTURESRCDIR}/orange-haze2.png \
${TEXTURESRCDIR}/orange-haze3.png \
${TEXTURESRCDIR}/orange-haze4.png \
${TEXTURESRCDIR}/orange-haze5.png \
${TEXTURESRCDIR}/planetary-ring0.png \
${TEXTURESRCDIR}/planet-texture0-0.png \
${TEXTURESRCDIR}/planet-texture0-1.png \
${TEXTURESRCDIR}/planet-texture0-2.png \
${TEXTURESRCDIR}/planet-texture0-3.png \
${TEXTURESRCDIR}/planet-texture0-4.png \
${TEXTURESRCDIR}/planet-texture0-5.png \
${TEXTURESRCDIR}/planet-texture0.png \
${TEXTURESRCDIR}/planet-texture1-0.png \
${TEXTURESRCDIR}/planet-texture1-1.png \
${TEXTURESRCDIR}/planet-texture1-2.png \
${TEXTURESRCDIR}/planet-texture1-3.png \
${TEXTURESRCDIR}/planet-texture1-4.png \
${TEXTURESRCDIR}/planet-texture1-5.png \
${TEXTURESRCDIR}/planet-texture1.png \
${TEXTURESRCDIR}/planet-texture2-0.png \
${TEXTURESRCDIR}/planet-texture2-1.png \
${TEXTURESRCDIR}/planet-texture2-2.png \
${TEXTURESRCDIR}/planet-texture2-3.png \
${TEXTURESRCDIR}/planet-texture2-4.png \
${TEXTURESRCDIR}/planet-texture2-5.png \
${TEXTURESRCDIR}/planet-texture2.png \
${TEXTURESRCDIR}/planet-texture3-0.png \
${TEXTURESRCDIR}/planet-texture3-1.png \
${TEXTURESRCDIR}/planet-texture3-2.png \
${TEXTURESRCDIR}/planet-texture3-3.png \
${TEXTURESRCDIR}/planet-texture3-4.png \
${TEXTURESRCDIR}/planet-texture3-5.png \
${TEXTURESRCDIR}/planet-texture3.png \
${TEXTURESRCDIR}/planet-texture4-0.png \
${TEXTURESRCDIR}/planet-texture4-1.png \
${TEXTURESRCDIR}/planet-texture4-2.png \
${TEXTURESRCDIR}/planet-texture4-3.png \
${TEXTURESRCDIR}/planet-texture4-4.png \
${TEXTURESRCDIR}/planet-texture4-5.png \
${TEXTURESRCDIR}/red-laser-texture.png \
${TEXTURESRCDIR}/red-torpedo-texture.png \
${TEXTURESRCDIR}/SearchTex.h \
${TEXTURESRCDIR}/shield-effect-0.png \
${TEXTURESRCDIR}/shield-effect-1.png \
${TEXTURESRCDIR}/shield-effect-2.png \
${TEXTURESRCDIR}/shield-effect-3.png \
${TEXTURESRCDIR}/shield-effect-4.png \
${TEXTURESRCDIR}/shield-effect-5.png \
${TEXTURESRCDIR}/space-blue-plasma.png \
${TEXTURESRCDIR}/spark-texture.png \
${TEXTURESRCDIR}/sun.png \
${TEXTURESRCDIR}/test0.png \
${TEXTURESRCDIR}/test1.png \
${TEXTURESRCDIR}/test2.png \
${TEXTURESRCDIR}/test3.png \
${TEXTURESRCDIR}/test4.png \
${TEXTURESRCDIR}/test5.png \
${TEXTURESRCDIR}/thrust.png \
${TEXTURESRCDIR}/warp-effect.png \
${TEXTURESRCDIR}/warp-tunnel.png \
${TEXTURESRCDIR}/wormhole.png \
${TEXTURESRCDIR}/green-burst.png \
${TEXTURESRCDIR}/blue-tractor-texture.png \
${TEXTURESRCDIR}/missile_texture.png \
${TEXTURESRCDIR}/black_hole.png \
${TEXTURESRCDIR}/docking_port_emit.png \
${TEXTURESRCDIR}/docking_port_texture.png \
${TEXTURESRCDIR}/green-spark.png \
${TEXTURESRCDIR}/laserflash.png \
${TEXTURESRCDIR}/spacemonster_emit.png \
${TEXTURESRCDIR}/spacemonster_tentacle_emit.png \
${TEXTURESRCDIR}/spacemonster_tentacle_texture.png \
${TEXTURESRCDIR}/spacemonster_texture.png \
${TEXTURESRCDIR}/spaceplate.png \
${TEXTURESRCDIR}/spaceplate_small.png \
${TEXTURESRCDIR}/spaceplate_small_emit.png \
${TEXTURESRCDIR}/spaceplateemit.png \
${TEXTURESRCDIR}/thrust_flare.png \
${TEXTURESRCDIR}/thrustblue.png \
${TEXTURESRCDIR}/thrustgreen.png \
${TEXTURESRCDIR}/thrustred.png \
${TEXTURESRCDIR}/thrustviolet.png \
${TEXTURESRCDIR}/thrustyellow.png \
${TEXTURESRCDIR}/warpgate_emit.png \
${TEXTURESRCDIR}/warpgate_texture.png \
${TEXTURESRCDIR}/anamorphic_flare.png \
${TEXTURESRCDIR}/lens_flare_ghost.png \
${TEXTURESRCDIR}/lens_flare_halo.png
LUASCRIPTDIR=${DATADIR}/luascripts
LUASRCDIR=${ASSETSSRCDIR}/luascripts
LUASCRIPTS=${LUASRCDIR}/MAINMENU.LUA
LUAMISSIONS=${LUASRCDIR}/MISSIONS/BIGSHIP.LUA \
${LUASRCDIR}/MISSIONS/CUBOMUERTE.LUA \
${LUASRCDIR}/MISSIONS/DEMOLISHER.LUA \
${LUASRCDIR}/MISSIONS/KALI.LUA \
${LUASRCDIR}/MISSIONS/ROYAL-WEDDING.LUA \
${LUASRCDIR}/MISSIONS/SAVING-PLANET-ERPH.LUA \
${LUASRCDIR}/MISSIONS/SPACEPOX.LUA \
${LUASRCDIR}/MISSIONS/STURNVULF.LUA \
${LUASRCDIR}/MISSIONS/TRAINING-MISSION-1.LUA \
${LUASRCDIR}/MISSIONS/TRAINING-MISSION-2.LUA \
${LUASRCDIR}/MISSIONS/missions_menu.txt
LUASRCLIBS=${LUASRCDIR}/MISSIONS/lib/interactive_fiction.lua
LUATESTS=${LUASRCDIR}/TEST/CARGO.LUA \
${LUASRCDIR}/TEST/COLLISION.LUA \
${LUASRCDIR}/TEST/REVIEW_MODELS.LUA \
${LUASRCDIR}/TEST/SILLY-SPACE-BATTLE.LUA \
${LUASRCDIR}/TEST/SOUND.LUA \
${LUASRCDIR}/TEST/TESTCUSTOMBUTTONS.LUA \
${LUASRCDIR}/TEST/TESTDERELICT.LUA \
${LUASRCDIR}/TEST/TESTDOCK.LUA \
${LUASRCDIR}/TEST/TESTEXPL.LUA \
${LUASRCDIR}/TEST/TESTSPHEROID.LUA \
${LUASRCDIR}/TEST/TESTWARPEVENT.LUA \
${LUASRCDIR}/TEST/TESTINTFIC.LUA \
${LUASRCDIR}/TEST/TESTRUNAWAY.LUA \
${LUASRCDIR}/TEST/TESTTORP.LUA \
${LUASRCDIR}/TEST/TESTDAMAGE.LUA \
${LUASRCDIR}/TEST/TESTCIPHER.LUA
LUAUTILS=${LUASRCDIR}/UTIL/CLEAR_ALL.LUA \
${LUASRCDIR}/UTIL/DAMAGE.LUA \
${LUASRCDIR}/UTIL/DESTROY_SHIP.LUA \
${LUASRCDIR}/UTIL/DISABLE_ANTENNA.LUA \
${LUASRCDIR}/UTIL/ENABLE_ANTENNA.LUA \
${LUASRCDIR}/UTIL/PAY_PLAYER.LUA \
${LUASRCDIR}/UTIL/PLAYER_SPEED_BOOST.LUA \
${LUASRCDIR}/UTIL/PLAYER_SPEED_DEFAULT.LUA \
${LUASRCDIR}/UTIL/REDALERT.LUA \
${LUASRCDIR}/UTIL/REGENERATE.LUA \
${LUASRCDIR}/UTIL/RESETBRIDGE.LUA \
${LUASRCDIR}/UTIL/RESTORE_SKYBOX.LUA \
${LUASRCDIR}/UTIL/SAY.LUA \
${LUASRCDIR}/UTIL/SET_PLANET_DESCRIPTION.LUA \
${LUASRCDIR}/UTIL/SET_PLANET_ECONOMY.LUA \
${LUASRCDIR}/UTIL/SET_PLANET_GOVT.LUA \
${LUASRCDIR}/UTIL/SET_PLANET_SECURITY.LUA \
${LUASRCDIR}/UTIL/SET_PLANET_TECH.LUA \
${LUASRCDIR}/UTIL/LS.LUA \
${LUASRCDIR}/UTIL/SETFACTION.LUA \
${LUASRCDIR}/UTIL/SET_SB_FACTION_MASK.LUA \
${LUASRCDIR}/UTIL/utility_menu.txt
MATERIALDIR=${DATADIR}/materials
MATERIALSRCDIR=${ASSETSSRCDIR}/materials
MATERIALFILES=${MATERIALSRCDIR}/nebula0.mat \
${MATERIALSRCDIR}/nebula10.mat \
${MATERIALSRCDIR}/nebula11.mat \
${MATERIALSRCDIR}/nebula12.mat \
${MATERIALSRCDIR}/nebula13.mat \
${MATERIALSRCDIR}/nebula14.mat \
${MATERIALSRCDIR}/nebula15.mat \
${MATERIALSRCDIR}/nebula16.mat \
${MATERIALSRCDIR}/nebula17.mat \
${MATERIALSRCDIR}/nebula18.mat \
${MATERIALSRCDIR}/nebula19.mat \
${MATERIALSRCDIR}/nebula1.mat \
${MATERIALSRCDIR}/nebula2.mat \
${MATERIALSRCDIR}/nebula3.mat \
${MATERIALSRCDIR}/nebula4.mat \
${MATERIALSRCDIR}/nebula5.mat \
${MATERIALSRCDIR}/nebula6.mat \
${MATERIALSRCDIR}/nebula7.mat \
${MATERIALSRCDIR}/nebula8.mat \
${MATERIALSRCDIR}/nebula9.mat
SHADERDIR=${DESTDIR}/${PREFIX}/share/snis/shader
SHADERSRCDIR=${ASSETSSRCDIR}/shader
SHADERS=${SHADERSRCDIR}/atmosphere.frag \
${SHADERSRCDIR}/atmosphere.vert \
${SHADERSRCDIR}/color_by_w.frag \
${SHADERSRCDIR}/color_by_w.vert \
${SHADERSRCDIR}/fs-effect-copy.shader \
${SHADERSRCDIR}/line-single-color.frag \
${SHADERSRCDIR}/line-single-color.vert \
${SHADERSRCDIR}/per_vertex_color.frag \
${SHADERSRCDIR}/per_vertex_color.vert \
${SHADERSRCDIR}/point_cloud.frag \
${SHADERSRCDIR}/point_cloud.vert \
${SHADERSRCDIR}/single_color.frag \
${SHADERSRCDIR}/single-color-lit-per-pixel.frag \
${SHADERSRCDIR}/single-color-lit-per-pixel.vert \
${SHADERSRCDIR}/single-color-lit-per-vertex.frag \
${SHADERSRCDIR}/single-color-lit-per-vertex.vert \
${SHADERSRCDIR}/single_color.vert \
${SHADERSRCDIR}/skybox.frag \
${SHADERSRCDIR}/skybox.vert \
${SHADERSRCDIR}/smaa-blend.shader \
${SHADERSRCDIR}/smaa-edge.shader \
${SHADERSRCDIR}/smaa-high.shader \
${SHADERSRCDIR}/SMAA.hlsl \
${SHADERSRCDIR}/smaa-neighborhood.shader \
${SHADERSRCDIR}/textured-and-lit-per-pixel.shader \
${SHADERSRCDIR}/textured-and-lit-per-vertex.shader \
${SHADERSRCDIR}/textured-cubemap-shield-per-pixel.shader \
${SHADERSRCDIR}/textured-cubemap-and-lit-with-annulus-shadow-per-pixel.shader \
${SHADERSRCDIR}/textured-particle.frag \
${SHADERSRCDIR}/textured-particle.vert \
${SHADERSRCDIR}/textured.shader \
${SHADERSRCDIR}/textured-with-sphere-shadow-per-pixel.shader \
${SHADERSRCDIR}/wireframe_filled.frag \
${SHADERSRCDIR}/wireframe_filled.vert \
${SHADERSRCDIR}/wireframe_transparent.frag \
${SHADERSRCDIR}/wireframe-transparent-sphere-clip.frag \
${SHADERSRCDIR}/wireframe-transparent-sphere-clip.vert \
${SHADERSRCDIR}/wireframe_transparent.vert \
${SHADERSRCDIR}/alpha_by_normal.shader
SCAD_PARAMS_FILES=${MODELSRCDIR}/disruptor.scad_params.h \
${MODELSRCDIR}/enforcer.scad_params.h \
${MODELSRCDIR}/starbase5.scad_params.h \
${MODELSRCDIR}/research-vessel.scad_params.h \
${MODELSRCDIR}/conqueror.scad_params.h \
${MODELSRCDIR}/cruiser.scad_params.h \
${MODELSRCDIR}/asteroid-miner.scad_params.h \
${MODELSRCDIR}/battlestar.scad_params.h \
${MODELSRCDIR}/wombat.scad_params.h \
${MODELSRCDIR}/destroyer.scad_params.h \
${MODELSRCDIR}/dragonhawk.scad_params.h \
${MODELSRCDIR}/tanker.scad_params.h \
${MODELSRCDIR}/swordfish.scad_params.h \
${MODELSRCDIR}/vanquisher.scad_params.h \
${MODELSRCDIR}/freighter.scad_params.h \
${MODELSRCDIR}/scrambler.scad_params.h \
${MODELSRCDIR}/spaceship2.scad_params.h \
${MODELSRCDIR}/spaceship3.scad_params.h \
${MODELSRCDIR}/skorpio.scad_params.h \
${MODELSRCDIR}/spaceship.scad_params.h \
${MODELSRCDIR}/transport.scad_params.h \
${MODELSRCDIR}/escapepod.scad_params.h \
${MODELSRCDIR}/mantis.scad_params.h \
${MODELSRCDIR}/missile.scad_params.h
DOCKING_PORT_FILES=${MODELSRCDIR}/starbase2.docking_ports.h \
${MODELSRCDIR}/starbase3.docking_ports.h \
${MODELSRCDIR}/starbase4.docking_ports.h \
${MODELSRCDIR}/starbase5.docking_ports.h \
${MODELSRCDIR}/starbase6.docking_ports.h \
${MODELSRCDIR}/starbase.docking_ports.h
MANSRCDIR=./man
MANPAGES=${MANSRCDIR}/snis_client.6.gz ${MANSRCDIR}/snis_server.6.gz \
${MANSRCDIR}/earthlike.1.gz \
${MANSRCDIR}/snis_text_to_speech.sh.6 ${MANSRCDIR}/snis_test_audio.1.gz ssgl/ssgl_server.6 ${MANSRCDIR}/snis_multiverse.6 \
${MANSRCDIR}/snis_update_assets.6
MANDIR=${DESTDIR}/${PREFIX}/share/man/man6
DESKTOPDIR=${DESTDIR}/${PREFIX}/share/applications
DESKTOPSRCDIR=.
DESKTOPFILES=${DESKTOPSRCDIR}/snis.desktop
UPDATE_DESKTOP=update-desktop-database ${DESKTOPDIR} || :
# -rdynamic is used by gcc for runtime stack traces (see stacktrace.c)
# but clang complains about it.
USING_CLANG=$(shell $(CC) --version | grep clang)
ifeq (${USING_CLANG},)
# not using clang
RDYNAMIC=-rdynamic
$(echo ${USING_CLANG})
else
# using clang
RDYNAMIC=
$(echo ${USING_CLANG})
endif
SNDLIBS:=$(shell $(PKG_CONFIG) --libs portaudio-2.0 vorbisfile)
SNDFLAGS:=-DWITHAUDIOSUPPORT $(shell $(PKG_CONFIG) --cflags portaudio-2.0) -DDATADIR=\"${DATADIR}\"
_OGGOBJ=ogg_to_pcm.o
_SNDOBJS=wwviaudio.o
ifeq (${E},1)
STOP_ON_WARN=-Werror
else
STOP_ON_WARN=
endif
ifeq (${O},1)
DEBUGFLAG=
OPTIMIZEFLAG=-O3
else
DEBUGFLAG=-g
OPTIMIZEFLAG=
endif
ifeq (${P},1)
ifeq ($(OSX), 1)
PROFILEFLAG=-lprofiler
else
PROFILEFLAG=-pg
endif
OPTIMIZEFLAG=-O3
DEBUGFLAG=
else
PROFILEFLAG=
endif
ifeq (${OSX},0)
# Arch pkg-config seems to be broken for lua5.2, so we have
# this "... || echo" hack thing.
#
LUALIBS:=$(shell $(PKG_CONFIG) --libs lua5.2 --silence-errors || $(PKG_CONFIG) --libs lua52 --silence-errors || $(PKG_CONFIG) --libs lua --silence-errors || echo '-llua5.2')
LUACFLAGS:=$(shell $(PKG_CONFIG) --cflags lua5.2 --silence-errors || $(PKG_CONFIG) --cflags lua52 --silence-errors || $(PKG_CONFIG) --cflags lua --silence-errors || echo '')
else
# OSX needs to do it this way (what is the point of pkgconfig if they all do it differently?)
LUALIBS:=$(shell $(PKG_CONFIG) --libs lua)
LUACFLAGS:=$(shell $(PKG_CONFIG) --cflags lua)
endif
PNGLIBS:=$(shell $(PKG_CONFIG) --libs libpng)
PNGCFLAGS:=$(shell $(PKG_CONFIG) --cflags libpng)
SDLLIBS:=$(shell $(SDL2_CONFIG) --libs)
SDLCFLAGS:=$(shell $(SDL2_CONFIG) --cflags)
GLEWLIBS:=$(shell $(PKG_CONFIG) --libs-only-l glew)
GLEWCFLAGS:=$(shell $(PKG_CONFIG) --cflags glew)
ifeq ($(OSX), 0)
CRYPTLIBS:=-lcrypt
else
CRYPTLIBS:=""
endif
_COMMONOBJS=mathutils.o snis_alloc.o snis_socket_io.o snis_marshal.o \
bline.o shield_strength.o stacktrace.o snis_ship_type.o \
snis_faction.o mtwist.o names.o infinite-taunt.o snis_damcon_systems.o \
string-utils.o c-is-the-locale.o starbase_metadata.o arbitrary_spin.o \
planetary_atmosphere.o planetary_ring_data.o mesh.o pthread_util.o \
snis_opcode_def.o rts_unit_data.o commodities.o snis_tweak.o rootcheck.o \
corporations.o replacement_assets.o snis_asset_dir.o snis_bin_dir.o scipher.o \
planetary_properties.o open-simplex-noise.o snis_licenses.o
COMMONOBJS=$(patsubst %,$(OD)/%,${_COMMONOBJS}) mikktspace/mikktspace.o
_SERVEROBJS=snis_server.o starbase-comms.o \
power-model.o quat.o vec4.o matrix.o snis_event_callback.o space-part.o fleet.o \
docking_port.o elastic_collision.o snis_nl.o spelled_numbers.o \
snis_server_tracker.o snis_bridge_update_packet.o solarsystem_config.o a_star.o \
key_value_parser.o nonuniform_random_sampler.o oriented_bounding_box.o shape_collision.o \
graph_dev_mesh_stub.o turret_aimer.o snis_hash.o snis_server_debug.o \
ship_registration.o talking_stick.o transport_contract.o
SERVEROBJS=${COMMONOBJS} $(patsubst %,$(OD)/%,${_SERVEROBJS})
_MULTIVERSEOBJS=snis_multiverse.o snis_marshal.o snis_socket_io.o mathutils.o mtwist.o stacktrace.o \
snis_hash.o quat.o string-utils.o key_value_parser.o snis_bridge_update_packet.o \
pthread_util.o rootcheck.o starmap_adjacency.o replacement_assets.o snis_asset_dir.o \
snis_bin_dir.o snis_licenses.o
MULTIVERSEOBJS=$(patsubst %,$(OD)/%,${_MULTIVERSEOBJS})
OGGOBJ=$(patsubst %,$(OD)/%,${_OGGOBJ})
SNDOBJS=$(patsubst %,$(OD)/%,${_SNDOBJS})
_COMMONCLIENTOBJS= snis_ui_element.o snis_font.o snis_text_input.o \
snis_typeface.o snis_gauge.o snis_button.o snis_label.o snis_sliders.o snis_text_window.o \
snis_strip_chart.o material.o stl_parser.o entity.o matrix.o my_point.o liang-barsky.o joystick.o \
quat.o vec4.o thrust_attachment.o docking_port.o ui_colors.o snis_keyboard.o solarsystem_config.o \
pronunciation.o snis_preferences.o snis_pull_down_menu.o snis_client_debug.o starmap_adjacency.o \
shape_collision.o oriented_bounding_box.o xdg_base_dir_spec.o snis_voice_chat.o read_menu_file.o
COMMONCLIENTOBJS=${COMMONOBJS} ${OGGOBJ} ${SNDOBJS} $(patsubst %,$(OD)/%,${_COMMONCLIENTOBJS})
_CLIENTOBJS= shader.o graph_dev_opengl.o opengl_cap.o snis_graph.o snis_client.o joystick_config.o snis_xwindows_hacks.o png_utils.o
CLIENTOBJS=${COMMONCLIENTOBJS} $(patsubst %,$(OD)/%,${_CLIENTOBJS})
_SDLCLIENTOBJS=shader.o graph_dev_opengl.o opengl_cap.o snis_graph.o mesh_viewer.o \
png_utils.o turret_aimer.o quat.o mathutils.o mesh.o \
mtwist.o material.o entity.o snis_alloc.o matrix.o stacktrace.o stl_parser.o \
snis_typeface.o snis_font.o string-utils.o ui_colors.o liang-barsky.o \
bline.o vec4.o open-simplex-noise.o replacement_assets.o snis_xwindows_hacks.o
SDLCLIENTOBJS=$(patsubst %,$(OD)/%,${_SDLCLIENTOBJS}) mikktspace/mikktspace.o
_NEBULANOISEOBJS=nebula_noise.o open-simplex-noise.o png_utils.o
NEBULANOISEOBJS=$(patsubst %,$(OD)/%,${_NEBULANOISEOBJS})
NEBULANOISELIBS=-lm ${PNGLIBS}
_GENERATE_SKYBOX_OBJS=generate_skybox.o open-simplex-noise.o png_utils.o mathutils.o quat.o mtwist.o
GENERATE_SKYBOX_OBJS=$(patsubst %,$(OD)/%,${_GENERATE_SKYBOX_OBJS})
GENERATE_SKYBOX_LIBS=-lm ${PNGLIBS}
X11LIBS=$(shell $(PKG_CONFIG) --libs x11)
X11CFLAGS=$(shell $(PKG_CONFIG) --cflags x11)
SSGL=ssgl/libssglclient.a
LIBS=-Lssgl -lssglclient -ldl -lm ${PNGLIBS} ${GLEWLIBS}
SERVERLIBS=-Lssgl -lssglclient ${LRTLIB} -ldl -lm ${LUALIBS} ${CRYPTLIBS}
MULTIVERSELIBS=-Lssgl -lssglclient ${LRTLIB} -ldl -lm ${CRYPTLIBS}
#
# NOTE: if you get
#
# /usr/bin/ld: cannot find -llua5.2
# collect2: ld returned 1 exit status
#
# try:
#
# sudo ln -s /usr/lib/i386-linux-gnu/liblua5.1.so.0 /usr/local/lib/liblua5.2.so
#
# or, if on x86_64:
#
# sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 /usr/local/lib/liblua5.2.so
#
# Also, you will need to install lua5.2 and liblua5.2-dev
# "sudo apt-get install liblua5.2-dev lua5.2"
#
BINPROGS=bin/ssgl_server bin/snis_server bin/snis_client bin/snis_text_to_speech.sh \
bin/snis_multiverse bin/lsssgl bin/snis_arduino bin/snis_launcher \
bin/snis_update_assets
UTILPROGS=util/mask_clouds util/cloud-mask-normalmap bin/mesh_viewer util/sample_image_colors \
util/generate_solarsystem_positions bin/nebula_noise bin/generate_skybox bin/earthlike
# model directory
MD=${ASSETSSRCDIR}/models
MODELS=${MD}/freighter.stl \
${MD}/laser.stl \
${MD}/spaceship.stl \
${MD}/torpedo.stl \
${MD}/tanker.stl \
${MD}/destroyer.stl \
${MD}/transport.stl \
${MD}/battlestar.stl \
${MD}/cruiser.stl \
${MD}/tetrahedron.stl \
${MD}/flat-tetrahedron.stl \
${MD}/big-flat-tetrahedron.stl \
${MD}/asteroid.stl \
${MD}/asteroid2.stl \
${MD}/asteroid3.stl \
${MD}/asteroid4.stl \
${MD}/wormhole.stl \
${MD}/starbase3.stl \
${MD}/starbase4.stl \
${MD}/starbase5.stl \
${MD}/starbase6.stl \
${MD}/spacemonster.stl \
${MD}/asteroid-miner.stl \
${MD}/spaceship2.stl \
${MD}/spaceship3.stl \
${MD}/dragonhawk.stl \
${MD}/skorpio.stl \
${MD}/long-triangular-prism.stl \
${MD}/ship-icon.stl \
${MD}/heading_indicator.stl \
${MD}/heading_indicator_tail.stl \
${MD}/axis.stl \
${MD}/scrambler.stl \
${MD}/swordfish.stl \
${MD}/wombat.stl \
${MD}/spaceship_turret.stl \
${MD}/spaceship_turret_base.stl \
${MD}/vanquisher.stl \
${MD}/docking_port.stl \
${MD}/docking_port2.stl \
${MD}/warpgate.stl \
${MD}/escapepod.stl \
${MD}/mantis.stl \
${MD}/laser_turret.stl \
${MD}/laser_turret_base.stl \
${MD}/uv_sphere.stl \
${MD}/warp-core.stl \
${MD}/space_monster_torso.stl \
${MD}/space_monster_tentacle_segment.stl \
${MD}/cylinder.stl \
${MD}/missile.stl
# compiler specific cflags
ifeq (${USING_CLANG},)
#
# We are not using clang.
#
# clang doesn't seem to know about these
# (which is weird, because "git -S no-extended-offsetof" shows this flag
# was added in the commit enabling clang support.)
#
COMPSPECCFLAGS=-Wno-extended-offsetof -Wno-format-truncation -Wstringop-truncation -Wstringop-overflow
else
# We are using clang
#
# I do not remember why we have -Wno-gnu-folding-constant, it was added when clang support
# was added, so clang apparently needed this at one time. It's not clear that it is still
# needed. I suspect clang used to throw many spurious warnings related to this.
#
COMPSPECCFLAGS=-Wno-gnu-folding-constant
endif
MYCFLAGS=-DPREFIX=${PREFIX} ${DEBUGFLAG} ${PROFILEFLAG} ${OPTIMIZEFLAG} ${UBSANFLAG}\
--pedantic -Wall -Wextra ${STOP_ON_WARN} -pthread -std=gnu99 ${RDYNAMIC} \
$(CFLAGS) -Wvla \
-DUSE_SNIS_XWINDOWS_HACKS=${USE_SNIS_XWINDOWS_HACKS} -fno-common \
-D_FORTIFY_SOURCE=2 -fsanitize=bounds \
-Warray-bounds \
-fstack-protector-strong -Wimplicit-fallthrough \
${COMPSPECCFLAGS} -Wstrict-prototypes
VORBISFLAGS:=$(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags vorbisfile))
ifeq (${WITHVOICECHAT},yes)
LIBOPUS=-L. -lopus
OPUSARCHIVE=libopus.a
VCHAT=-DWITHVOICECHAT=1
OPUSINCLUDE=-I./opus-1.3.1/include
else
LIBOPUS=
OPUSARCHIVE=
VCHAT=
OPUSINCLUDE=
endif
ifeq (${V},1)
Q=
ECHO=echo
else
Q=@
ECHO=echo
endif
COMPILE=$(ECHO) ' COMPILE' $< && $(CC) ${MYCFLAGS} ${LUACFLAGS} -c -o $@ $<
VORBISCOMPILE=$(ECHO) ' COMPILE' $< && $(CC) ${MYCFLAGS} ${VORBISFLAGS} ${SNDFLAGS} -c -o $@ $<
SDLCOMPILE=$(ECHO) ' COMPILE' $< && $(CC) ${MYCFLAGS} ${SDLCFLAGS} ${X11CFLAGS} -c -o $@ $<
SNISSERVERDBGCOMPILE=$(ECHO) ' COMPILE' $< && $(CC) -DSNIS_SERVER_DATA ${MYCFLAGS} ${LUACFLAGS} -c -o $(OD)/snis_server_debug.o $<
SNISCLIENTDBGCOMPILE=$(ECHO) ' COMPILE' $< && $(CC) -DSNIS_CLIENT_DATA ${MYCFLAGS} ${LUACFLAGS} -c -o $(OD)/snis_client_debug.o $<
CLIENTLINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} ${SNDFLAGS} -o $@ ${X11LIBS} ${SDLCFLAGS} ${CLIENTOBJS} ${SDLLIBS} ${LIBS} ${SNDLIBS} $(LDFLAGS) ${LIBOPUS} ${X11LIBS}
SDLCLIENTLINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} ${SNDFLAGS} -o $@ ${SDLCFLAGS} ${SDLCLIENTOBJS} ${SDLLIBS} ${LIBS} ${SNDLIBS} $(LDFLAGS) ${X11LIBS}
SERVERLINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} -o $@ ${SERVEROBJS} ${SERVERLIBS} $(LDFLAGS)
MULTIVERSELINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} -o $@ ${MULTIVERSEOBJS} ${MULTIVERSELIBS} $(LDFLAGS)
NEBULANOISELINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} -o $@ ${NEBULANOISEOBJS} ${NEBULANOISELIBS} $(LDFLAGS)
GENERATE_SKYBOX_LINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} -o $@ ${GENERATE_SKYBOX_OBJS} ${GENERATE_SKYBOX_LIBS} $(LDFLAGS)
OPENSCAD=$(ECHO) ' OPENSCAD' $< && openscad -o $@ $<
EXTRACTSCADPARAMS=$(ECHO) ' EXTRACT THRUST PARAMS' $@ && $(AWK) -f extract_scad_params.awk $< > $@
EXTRACTDOCKINGPORTS=$(ECHO) ' EXTRACT DOCKING PORTS' $@ && $(AWK) -f extract_docking_ports.awk $< > $@
_ELOBJS=mtwist.o mathutils.o quat.o open-simplex-noise.o png_utils.o crater.o pthread_util.o
ELOBJS=$(patsubst %,$(OD)/%, ${_ELOBJS})
ELLIBS=-lm ${LRTLIB} -lpng
ELLINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} -o $@ ${OD}/earthlike.o ${ELOBJS} ${ELLIBS} $(LDFLAGS)
MCLIBS=-lm ${LRTLIB} -lpng
_MCOBJS=png_utils.o
MCOBJS=$(patsubst %,$(OD)/%, ${_MCOBJS})
MCLINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} -o $@ util/mask_clouds.o ${MCOBJS} ${MCLIBS} $(LDFLAGS)
CMNMLIBS=-lm ${LRTLIB} -lpng
_CMNMOBJS=png_utils.o
CMNMOBJS=$(patsubst %,$(OD)/%, ${_CMNMOBJS})
CMNMLINK=$(ECHO) ' LINK' $@ && $(CC) ${MYCFLAGS} -o $@ util/cloud-mask-normalmap.o ${CMNMOBJS} ${CMNMLIBS} $(LDFLAGS)
all: bin/.t ${COMMONOBJS} ${SERVEROBJS} ${MULTIVERSEOBJS} ${CLIENTOBJS} ${BINPROGS} ${SCAD_PARAMS_FILES} ${DOCKING_PORT_FILES}
models: ${MODELS}
# we need to depend on ${OD}/.t not on ${OD} because OD is a directory and the
# timestamp changes whenever the directory contents change, and we need to depend
# only on the *existence* of the directory, not on the contents. Same for ${BIN}.
ODT=${OD}/.t
${ODT}:
@mkdir -p ${OD}
@if [ ! -f ${ODT} ] ; then \
touch ${ODT} ; \
fi
BIN=bin/.t
${BIN}:
@mkdir -p bin
@if [ ! -f ${BIN} ] ; then \
touch ${BIN} ; \
fi
# Rule to prevent common error of trying to "make foo" instead of "make bin/foo"
BINARY_NAMES=snis_client snis_server snis_limited_client snis_multiverse nebula_noise \
generate_skybox ssgl_server lsssgl snis_text_to_speech.sh mesh_viewer earthlike \
infinite-taunt names stl_parser test_key_value_parser test-matrix test-space-partition \
test-marshal test-quat test-fleet test-mtwist device-io-sample-1 test-nonuniform-random-sampler \
test-commodities test-obj-parser test_solarsystem_config test_crater print_ship_attributes \
test_snis_dmx snis_test_audio check-endianness test_stringutils yoke-test-program
${BINARY_NAMES}:
@echo "You probably meant: make bin/$@" 1>&2
@/bin/false
# Updating assets is now done via snis_launcher
#
# update-assets:
# @util/snis_update_assets.sh
#
# check-assets:
# @util/snis_update_assets.sh --dry-run
#
# install-assets:
# @util/snis_update_assets.sh --localcopy --destdir ${DESTDIR}/${PREFIX}
build: all
utils: ${UTILPROGS}
$(OD)/rootcheck.o: rootcheck.c rootcheck.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/graph_dev_opengl.o : graph_dev_opengl.c graph_dev.h shader.h vertex.h triangle.h \
mtwist.h mathutils.h matrix.h quat.h mesh.h vec4.h snis_graph.h graph_dev.h \
material.h entity.h entity_private.h snis_typeface.h opengl_cap.h png_utils.h \
Makefile ${ODT}
$(Q)$(SDLCOMPILE)
$(OD)/opengl_cap.o : opengl_cap.c Makefile ${ODT}
$(Q)$(SDLCOMPILE)
$(OD)/graph_dev_mesh_stub.o: graph_dev_mesh_stub.c graph_dev_mesh_stub.h ${ODT}
$(Q)$(COMPILE)
$(OD)/material.o : material.c Makefile ${ODT}
$(Q)$(SDLCOMPILE)
$(OD)/shader.o : shader.c Makefile ${ODT}
$(Q)$(COMPILE)
%.stl: %.scad
$(Q)$(OPENSCAD)
%.scad_params.h: %.scad
$(Q)$(EXTRACTSCADPARAMS)
%.docking_ports.h: %.scad
$(Q)$(EXTRACTDOCKINGPORTS)
$(OD)/thrust_attachment.o: thrust_attachment.c thrust_attachment.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/docking_port.o: docking_port.c docking_port.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_licenses.o: snis_licenses.c snis_licenses.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/ui_colors.o: ui_colors.c ui_colors.h snis_graph.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_keyboard.o: snis_keyboard.c snis_keyboard.h ${OD}/string-utils.o xdg_base_dir_spec.h Makefile ${ODT}
$(Q)$(SDLCOMPILE)
$(OD)/snis_preferences.o: snis_preferences.c snis_preferences.h string-utils.h snis_packet.h ${ODT}
$(Q)$(COMPILE)
$(OD)/solarsystem_config.o: solarsystem_config.c solarsystem_config.h string-utils.h Makefile ${ODT}
$(Q)$(COMPILE)
solarsystem_config_test: solarsystem_config.c ${OD}/string-utils.o ${ODT}
$(CC) ${MYCFLAGS} -DSOLARSYSTEM_CONFIG_TEST=1 -o $@ solarsystem_config.c ${OD}/string-utils.o
$(OD)/my_point.o: my_point.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/mesh.o: mesh.c mikktspace/mikktspace.h open-simplex-noise.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/pthread_util.o: pthread_util.c pthread_util.h ${ODT}
$(Q)$(COMPILE)
$(OD)/power-model.o: power-model.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/stacktrace.o: stacktrace.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_ship_type.o: snis_ship_type.c snis_ship_type.h corporations.h Makefile ${ODT}
$(Q)$(COMPILE)
bin/snis_launcher: snis_launcher
./modify_snis_launcher.sh snis_launcher ${PREFIX} > bin/snis_launcher
chmod +x bin/snis_launcher
bin/test_snis_ship_type: snis_ship_type.c snis_ship_type.h ${OD}/string-utils.o ${OD}/corporations.o ${OD}/rts_unit_data.o ${BIN}
$(CC) ${MYCFLAGS} -DTEST_SNIS_SHIP_TYPE -o bin/test_snis_ship_type snis_ship_type.c ${OD}/string-utils.o ${OD}/corporations.o ${OD}/rts_unit_data.o
$(OD)/snis_faction.o: snis_faction.c string-utils.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/liang-barsky.o: liang-barsky.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/joystick.o: joystick.c Makefile ${ODT}
$(Q)$(COMPILE)
joystick_test: joystick.c joystick.h Makefile
$(CC) -g -DJOYSTICK_TEST -o joystick_test joystick.c
$(OD)/joystick_config.o: joystick_config.c joystick_config.h string-utils.h ${ODT}
$(Q)$(COMPILE)
$(OD)/ogg_to_pcm.o: ogg_to_pcm.c Makefile ${ODT}
$(Q)$(VORBISCOMPILE)
$(OD)/bline.o: bline.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/wwviaudio.o: wwviaudio.c Makefile ${ODT}
$(Q)$(VORBISCOMPILE)
wwviaudio_basic_test: wwviaudio.c wwviaudio.h ${OGGOBJ}
$(CC) ${MYCFLAGS} -DWWVIAUDIO_BASIC_TEST -DDATADIR=\".\" -o wwviaudio_basic_test wwviaudio.c ${OGGOBJ} ${SNDLIBS}
wwviaudio_recording_test: wwviaudio.c wwviaudio.h ${OGGOBJ}
$(CC) ${MYCFLAGS} -DWWVIAUDIO_RECORDING_TEST -DDATADIR=\".\" -o wwviaudio_recording_test wwviaudio.c ${OGGOBJ} ${SNDLIBS}
$(OD)/shield_strength.o: shield_strength.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/planetary_properties.o: planetary_properties.c planetary_properties.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_server.o: snis_server.c Makefile build_info.h ${DOCKING_PORT_FILES} ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_multiverse.o: snis_multiverse.c snis_multiverse.h Makefile build_info.h ${ODT} \
snis_entity_key_value_specification.h
$(Q)$(COMPILE)
$(OD)/snis_server_tracker.o: snis_server_tracker.c snis_server_tracker.h pthread_util.h ${ODT} \
ssgl/ssgl.h Makefile
$(Q)$(COMPILE)
$(OD)/snis_client.o: snis_client.c Makefile build_info.h ui_colors.h ${ODT}
$(Q)$(SDLCOMPILE) ${VCHAT}
$(OD)/mesh_viewer.o: mesh_viewer.c Makefile build_info.h ${ODT}
$(Q)$(SDLCOMPILE)
# simplexnoise1234.o: simplexnoise1234.c Makefile build_info.h
# $(Q)$(COMPILE)
$(OD)/open-simplex-noise.o: open-simplex-noise.c Makefile build_info.h ${ODT}
$(Q)$(COMPILE)
$(OD)/nebula_noise.o: nebula_noise.c png_utils.h open-simplex-noise.h Makefile ${ODT}
$(Q)$(COMPILE)
bin/nebula_noise: $(NEBULANOISEOBJS) ${BIN}
$(Q)$(NEBULANOISELINK)
$(OD)/generate_skybox.o: generate_skybox.c png_utils.h open-simplex-noise.h quat.h mtwist.h mathutils.h Makefile ${ODT}
$(Q)$(COMPILE)
bin/generate_skybox: $(GENERATE_SKYBOX_OBJS) ${BIN}
$(Q)$(GENERATE_SKYBOX_LINK)
$(OD)/earthlike.o: earthlike.c ${ODT}
$(Q)$(COMPILE)
/util/mask_clouds.o: util/mask_clouds.c
$(Q)$(COMPILE)
/util/cloud-mask-normalmap.o: util/cloud-mask-normalmap.c
$(Q)$(COMPILE)
$(OD)/util/sample_image_colors.o: util/sample_image_colors.c ${OD}/png_utils.o ${ODT}
$(Q)$(COMPILE)
util/sample_image_colors: util/sample_image_colors.o ${OD}/png_utils.o
$(CC) ${MYCFLAGS} -o $@ util/sample_image_colors.o ${OD}/png_utils.o ${PNGLIBS}
$(OD)/util/generate_solarsystem_positions.o: util/generate_solarsystem_positions.c ${OD}/string-utils.o ${ODT}
$(Q)$(COMPILE)
util/generate_solarsystem_positions: util/generate_solarsystem_positions.o ${OD}/string-utils.o
$(CC) ${MYCFLAGS} -o $@ util/generate_solarsystem_positions.o ${OD}/string-utils.o -lm
$(OD)/snis_socket_io.o: snis_socket_io.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_marshal.o: snis_marshal.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_opcode_def.o: snis_opcode_def.c snis_opcode_def.h snis_packet.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/rts_unit_data.o: rts_unit_data.c rts_unit_data.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_bridge_update_packet.o: snis_bridge_update_packet.c snis_bridge_update_packet.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_font.o: snis_font.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/mathutils.o: mathutils.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/crater.o: crater.c crater.h Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/test_crater.o: test_crater.c ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_alloc.o: snis_alloc.c Makefile ${ODT}
$(Q)$(COMPILE)
$(OD)/snis_damcon_systems.o: snis_damcon_systems.c Makefile ${ODT}
$(Q)$(COMPILE)
bin/snis_server: ${SERVEROBJS} ${SSGL} Makefile ${BIN}
$(Q)$(SERVERLINK)
bin/snis_client: ${CLIENTOBJS} ${SSGL} Makefile ${BIN} ${OPUSARCHIVE}
$(Q)$(CLIENTLINK)
bin/snis_multiverse: ${MULTIVERSEOBJS} ${SSGL} Makefile ${BIN}
$(Q)$(MULTIVERSELINK)
ssgl/lsssgl: ${SSGL}
ssgl/ssgl_server: ${SSGL}
bin/ssgl_server: ${SSGL} ${BIN}
@cp ssgl/ssgl_server bin/ssgl_server