Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. if tup.getconfig("NO_GCC") ~= "" then return end
  2. if tup.getconfig("HELPERDIR") == ""
  3. then
  4.   if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation
  5.   HELPERDIR = "../../../programs"
  6. end
  7. tup.include(HELPERDIR .. "/use_gcc.lua")
  8. tup.include(HELPERDIR .. "/use_menuetlibc.lua")
  9. use_dynamic_stack() -- default 64K are not sufficient
  10. tup.include(HELPERDIR .. "/use_sdl.lua")
  11. CFLAGS = CFLAGS .. " -DSDL -UWIN32 -U_WIN32 -U__WIN32__ -D_KOLIBRI"
  12. CFLAGS = CFLAGS .. " -DUSE_ASM"
  13. -- CFLAGS = CFLAGS:gsub("-Os", "-O2")
  14. compile_gcc{
  15.   "chase.c", "cl_demo.c", "cl_input.c", "cl_main.c", "cl_parse.c", "cl_tent.c",
  16.   "cmd.c", "common.c", "console.c", "crc.c", "cvar.c", "d_edge.c", "d_init.c",
  17.   "d_modech.c", "d_part.c", "d_polyse.c", "d_scan.c", "d_sky.c", "d_sprite.c",
  18.   "d_surf.c", "draw.c", "host.c", "host_cmd.c", "keys.c", "mathlib.c",
  19.   "menu.c", "model.c", "net_loop.c", "net_main.c", "net_vcr.c", "pr_cmds.c",
  20.   "pr_edict.c", "pr_exec.c", "r_aclip.c", "r_alias.c", "r_bsp.c", "r_draw.c",
  21.   "r_edge.c", "r_efrag.c", "r_light.c", "r_main.c", "r_misc.c", "r_part.c",
  22.   "r_sky.c", "r_sprite.c", "r_surf.c", "sbar.c", "screen.c", "snd_dma.c",
  23.   "snd_mem.c", "snd_mix.c", "sv_main.c", "sv_move.c", "sv_phys.c", "sv_user.c",
  24.   "view.c", "wad.c", "world.c", "zone.c"
  25. }
  26. -- asm vs c
  27. --[[compile_gcc{
  28.   "d_vars.c", "r_vars.c", "nonintel.c"
  29. }]]
  30. compile_gcc{
  31.   "d_draw.S", "d_draw16.S", "d_parta.S", "d_polysa.S", "d_scana.S", "d_spr8.S",
  32.   "d_varsa.S", "math.S", "r_aclipa.S", "r_aliasa.S", "r_drawa.S", "r_edgea.S",
  33.   "r_varsa.S", "snd_mixa.S", "surf8.S", "surf16.S", "sys_wina.S", "worlda.S"
  34. }
  35. -- select variants
  36. compile_gcc{"sys_sdl.c"} -- SDL frontend
  37. compile_gcc{"vid_sdl.c"} -- video and mouse from SDL
  38. compile_gcc{"cd_null.c"} -- no CD audio
  39. compile_gcc{"snd_sdl.c"} -- sound from SDL
  40. compile_gcc{"net_none.c"} -- no network
  41. link_gcc("sdlquake")
  42.