logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

gen.lua (1775B)


  1. cflags{
  2. '-D WITH_WAYLAND_SHM',
  3. '-D WITH_WAYLAND_DRM',
  4. '-I $outdir',
  5. '-isystem $builddir/pkg/fontconfig/include',
  6. '-isystem $builddir/pkg/freetype/include',
  7. '-isystem $builddir/pkg/libdrm/include',
  8. '-isystem $builddir/pkg/linux-headers/include',
  9. '-isystem $builddir/pkg/pixman/include',
  10. '-isystem $builddir/pkg/wayland/include',
  11. }
  12. pkg.hdrs = copy('$outdir/include/wld', '$srcdir', {'drm.h', 'pixman.h', 'wayland.h', 'wld.h'})
  13. pkg.hdrs.install = true
  14. local srcs = {
  15. 'buffer.c',
  16. 'buffered_surface.c',
  17. 'color.c',
  18. 'context.c',
  19. 'drm.c',
  20. 'dumb.c',
  21. 'font.c',
  22. 'renderer.c',
  23. 'surface.c',
  24. 'pixman.c',
  25. 'wayland.c',
  26. 'wayland-shm.c',
  27. 'wayland-drm.c',
  28. 'wayland-drm-protocol.c.o',
  29. }
  30. local libs = {
  31. 'fontconfig/libfontconfig.a.d',
  32. 'freetype/libfreetype.a.d',
  33. 'libdrm/libdrm.a',
  34. 'pixman/libpixman.a',
  35. 'wayland/libwayland-client.a.d',
  36. }
  37. if config.video_drivers and config.video_drivers['intel'] then
  38. cflags{'-D WITH_DRM_INTEL', '-isystem $basedir/pkg/libdrm/src/intel'}
  39. table.insert(srcs, {'intel.c', 'intel/batch.c'})
  40. table.insert(libs, 'libdrm/libdrm_intel.a.d')
  41. end
  42. if config.video_drivers and config.video_drivers['nouveau'] then
  43. cflags{'-D WITH_DRM_NOUVEAU', '-isystem $basedir/pkg/libdrm/src/nouveau'}
  44. table.insert(srcs, 'nouveau.c')
  45. table.insert(libs, 'libdrm/libdrm_nouveau.a')
  46. end
  47. waylandproto('protocol/wayland-drm.xml', {
  48. client='protocol/wayland-drm-client-protocol.h',
  49. server='protocol/wayland-drm-server-protocol.h',
  50. code='wayland-drm-protocol.c'
  51. })
  52. pkg.deps = {
  53. '$outdir/protocol/wayland-drm-client-protocol.h',
  54. 'pkg/fontconfig/headers',
  55. 'pkg/freetype/headers',
  56. 'pkg/libdrm/headers',
  57. 'pkg/linux-headers/headers',
  58. 'pkg/pixman/headers',
  59. 'pkg/wayland/headers',
  60. }
  61. lib('libwld.a', {srcs, expand{'$builddir/pkg/', libs}})
  62. fetch 'git'