forked from angeld29/mvdsv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.BSD
124 lines (108 loc) · 2.91 KB
/
Makefile.BSD
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
116
117
118
119
120
121
122
123
124
#
# QuakeWorld/MVDSV Makefile for FreeBSD/OpenBSD/NetBSD/DragonFly BSD/Darwin
#
# - now should build on non-x86
# - no longer requires gmake(1)
# - debug targets support axed out
# - couple of useful knobs added
#
# Created on Wednesday, May 21 2003 by Alexey Dokuchaev <danfe@regency.nsu.ru>
#
# $Id$
#
SV_DIR = ./src
# To compile mvdsv as 32bit on 64bit target platform use next:
# for gcc its like: make mvdsv FORCE32BITFLAGS=-m32
# configure script add FORCE32BITFLAGS=-m32
DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DSERVERONLY -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
WITH_OPTIMIZED_CFLAGS = YES
.if defined(WITH_OPTIMIZED_CFLAGS)
DO_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -funroll-loops
. if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
USE_ASM=-Did386
DO_CFLAGS += ${USE_ASM}
. endif
.endif
STRIP = strip
.if ${UNAME} != "Darwin" && ${UNAME} != "MacOSX"
STRIP_FLAGS = --strip-unneeded
.endif
STRIP_FLAGS += --remove-section=.comment
LDFLAGS = -lm
#############################################################################
# SERVER
#############################################################################
SV_OBJS = \
${SV_DIR}/pr_cmds.o \
${SV_DIR}/pr_edict.o \
${SV_DIR}/pr_exec.o \
\
${SV_DIR}/pr2_cmds.o \
${SV_DIR}/pr2_edict.o \
${SV_DIR}/pr2_exec.o \
$(SV_DIR)/vm.o \
$(SV_DIR)/vm_interpreted.o \
$(SV_DIR)/vm_x86.o \
\
${SV_DIR}/sv_ccmds.o \
${SV_DIR}/sv_demo.o \
${SV_DIR}/sv_demo_misc.o \
${SV_DIR}/sv_demo_qtv.o \
${SV_DIR}/sv_ents.o \
${SV_DIR}/sv_init.o \
${SV_DIR}/sv_login.o \
${SV_DIR}/sv_main.o \
${SV_DIR}/sv_master.o \
${SV_DIR}/sv_mod_frags.o \
${SV_DIR}/sv_move.o \
${SV_DIR}/sv_nchan.o \
${SV_DIR}/sv_phys.o \
${SV_DIR}/sv_send.o \
${SV_DIR}/sv_sys_unix.o \
${SV_DIR}/sv_user.o \
${SV_DIR}/sv_save.o \
\
${SV_DIR}/bothtools.o \
${SV_DIR}/cmd.o \
${SV_DIR}/common.o \
${SV_DIR}/cmodel.o \
${SV_DIR}/crc.o \
${SV_DIR}/cvar.o \
${SV_DIR}/hash.o \
${SV_DIR}/fs.o \
${SV_DIR}/vfs_os.o \
${SV_DIR}/vfs_pak.o \
${SV_DIR}/mathlib.o \
${SV_DIR}/md4.o \
${SV_DIR}/net_chan.o \
${SV_DIR}/net.o \
${SV_DIR}/pmove.o \
${SV_DIR}/pmovetst.o \
${SV_DIR}/sha1.o \
${SV_DIR}/sha3.o \
${SV_DIR}/build.o \
${SV_DIR}/world.o \
${SV_DIR}/zone.o \
\
${SV_DIR}/pcre/get.o \
${SV_DIR}/pcre/pcre.o \
\
${SV_DIR}/central.o
.ifdef USE_ASM
SV_ASM_OBJS = \
${SV_DIR}/bothtoolsa.o \
${SV_DIR}/math.o
.endif
#############################################################################
# SETUP AND BUILD
#############################################################################
.c.o:
${CC} ${DO_CFLAGS} -c $< -o $*.o
.s.o:
${CC} ${DO_CFLAGS} -DELF -x assembler-with-cpp -c $< -o $*.o
all: mvdsv
${STRIP} ${STRIP_FLAGS} mvdsv
mvdsv: ${SV_OBJS} ${SV_ASM_OBJS}
${CC} ${DO_CFLAGS} ${LDFLAGS} -o mvdsv ${SV_OBJS} ${SV_ASM_OBJS}
clean:
-rm -f ${SV_DIR}/*.core ${SV_DIR}/*.o ${SV_DIR}/pcre/*.o mvdsv