forked from APGRoboCop/foxbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_win32
79 lines (64 loc) · 1.75 KB
/
Makefile_win32
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
##
## compiling under ubuntu:
## for compiling linux: make
## for compiling win32: make OSTYPE=win32
## i686-w64-mingw32-gcc -mdll --add-stdcall-alias
ifeq ($(OSTYPE),win32)
CPP = i586-linux-gnu-gcc -m32 -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -Dstrcmpi=strcasecmp
LINKFLAGS = -Xlinker -shared -s
DLLEND = .dll
else
CPP = clang -m32 -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -Dstrcmpi=strcasecmp -DLINUX -D__linux__
ARCHFLAG = -fPIC
LINKFLAGS = -fPIC -shared -ldl -s
DLLEND = .so
endif
TARGET = foxbot_mm
BASEFLAGS = -Wall -Wno-write-strings
ARCHFLAG += -march=i686 -mtune=generic
ifeq ($(DBG_FLGS),1)
OPTFLAGS = -O0 -g
else
OPTFLAGS = -O2 -msse2 -fexpensive-optimizations -g -flto
endif
INCLUDES = -I"../metamod-p-37/metamod" \
-I"../hlsdk-2.3-p4/multiplayer/common" \
-I"../hlsdk-2.3-p4/multiplayer/dlls" \
-I"../hlsdk-2.3-p4/multiplayer/cl_dll" \
-I"../hlsdk-2.3-p4/multiplayer/engine" \
-I"../hlsdk-2.3-p4/multiplayer/pm_shared"
CFLAGS = ${BASEFLAGS} ${OPTFLAGS} ${ARCHFLAG} ${INCLUDES}
CPPFLAGS = -fno-rtti -fno-exceptions ${CFLAGS}
SRC = \
bot.cpp \
bot_client.cpp \
bot_combat.cpp \
bot_job_assessors.cpp \
bot_job_functions.cpp \
bot_job_think.cpp \
bot_navigate.cpp \
bot_start.cpp \
botcam.cpp \
dll.cpp \
engine.cpp \
h_export.cpp \
meta_api.cpp \
sdk_util.cpp \
util.cpp \
version.cpp \
waypoint.cpp
OBJ = $(SRC:%.cpp=%.o)
${TARGET}${DLLEND}: ${OBJ}
${CPP} -o $@ ${OBJ} ${LINKFLAGS}
clean:
rm -f *.o ${TARGET}${DLLEND}
distclean:
rm -f Rules.depend ${TARGET}.dll ${TARGET}.so addons/foxbot/dlls/*
%.o: %.cpp
${CPP} ${CPPFLAGS} -c $< -o $@
%.o: %.c
${CPP} ${CFLAGS} -c $< -o $@
depend: Rules.depend
Rules.depend: Makefile $(SRC)
$(CPP) -MM ${INCLUDES} $(SRC) > $@
include Rules.depend