Rev 5131 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5131 | clevermous | 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") |
||
8520 | maxcodehac | 8 | tup.include(HELPERDIR .. "/use_newlib.lua") |
9 | --use_dynamic_stack() -- default 64K are not sufficient |
||
10 | tup.include(HELPERDIR .. "/use_sdl_newlib.lua") |
||
5131 | clevermous | 11 | CFLAGS = CFLAGS .. " -DSDL -UWIN32 -U_WIN32 -U__WIN32__ -D_KOLIBRI" |
12 | CFLAGS = CFLAGS .. " -DUSE_ASM" |
||
8520 | maxcodehac | 13 | |
14 | LDFLAGS = LDFLAGS .. " --subsystem native --stack 0x200000" |
||
15 | |||
5131 | clevermous | 16 | -- CFLAGS = CFLAGS:gsub("-Os", "-O2") |
17 | compile_gcc{ |
||
18 | "chase.c", "cl_demo.c", "cl_input.c", "cl_main.c", "cl_parse.c", "cl_tent.c", |
||
19 | "cmd.c", "common.c", "console.c", "crc.c", "cvar.c", "d_edge.c", "d_init.c", |
||
20 | "d_modech.c", "d_part.c", "d_polyse.c", "d_scan.c", "d_sky.c", "d_sprite.c", |
||
21 | "d_surf.c", "draw.c", "host.c", "host_cmd.c", "keys.c", "mathlib.c", |
||
22 | "menu.c", "model.c", "net_loop.c", "net_main.c", "net_vcr.c", "pr_cmds.c", |
||
23 | "pr_edict.c", "pr_exec.c", "r_aclip.c", "r_alias.c", "r_bsp.c", "r_draw.c", |
||
24 | "r_edge.c", "r_efrag.c", "r_light.c", "r_main.c", "r_misc.c", "r_part.c", |
||
25 | "r_sky.c", "r_sprite.c", "r_surf.c", "sbar.c", "screen.c", "snd_dma.c", |
||
26 | "snd_mem.c", "snd_mix.c", "sv_main.c", "sv_move.c", "sv_phys.c", "sv_user.c", |
||
27 | "view.c", "wad.c", "world.c", "zone.c" |
||
28 | } |
||
29 | -- asm vs c |
||
30 | --[[compile_gcc{ |
||
31 | "d_vars.c", "r_vars.c", "nonintel.c" |
||
32 | }]] |
||
33 | compile_gcc{ |
||
34 | "d_draw.S", "d_draw16.S", "d_parta.S", "d_polysa.S", "d_scana.S", "d_spr8.S", |
||
35 | "d_varsa.S", "math.S", "r_aclipa.S", "r_aliasa.S", "r_drawa.S", "r_edgea.S", |
||
36 | "r_varsa.S", "snd_mixa.S", "surf8.S", "surf16.S", "sys_wina.S", "worlda.S" |
||
37 | } |
||
38 | -- select variants |
||
39 | compile_gcc{"sys_sdl.c"} -- SDL frontend |
||
40 | compile_gcc{"vid_sdl.c"} -- video and mouse from SDL |
||
41 | compile_gcc{"cd_null.c"} -- no CD audio |
||
42 | compile_gcc{"snd_sdl.c"} -- sound from SDL |
||
43 | compile_gcc{"net_none.c"} -- no network |
||
44 | link_gcc("sdlquake") |