@@ -13,31 +13,44 @@ rm -rf ${CLEAN_DEBUG_DIR}
1313mkdir -p ${CLEAN_DIR} /{bin/$PLAT_DIR ,tc2/bin/$PLAT_DIR ,tc2/materials,tc2/cfg,tc2/scripts}
1414mkdir -p ${CLEAN_DEBUG_DIR} /{bin/$PLAT_DIR ,tc2/bin/$PLAT_DIR }
1515
16- declare -a EXES=(
17- tc2_win64
18- bin/$PLAT_DIR /captioncompiler
19- bin/$PLAT_DIR /glview
20- bin/$PLAT_DIR /height2normal
21- bin/$PLAT_DIR /motionmapper
22- bin/$PLAT_DIR /qc_eyes
23- bin/$PLAT_DIR /tgadiff
24- bin/$PLAT_DIR /vbsp
25- bin/$PLAT_DIR /vice
26- bin/$PLAT_DIR /vrad
27- bin/$PLAT_DIR /vtf2tga
28- bin/$PLAT_DIR /vtfdiff
29- bin/$PLAT_DIR /vvis
30- )
31-
3216declare -a DLLS=(
33- bin/$PLAT_DIR /vrad_dll
34- bin/$PLAT_DIR /vvis_dll
3517 tc2/bin/$PLAT_DIR /{client,server}
3618)
3719
38- declare -a DLLS_LIB=(
39- bin/$PLAT_DIR /steam_api64
40- )
20+ if [ $PLATFORM = " win" ]; then
21+ declare -a EXES=(
22+ tc2_win64
23+ bin/$PLAT_DIR /captioncompiler
24+ bin/$PLAT_DIR /glview
25+ bin/$PLAT_DIR /height2normal
26+ bin/$PLAT_DIR /motionmapper
27+ bin/$PLAT_DIR /qc_eyes
28+ bin/$PLAT_DIR /tgadiff
29+ bin/$PLAT_DIR /vbsp
30+ bin/$PLAT_DIR /vice
31+ bin/$PLAT_DIR /vrad
32+ bin/$PLAT_DIR /vtf2tga
33+ bin/$PLAT_DIR /vtfdiff
34+ bin/$PLAT_DIR /vvis
35+ )
36+
37+ DLLS+=(
38+ bin/$PLAT_DIR /vrad_dll
39+ bin/$PLAT_DIR /vvis_dll
40+ )
41+
42+ declare -a DLLS_LIB=(
43+ bin/$PLAT_DIR /steam_api64
44+ )
45+ elif [ $PLATFORM = " linux" ]; then
46+ declare -a EXES=(
47+ tc2_linux64
48+ )
49+
50+ declare -a DLLS_LIB=(
51+ bin/$PLAT_DIR /libsteam_api
52+ )
53+ fi
4154
4255declare -a FILES_REP=(
4356 tc2/cfg/valve.rc
6780for F in " ${DLLS[@]} " ; do
6881 DLL=${F}${DLL_EXT}
6982 cp -f ${DEV_DIR} /${DLL} ${CLEAN_DIR} /${DLL}
70- cp -f ${DEV_DIR} /${F,,} .pdb ${CLEAN_DEBUG_DIR} /${F,,} .pdb
83+ if [ $PLATFORM = " win" ]; then
84+ cp -f ${DEV_DIR} /${F,,} .pdb ${CLEAN_DEBUG_DIR} /${F,,} .pdb
85+ elif [ $PLATFORM = " linux" ]; then
86+ # Linux binaries aren't stripped by the build scripts, so separate the
87+ # debug info and strip them here.
88+ cp -f ${CLEAN_DIR} /${DLL} ${CLEAN_DEBUG_DIR} /${DLL} .dbg
89+ objcopy --add-gnu-debuglink=${CLEAN_DEBUG_DIR} /${DLL} .dbg ${CLEAN_DIR} /${DLL}
90+ strip ${CLEAN_DIR} /${DLL}
91+ fi
7192done
7293
7394for F in " ${DLLS_LIB[@]} " ; do
0 commit comments