File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
- # Include CS SDK
1
+ # Include CSSDK
2
2
CSSDK = include/cssdk
3
3
4
4
# Include Metamod SDK
@@ -15,10 +15,18 @@ COMPILER = g++
15
15
OBJECTS = *.cpp
16
16
17
17
# Linker Libs
18
- LINKER = -static-libgcc -static-libstdc++
18
+ LINKER =
19
+
20
+ # Compiler version check to static linking
21
+ RES_COMPILER_VERSION := $(shell expr "`$(COMPILER ) -dumpversion`" ">=" "5")
22
+
23
+ # Link static lib if compiler is newer than minimum version
24
+ ifeq "$(RES_COMPILER_VERSION ) " "1"
25
+ LINKER += -static-libstdc++
26
+ endif
19
27
20
28
# C flags
21
- CFLAGS = -std=gnu++11 -g0 -O3 -s -flto -funroll-loops -fno-stack-protector -g -DNDEBUG -Dlinux -D__linux__ -D_GLIBCXX_USE_CXX11_ABI=0 -m32 -msse3 -msse4.1 -shared
29
+ CFLAGS = -std=gnu++11 -pipe - g0 -O3 -s -flto -funroll-loops -fno-stack-protector -g -DNDEBUG -Dlinux -D__linux__ -D_GLIBCXX_USE_CXX11_ABI=0 -m32 -msse3 -msse4.1 -shared
22
30
23
31
# Include directory
24
32
INCLUDE = -I. -I$(CSSDK ) /common -I$(CSSDK ) /dlls -I$(CSSDK ) /engine -I$(CSSDK ) /game_shared -I$(CSSDK ) /pm_shared -I$(CSSDK ) /public -I$(METAMOD )
@@ -35,7 +43,7 @@ $(BIN_DIR)/%.o: %.c
35
43
all :
36
44
mkdir -p $(BIN_DIR )
37
45
38
- $(MAKE) $(NAME)
46
+ $(MAKE) $(NAME) && strip -x $(BIN_DIR)/$(NAME)_mm.so
39
47
40
48
$(NAME ) : $(OBJ_LINUX )
41
49
@@ -48,4 +56,4 @@ default: all
48
56
49
57
clean :
50
58
rm -rf Release/* .o
51
- rm -rf Release/* .so
59
+ rm -rf Release/* .so
You can’t perform that action at this time.
0 commit comments