aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix/Conscript-dedicated
blob: 140176006b13f6843e90b666d018883d963076af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# dedicated server build script

Import qw( BASE_CFLAGS BUILD_DIR INSTALL_DIR CC CXX LINK );

$DEDICATED_NAME = 'linuxq3ded';

$env_botlib = new cons(
  CC => $CC,
  CXX => $CXX,
  LINK => $LINK,
	ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} },
  CFLAGS => $BASE_CFLAGS . '-DBOTLIB '
);

@BOTLIB_FILES = qw(
  ../botlib/be_aas_bspq3.c
  ../botlib/be_aas_cluster.c
  ../botlib/be_aas_debug.c
  ../botlib/be_aas_entity.c
  ../botlib/be_aas_file.c
  ../botlib/be_aas_main.c
  ../botlib/be_aas_move.c
  ../botlib/be_aas_optimize.c
  ../botlib/be_aas_reach.c
  ../botlib/be_aas_route.c
  ../botlib/be_aas_routealt.c
  ../botlib/be_aas_sample.c
  ../botlib/be_ai_char.c
  ../botlib/be_ai_chat.c
  ../botlib/be_ai_gen.c
  ../botlib/be_ai_goal.c
  ../botlib/be_ai_move.c
  ../botlib/be_ai_weap.c
  ../botlib/be_ai_weight.c
  ../botlib/be_ea.c
  ../botlib/be_interface.c
  ../botlib/l_crc.c
  ../botlib/l_libvar.c
  ../botlib/l_log.c
  ../botlib/l_memory.c
  ../botlib/l_precomp.c
  ../botlib/l_script.c
  ../botlib/l_struct.c
);
$BOTLIB_REF = \@BOTLIB_FILES;

Library $env_botlib 'botlib', @$BOTLIB_REF;

# NOTE TTimo this requires patched cons version to work (see unix/cons)
%nasm_hash = new cons()->copy(
  CC => 'nasm',
  CCCOM => '%CC -f elf -o %> %<'
);
$nasm_hash{SUFMAP}{'.nasm'} = 'build::command::cc';
$nasm_env = new cons(%nasm_hash);

Library $nasm_env 'asmlib', 'ftol.nasm', 'snapvector.nasm';

$env = new cons(
  CC => $CC,
  CXX => $CXX,
  LINK => $LINK,
	ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} },
  # FIXME TTimo I'm not sure about what C_ONLY is for
  CFLAGS => $BASE_CFLAGS . '-DC_ONLY',
  LDFLAGS => '-ldl -lm',
  LIBS => ' ' 
  . $BUILD_DIR . '/unix/botlib.a '
  . $BUILD_DIR . '/unix/asmlib.a '
);

# list the files for the dedicated server
@FILES = qw( 
  ../null/null_client.c
  ../null/null_input.c
  ../null/null_snddma.c
  ../server/sv_bot.c
  ../server/sv_ccmds.c
  ../server/sv_client.c
  ../server/sv_game.c
  ../server/sv_init.c
  ../server/sv_main.c
  ../server/sv_net_chan.c
  ../server/sv_snapshot.c
  ../server/sv_world.c
  ../qcommon/cm_load.c
  ../qcommon/cm_patch.c
  ../qcommon/cm_polylib.c
  ../qcommon/cm_test.c
  ../qcommon/cm_trace.c
  ../qcommon/cmd.c
  ../qcommon/common.c
  ../qcommon/cvar.c
  ../qcommon/files.c
  ../qcommon/huffman.c
  ../qcommon/md4.c
  ../qcommon/msg.c
  ../qcommon/net_chan.c
  ../qcommon/unzip.c
  ../qcommon/vm.c
  ../qcommon/vm_interpreted.c
  ../game/q_math.c
  ../game/q_shared.c
  ../unix/linux_common.c
  ../unix/unix_main.c
  ../unix/unix_net.c
  ../unix/unix_shared.c
	../unix/linux_signals.c
   );
$FILESREF = \@FILES;

# DEDICATED_NAME is imported, holds the name of the target
# wolfded.x86 usually
Program $env $DEDICATED_NAME, '../qcommon/vm_x86.c', @$FILESREF;
Install $env $INSTALL_DIR, $DEDICATED_NAME;