blob: c9607a7bee60d165d6b60f81bfaeb46bd60348d4 (
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
|
#
# Makefile for Gladiator Bot library: gladiator.so
# Intended for gcc/Linux
#
ARCH=i386
CC=gcc
BASE_CFLAGS=-Dstricmp=strcasecmp
#use these cflags to optimize it
CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
-malign-jumps=2 -malign-functions=2
#use these when debugging
#CFLAGS=$(BASE_CFLAGS) -g
LDFLAGS=-ldl -lm
SHLIBEXT=so
SHLIBCFLAGS=-fPIC
SHLIBLDFLAGS=-shared
DO_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
#############################################################################
# SETUP AND BUILD
# GLADIATOR BOT
#############################################################################
.c.o:
$(DO_CC)
GAME_OBJS = \
be_aas_bsphl.o\
be_aas_bspq2.o\
be_aas_cluster.o\
be_aas_debug.o\
be_aas_entity.o\
be_aas_file.o\
be_aas_light.o\
be_aas_main.o\
be_aas_move.o\
be_aas_optimize.o\
be_aas_reach.o\
be_aas_route.o\
be_aas_routealt.o\
be_aas_sample.o\
be_aas_sound.o\
be_ai2_dmq2.o\
be_ai2_dmhl.o\
be_ai2_dmnet.o\
be_ai2_main.o\
be_ai_char.o\
be_ai_chat.o\
be_ai_goal.o\
be_ai_load.o\
be_ai_move.o\
be_ai_weap.o\
be_ai_weight.o\
be_ea.o\
be_interface.o\
l_crc.o\
l_libvar.o\
l_log.o\
l_memory.o\
l_precomp.o\
l_script.o\
l_struct.o\
l_utils.o\
q_shared.o
glad$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
#############################################################################
# MISC
#############################################################################
clean:
-rm -f $(GAME_OBJS)
depend:
gcc -MM $(GAME_OBJS:.o=.c)
install:
cp gladiator.so ..
#
# From "make depend"
#
|