Skip to content

Instantly share code, notes, and snippets.

@paniq
Created May 25, 2019 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paniq/b7bb72b5bd1a910ffcf5e4bb16bb29af to your computer and use it in GitHub Desktop.
Save paniq/b7bb72b5bd1a910ffcf5e4bb16bb29af to your computer and use it in GitHub Desktop.
inline gen-include-options! (name)
print "gen-include-options!" name
let modules... =
'app
'gfx
'time
'audio
'args
let prefixes... =
'sapp
'sg
'stm
'saudio
'sargs
let opts... =
va-map
inline (mod)
gen-include-options! (mod as string)
modules...
# probably not necessary, depends on what gen-include-options! does
run-stage; # option lists are now constant
va-map
inline (i)
let mod = (va@ i modules...)
let opt = (va@ i opts...)
include
options (unpack opt)
import mod
.. "include/sokol/sokol_" (mod as string) ".h"
va-range (va-countof modules...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment