Conscript-dedicated (2791B)
1 # dedicated server build script 2 3 Import qw( BASE_CFLAGS BUILD_DIR INSTALL_DIR CC CXX LINK ); 4 5 $DEDICATED_NAME = 'linuxq3ded'; 6 7 $env_botlib = new cons( 8 CC => $CC, 9 CXX => $CXX, 10 LINK => $LINK, 11 ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, 12 CFLAGS => $BASE_CFLAGS . '-DBOTLIB ' 13 ); 14 15 @BOTLIB_FILES = qw( 16 ../botlib/be_aas_bspq3.c 17 ../botlib/be_aas_cluster.c 18 ../botlib/be_aas_debug.c 19 ../botlib/be_aas_entity.c 20 ../botlib/be_aas_file.c 21 ../botlib/be_aas_main.c 22 ../botlib/be_aas_move.c 23 ../botlib/be_aas_optimize.c 24 ../botlib/be_aas_reach.c 25 ../botlib/be_aas_route.c 26 ../botlib/be_aas_routealt.c 27 ../botlib/be_aas_sample.c 28 ../botlib/be_ai_char.c 29 ../botlib/be_ai_chat.c 30 ../botlib/be_ai_gen.c 31 ../botlib/be_ai_goal.c 32 ../botlib/be_ai_move.c 33 ../botlib/be_ai_weap.c 34 ../botlib/be_ai_weight.c 35 ../botlib/be_ea.c 36 ../botlib/be_interface.c 37 ../botlib/l_crc.c 38 ../botlib/l_libvar.c 39 ../botlib/l_log.c 40 ../botlib/l_memory.c 41 ../botlib/l_precomp.c 42 ../botlib/l_script.c 43 ../botlib/l_struct.c 44 ); 45 $BOTLIB_REF = \@BOTLIB_FILES; 46 47 Library $env_botlib 'botlib', @$BOTLIB_REF; 48 49 # NOTE TTimo this requires patched cons version to work (see unix/cons) 50 %nasm_hash = new cons()->copy( 51 CC => 'nasm', 52 CCCOM => '%CC -f elf -o %> %<' 53 ); 54 $nasm_hash{SUFMAP}{'.nasm'} = 'build::command::cc'; 55 $nasm_env = new cons(%nasm_hash); 56 57 Library $nasm_env 'asmlib', 'ftol.nasm', 'snapvector.nasm'; 58 59 $env = new cons( 60 CC => $CC, 61 CXX => $CXX, 62 LINK => $LINK, 63 ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, 64 # FIXME TTimo I'm not sure about what C_ONLY is for 65 CFLAGS => $BASE_CFLAGS . '-DC_ONLY', 66 LDFLAGS => '-ldl -lm', 67 LIBS => ' ' 68 . $BUILD_DIR . '/unix/botlib.a ' 69 . $BUILD_DIR . '/unix/asmlib.a ' 70 ); 71 72 # list the files for the dedicated server 73 @FILES = qw( 74 ../null/null_client.c 75 ../null/null_input.c 76 ../null/null_snddma.c 77 ../server/sv_bot.c 78 ../server/sv_ccmds.c 79 ../server/sv_client.c 80 ../server/sv_game.c 81 ../server/sv_init.c 82 ../server/sv_main.c 83 ../server/sv_net_chan.c 84 ../server/sv_snapshot.c 85 ../server/sv_world.c 86 ../qcommon/cm_load.c 87 ../qcommon/cm_patch.c 88 ../qcommon/cm_polylib.c 89 ../qcommon/cm_test.c 90 ../qcommon/cm_trace.c 91 ../qcommon/cmd.c 92 ../qcommon/common.c 93 ../qcommon/cvar.c 94 ../qcommon/files.c 95 ../qcommon/huffman.c 96 ../qcommon/md4.c 97 ../qcommon/msg.c 98 ../qcommon/net_chan.c 99 ../qcommon/unzip.c 100 ../qcommon/vm.c 101 ../qcommon/vm_interpreted.c 102 ../game/q_math.c 103 ../game/q_shared.c 104 ../unix/linux_common.c 105 ../unix/unix_main.c 106 ../unix/unix_net.c 107 ../unix/unix_shared.c 108 ../unix/linux_signals.c 109 ); 110 $FILESREF = \@FILES; 111 112 # DEDICATED_NAME is imported, holds the name of the target 113 # wolfded.x86 usually 114 Program $env $DEDICATED_NAME, '../qcommon/vm_x86.c', @$FILESREF; 115 Install $env $INSTALL_DIR, $DEDICATED_NAME;