-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpremake4.lua
More file actions
847 lines (621 loc) · 20 KB
/
premake4.lua
File metadata and controls
847 lines (621 loc) · 20 KB
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
newoption {
trigger = "openal",
value = "soft",
description = "Choose openal",
allowed = {
{ "soft", "build our own" },
{ "sys", "System provided" },
}
}
function buildlinkoptions(t) buildoptions(t) linkoptions(t) end
function newplatform(platform)
platform.cfgsuffix = ""
platform.iscrosscompiler = true
premake.gcc.platforms[platform.name] = platform.gcc
premake.platforms[platform.name] = platform
table.insert(premake.option.list["platform"].allowed, { platform.name, platform.description })
table.insert(premake.fields.platforms.allowed, platform.name)
end
ANDROID_VERSION="29"
newplatform {
name = "android-a32",
description = "android 32 bit arm",
cpu_id = "a32",
cpu_name = "armeabi-v7a",
gcc=
{
cc ="armv7a-linux-androideabi"..ANDROID_VERSION.."-clang",
cxx="armv7a-linux-androideabi"..ANDROID_VERSION.."-clang++",
ar ="llvm-ar",
cppflags = "-MMD -fPIC", -- should we build in thumb mode? "-mthumb"
}
}
newplatform {
name = "android-a64",
description = "android 64 bit arm",
cpu_id = "a64",
cpu_name = "arm64-v8a",
gcc=
{
cc ="aarch64-linux-android"..ANDROID_VERSION.."-clang",
cxx="aarch64-linux-android"..ANDROID_VERSION.."-clang++",
ar ="llvm-ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "android-x32",
description = "android 32 bit intel",
cpu_id = "x32",
cpu_name = "x86",
gcc=
{
cc ="i686-linux-android"..ANDROID_VERSION.."-clang",
cxx="i686-linux-android"..ANDROID_VERSION.."-clang++",
ar ="llvm-ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "android-x64",
description = "android 64 bit intel",
cpu_id = "x64",
cpu_name = "x86_64",
gcc=
{
cc ="x86_64-linux-android"..ANDROID_VERSION.."-clang",
cxx="x86_64-linux-android"..ANDROID_VERSION.."-clang++",
ar ="llvm-ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "mingwin",
description = "mingw on windows",
gcc=
{
cc ="gcc",
cxx="c++",
ar ="ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "mingw",
description = "mingw",
gcc=
{
cc ="x86_64-w64-mingw32-gcc",
cxx="x86_64-w64-mingw32-c++",
ar ="x86_64-w64-mingw32-ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "gcc",
description = "gcc",
gcc = {
cc = "gcc",
cxx = "g++",
ar= "ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "osx",
description = "osx",
gcc = {
cc = "clang",
cxx = "clang++",
ar= "ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "clang",
description = "clang",
gcc = {
cc = "clang",
cxx = "clang++",
ar= "ar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "emcc",
description = "emcc",
gcc = {
cc = "emcc",
cxx = "em++",
ar= "emar",
cppflags = "-MMD -fPIC",
}
}
newplatform {
name = "clang-arm",
description = "clang",
gcc = {
cc = "clang --target=armv7-linux-gnu",
cxx = "clang++ --target=armv7-linux-gnu",
ar= "ar",
cppflags = "-MMD -fPIC",
}
}
------------------------------------------------------------------------
-- work out what we should be building for
------------------------------------------------------------------------
solution("wetgenes")
-- work out build type and set flags
EMCC=false
ANDROID=false
WINDOWS=false
MINGW=false
NIX=false
CPU="NATIVE"
TARGET="NIX"
NIX=false
GCC=false
CLANG=false
local t= _ARGS[1] or ""
if t:sub(1,4)=="emcc" then
TARGET="EMCC"
CPU=t:sub(5)
EMCC=true
GCC=true
elseif t:sub(1,7)=="android" then
TARGET="ANDROID"
CPU=t:sub(8)
ANDROID=true
GCC=true
elseif t:sub(1,5)=="mingw" then
if t:sub(1,7)=="mingwin" then MINGWIN=true end -- use exe compiler
TARGET="MINGW"
CPU=t:sub(6)
WINDOWS=true
MINGW=true
GCC=true
CPU=t:sub(6)
WINDOWS=true
MINGW=true
GCC=true
elseif t:sub(1,3)=="gcc" then
TARGET="GCC"
CPU=t:sub(4)
NIX=true
GCC=true
elseif t:sub(1,5)=="clang" then
TARGET="CLANG"
CPU=t:sub(6)
NIX=true
GCC=true
CLANG=true
elseif t:sub(1,3)=="osx" then
TARGET="OSX"
CPU=t:sub(4)
OSX=true
CLANG=true
else
TARGET="NIX"
NIX=true
end
if CPU=="native" then -- done
else
if CPU=="-64" then CPU="x64"
elseif CPU=="-32" then CPU="x32"
elseif CPU=="-x64" then CPU="x64"
elseif CPU=="-x32" then CPU="x32"
elseif CPU=="-a32" then CPU="a32"
elseif CPU=="-a64" then CPU="a64"
else CPU="native"
end
end
print("TARGET == "..TARGET.." " ..CPU )
-- no warnings on release builds ( assume a user is building, warning are not what they care about )
-- when actually developing we will be using debug builds
configuration {"Release"}
buildlinkoptions{
"-w",
}
configuration {}
if EMCC then
defines "EMCC"
buildoptions {
}
buildlinkoptions {
"-pthread",
}
linkoptions{
"-v",
"-s PTHREAD_POOL_SIZE=16", -- safer to have these available.
"-s ALLOW_MEMORY_GROWTH=1", -- we are big and ineffable so this is rather necessary
"-s EXPORTED_FUNCTIONS=\"['"..table.concat({
"_main",
"_main_update",
"_main_close",
},"','").."']\"",
"-s EXPORTED_RUNTIME_METHODS=\"['"..table.concat({
"ccall",
"cwrap",
},"','").."']\"",
-- "-s PROXY_TO_PTHREAD=0", -- PROXY_TO_PTHREAD is borked so must be disabled
-- "-s OFFSCREEN_FRAMEBUFFER",
"-s ASYNCIFY",
-- "-s ASYNCIFY_IMPORTS=['_emscripten_receive_on_main_thread_js']",
-- "-lidbfs.js",
"-s WASMFS",
"-s FORCE_FILESYSTEM",
}
platforms { "emcc" }
-- set debug/release build flags
configuration {"Debug"}
linkoptions{
"-s ASSERTIONS=1",
-- "-gsource-map=inline", -- this breaks...?
"--emrun", -- expect the debug emscripten to do the emrun stuff
-- "-s SAFE_HEAP=1",
}
buildlinkoptions{
"-O0",
"-g3",
-- "-s ALIASING_FUNCTION_POINTERS=0",
-- "--minify 0",
}
configuration {"Release"}
buildlinkoptions{
"-O3",
"-g0",
-- "-fno-exceptions",
}
configuration {}
elseif ANDROID then
-- local androidsdk=path.getabsolute("./sdks/android-sdk")
-- local androidsys=path.getabsolute("./sdks/android-9-arm/sysroot/usr")
local platform=premake.platforms[ "android-"..CPU ]
platforms { "android-"..CPU } --hax
defines "ANDROID"
defines("LUA_USE_POSIX")
includedirs { "exe/android/include" }
libdirs { path.getabsolute("exe/android/lib/"..platform.cpu_name) }
buildoptions{ "-mtune=generic" }
elseif WINDOWS then
defines "_WIN32_WINNT=0x0501"
defines "WIN32"
defines "_CRT_SECURE_NO_WARNINGS"
-- defines "LUA_BUILD_AS_DLL"
if MINGW then
if MINGWIN then platforms { "mingwin" } --use exe compiler
else platforms { "mingw" } --use new 64 bit compiler
end
buildoptions{"-mtune=generic"}
end
elseif OSX then
-- includedirs { "/usr/local/include/SDL2" } -- pickup our luajit / SDL2 builds from default install paths
defines("LUA_USE_MKSTEMP") -- remove warning
defines("LUA_USE_POPEN") -- we want to enable popen
platforms { "osx" } --hax
buildoptions{"-mmacosx-version-min=10.12"}
linkoptions {"-mmacosx-version-min=10.12"}
if CPU=="x32" then
buildoptions{"-m32 -msse -msse2 -mtune=generic"}
linkoptions {"-m32 -msse -msse2 -mtune=generic"}
elseif CPU=="x64" then
buildoptions{"-m64 -mtune=generic"}
linkoptions {"-m64 -mtune=generic"}
end
elseif NIX then
platforms { "gcc" } --default hax
buildlinkoptions {
"-pthread",
}
buildoptions{
"-Wno-format-security",
"-Wno-deprecated-declarations",
}
function os.capture(cmd, raw)
local f = assert(io.popen(cmd, 'r'))
local s = assert(f:read('*a'))
f:close()
if raw then return s end
s = string.gsub(s, '^%s+', '')
s = string.gsub(s, '%s+$', '')
s = string.gsub(s, '[\n\r]+', ' ')
return s
end
BUILD_CPU = os.capture("getconf LONG_BIT") -- remember the build cpu "32"/"64"
-- BUILD_ARCH=os.capture("dpkg --print-architecture") -- better guess?
-- includedirs { "/usr/local/include/SDL2" } -- pickup our luajit / SDL2 builds from default install paths
defines("LUA_USE_MKSTEMP") -- remove warning
defines("LUA_USE_POPEN") -- we want to enable popen
defines "X11"
-- defines "LUA_USE_DLOPEN"
linkoptions "-Wl,-rpath=\\$$ORIGIN:."
if CLANG then
platforms { "clang" } --hax
end
if CPU=="x32" then
buildoptions{"-m32 -msse -msse2 -mtune=generic"}
linkoptions{"-m32 -msse -msse2 -mtune=generic"}
elseif CPU=="x64" then
buildoptions{"-m64 -mtune=generic"}
linkoptions{"-m64 -mtune=generic"}
elseif CPU=="a64" then
buildoptions{"-m64 -mtune=generic"}
linkoptions{"-m64 -mtune=generic"}
elseif CPU=="native" then -- do not mess with build flags?
-- buildoptions{"-mtune=generic"} -- aim for a stable build?
-- linkoptions{"-mtune=generic"}
-- buildoptions{"-march=native"}
-- linkoptions{"-march=native"}
end
end
if not BUILD_DIR_BASE then
BUILD_DIR_BASE=("build-"..(_ACTION or "gmake").."-"..TARGET.."-"..CPU):lower()
end
if not BUILD_DIR then
BUILD_DIR=BUILD_DIR_BASE
end
location( BUILD_DIR )
configurations { "Debug", "Release" }
EXE_OUT_DIR=path.getabsolute("exe")
DBG_OUT_DIR=path.getabsolute("dbg")
ALL_OBJ_DIR=path.getabsolute(BUILD_DIR.."/obj")
EXE_OBJ_DIR=path.getabsolute(BUILD_DIR.."/obj/Release")
DBG_OBJ_DIR=path.getabsolute(BUILD_DIR.."/obj/Debug")
static_lib_names={}
lua_lib_names={}
lua_lib_loads={}
-- deadsimple single char string spliter, c must be a single char possibly escaped with %
-- this is a simple path or modulename spliting function
local function csplit(p,c)
local ps={}
local fi=1
while true do
local fa,fb=string.find(p,c,fi)
if fa then
local s=string.sub(p,fi,fa-1)
ps[#ps+1]=s
fi=fb+1
else
break
end
end
ps[#ps+1]=string.sub(p,fi)
return ps
end
function KIND(opts)
-- apply to all configs
configuration{}
opts=opts or {}
if opts.lua then -- shorthand lua options, fill in other opts with it
opts.kind="lua"
opts.luaname=opts.lua -- the full lua module name
local aa=csplit(opts.lua,"%.") -- break it on every .
opts.luaopen=table.concat(aa,"_") -- replace . with _ and that is the call function
opts.name=aa[#aa] -- last part is the name
aa[#aa]=nil -- remove name and what everything else is the dir
opts.dir=table.concat(aa,"/")
end
if opts.kind=="lua" then
opts.kind="StaticLib" -- lua turns to static
lua_lib_names[#lua_lib_names+1]=project().name
lua_lib_loads[#lua_lib_loads+1]={opts.luaname or opts.name,opts.luaopen or opts.luaname or opts.name}
--print( "LIB" , lua_lib_loads[#lua_lib_loads][1] , lua_lib_loads[#lua_lib_loads][2] )
end
opts.kind=opts.kind or "StaticLib" -- default kind
kind(opts.kind)
if opts.name and opts.kind~="StaticLib" then -- force an output target name
targetprefix ("")
targetname (opts.name)
end
-- setup configurations
configuration {"Debug"}
flags {"Symbols"} -- blue debug needs symbols badly
configuration {"Release"}
flags {"Optimize"}
-- flags {"Symbols"} -- keep symbols to help with release only crashes
-- set output dirs
if opts.kind~="StaticLib" then -- force output dir
local d=""
if opts.dir and opts.dir~="" then d="/"..opts.dir end
if ANDROID then
local platform=premake.platforms[ "android-"..CPU ]
configuration {"Debug"}
targetdir(DBG_OUT_DIR.."/android/lib/"..platform.cpu_name..d)
configuration {"Release"}
targetdir(EXE_OUT_DIR.."/android/lib/"..platform.cpu_name..d)
print(EXE_OUT_DIR.."/android/lib/"..platform.cpu_name..d)
else
configuration {"Debug"}
targetdir(DBG_OUT_DIR..d)
configuration {"Release"}
targetdir(EXE_OUT_DIR..d)
end
else
static_lib_names[#static_lib_names+1]=project().name
configuration {"Debug"}
targetdir(DBG_OBJ_DIR)
configuration {"Release"}
targetdir(EXE_OBJ_DIR)
end
end
------------------------------------------------------------------------
-- which lua version should we use
------------------------------------------------------------------------
if EMCC then -- need to build and use our lua
LUA_BIT="lua_bit"
LIB_LUA="lib_lua" -- default
includedirs { "libs/lib_lua/src" }
LUA_LINKS= nil
elseif ANDROID then
defines{ "LUA_JIT_USED" }
LUA_LINKS= { "luajit" }
elseif MINGW then
defines{ "LUA_JIT_USED" }
LUA_LINKS= { "luajit" }
-- build these files using build/install --mingw
includedirs { "/usr/x86_64-w64-mingw32/include/luajit" }
-- libdirs { "/usr/i686-w64-mingw32/lib/luajit" }
-- includedirs { path.getabsolute("./vbox_mingw/luajit/include") }
-- libdirs { path.getabsolute("./vbox_mingw/luajit/lib") }
else
defines{ "LUA_JIT_USED" }
-- we expect luajit to be provided in the system
includedirs { "/usr/local/include/luajit-2.1" } -- assume only one of these possible locations is correct
includedirs { "/usr/local/64/include/luajit-2.1" }
includedirs { "/usr/include/luajit-2.1" }
includedirs { "/usr/include/luajit-2.0" }
includedirs { "/app/include/luajit-2.1" } -- flatpack build
LUA_LINKS="luajit-5.1"
-- or expect lua to be provided in the system by swapping this with above
-- LUA_BIT="lua_bit"
-- includedirs { "/usr/include/lua5.2" }
-- LUA_LINKS="lua5.2"
end
-- pick the os interface we will build, you can force one with environment
-- most of them are variants on linux so this can be useful
GAMECAKE_WIN_TYPE=os.getenv("GAMECAKE_WIN_TYPE")
-- or we look at what code we are building
if (not GAMECAKE_WIN_TYPE) or (GAMECAKE_WIN_TYPE=="") then
if WINDOWS then GAMECAKE_WIN_TYPE="windows"
elseif NIX then GAMECAKE_WIN_TYPE="linux"
elseif EMCC then GAMECAKE_WIN_TYPE="emcc"
elseif ANDROID then GAMECAKE_WIN_TYPE="android"
elseif OSX then GAMECAKE_WIN_TYPE="osx"
end
end
-- allow no win option, maybe usefull?
if GAMECAKE_WIN_TYPE=="none" then GAMECAKE_WIN_TYPE=false end
-- many many versions of GL to suport, these make this work -> #include INCLUDE_GLES_GL
if EMCC or ANDROID then
defines{ "LUA_GLES_GLES3" }
defines{ "INCLUDE_GLES_GL=\\\"GLES3/gl3.h\\\"" }
elseif WINDOWS then -- need windows GL hacks
includedirs { "libs/lua_gles/include" }
defines{ "LUA_GLES_GL" }
if GCC then
defines{ "INCLUDE_GLES_GL=\\\"GL/gl3w.h\\\"" }
else
defines{ "INCLUDE_GLES_GL=\"GL/gl3w.h\"" }
end
else -- use GL
includedirs { "libs/lua_gles/include" }
defines{ "LUA_GLES_GL" }
defines{ "INCLUDE_GLES_GL=\\\"GL/gl3w.h\\\"" }
end
-- add get SDL2 include files
if MINGW then
-- build these files using build/install --mingw
includedirs { "/usr/x86_64-w64-mingw32/include/SDL2" }
-- libdirs { "/usr/i686-w64-mingw32/lib/SDL2" }
-- includedirs { path.getabsolute("./vbox_mingw/SDL2/include/SDL2") }
-- libdirs { path.getabsolute("./vbox_mingw/SDL2/lib") }
elseif EMCC then
buildlinkoptions{
"-Wno-error=format-security",
"-s USE_SDL=2",
}
linkoptions{
"-s FULL_ES3=1",
"-s USE_WEBGL2=1",
"-s MIN_WEBGL_VERSION=2",
"-s MAX_WEBGL_VERSION=2",
}
else
-- use system includes
includedirs { "/usr/local/include/SDL2" }
includedirs { "/usr/include/SDL2" }
end
-- OpenAL
--print(_OPTIONS)
--for n,v in pairs(_OPTIONS) do print(n,v) end
if _OPTIONS["openal"]=="sys" then
print("USING SYSTEM PROVIDED OPENAL")
LIB_OPENAL=nil
else
LIB_OPENAL="lib_openal"
includedirs { "libs/lib_openal/mojoal" }
defines("AL_LIBTYPE_STATIC")
end
includedirs { "libs/lib_hacks/code" }
includedirs { "libs/lua_freetype/code" }
includedirs { "libs/lua_grd/code" }
all_includes=all_includes or {
-- lua bindings that should always be available no matter the OS host.
{LUA_BIT, WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_djon", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_kissfft", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_pack", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_fats", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_zip", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_zlib", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_freetype", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_ogg", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_al", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_tardis", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_gles", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_grd", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_grdmap", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_sod", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_socket", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_sec", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_gamecake", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_win", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_lfs", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_sqlite", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_lash", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_sdl2", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_bullet", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_chipmunk", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_utf8", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_cmsgpack", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_brimworkszip",WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_opus", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lua_lanes", WINDOWS or NIX or EMCC or ANDROID or OSX },
-- emcc needs a little bit of special sauce
-- {"lua_win_emcc", nil or nil or EMCC or nil or nil },
-- These are mostly linux only bindings for linux only gamecake projects...
-- {"lua_linenoise", WINDOWS or NIX or nil or nil or OSX },
{"lua_posix", nil or NIX or nil or nil or OSX },
{"lua_periphery", nil or NIX or nil or nil or nil },
{"lua_v4l2", nil or NIX or nil or nil or nil },
{"lua_rex", nil or NIX or nil or nil or nil },
{"lua_sys", WINDOWS or NIX or nil or nil or OSX },
{"lua_glslang", nil or NIX or nil or nil or nil },
{"lua_midi", nil or NIX or nil or nil or nil },
{"lua_pgsql", nil or NIX or nil or nil or nil },
{"lib_pq", nil or NIX or nil or nil or nil },
-- hid is now in SDL
-- {"lua_hid", nil or NIX or nil or nil or nil },
-- {"lib_hidapi", nil or NIX or nil or nil or nil },
-- this is probably luajit but may be lua 5.1
{LIB_LUA, WINDOWS or NIX or EMCC or ANDROID or OSX },
-- static libs used by the lua bindings so they should be linked afterwards
{"lib_wolfssl", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_opus", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_speexdsp", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_png", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_jpeg", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_gif", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_z", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_zip", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_zzip", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_freetype", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_vorbis", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_ogg", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_sqlite", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_hacks", WINDOWS or NIX or EMCC or ANDROID or OSX },
{"lib_pcre", nil or NIX or nil or nil or OSX },
-- some OS will provide openal so do not need this.
{LIB_OPENAL, WINDOWS or NIX or nil or ANDROID or nil },
-- the output executables
{"exe_gamecake", WINDOWS or NIX or EMCC or ANDROID or OSX },
}
------------------------------------------------------------------------
-- include sub projects depending on above build tests or you could choose
-- to set all_includes before including this file to choose your own config
------------------------------------------------------------------------
for i,v in ipairs(all_includes) do
if v[1] and v[2] then
include("libs/"..v[1])
end
end