7 MAKEFLAGS_CXX="-g -O2 -DNDEBUG"
8 MAKEFLAGS_CC="-g -O2 -DNDEBUG"
9 BUILD_TYPE="Relwithdebinfo"
14 if [ -e ./buildvars_mingw.dat ] ; then
15 . ./buildvars_mingw.dat
19 MAKEFLAGS_CXX="${MAKEFLAGS_CXX} -DWINVER=0x501"
20 MAKEFLAGS_CC="${MAKEFLAGS_CC} -DWINVER=0x501"
21 MAKEFLAGS_LIB_CXX="${MAKEFLAGS_LIB_CXX} -DWINVER=0x501"
22 MAKEFLAGS_LIB_CC="${MAKEFLAGS_LIB_CC} -DWINVER=0x501"
25 "Debug" | "DEBUG" | "debug" )
26 CMAKE_FLAGS1="-DCMAKE_BUILD_TYPE:STRING=debug"
27 CMAKE_FLAGS2="-DCMAKE_CXX_FLAGS_DEBUG:STRING"
28 CMAKE_FLAGS3="-DCMAKE_C_FLAGS_DEBUG:STRING"
30 "Release" | "RELEASE" | "release" )
31 CMAKE_FLAGS1="-DCMAKE_BUILD_TYPE:STRING=Release"
32 CMAKE_FLAGS2="-DCMAKE_CXX_FLAGS_RELEASE:STRING"
33 CMAKE_FLAGS3="-DCMAKE_C_FLAGS_RELEASE:STRING"
35 "Relwithdebinfo" | "RELWITHDEBINFO" | "relwithdebinfo" )
36 CMAKE_FLAGS1="-DCMAKE_BUILD_TYPE:STRING=Relwithdebinfo"
37 CMAKE_FLAGS2="-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING"
38 CMAKE_FLAGS3="-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING"
41 echo "Specify BUILD_TYPE in buildvars.dat to Debug, Release, Relwithdebinfo."
46 mkdir -p libCSPgui/build-win32
47 mkdir -p libCSPosd/build-win32
48 cd libCSPgui/build-win32
49 echo ${CMAKE_FLAGS1} ${CMAKE_FLAGS2}
50 ${CMAKE} -G "MinGW Makefiles" \
51 -D CMAKE_C_COMPILER:STRING=${CCMAKE_CC} \
52 -D CMAKE_CXX_COMPILER:STRING=${CCMAKE_CXX} \
54 "${CMAKE_FLAGS2}=${MAKEFLAGS_LIB_CXX}" \
55 "${CMAKE_FLAGS3}=${MAKEFLAGS_LIB_CC}" \
60 ${CMAKE} -D CMAKE_C_COMPILER:STRING=${CCMAKE_CC} \
61 -D CMAKE_CXX_COMPILER:STRING=${CCMAKE_CXX} \
63 "${CMAKE_FLAGS2}=${MAKEFLAGS_LIB_CXX}" \
64 "${CMAKE_FLAGS3}=${MAKEFLAGS_LIB_CC}" \
70 mingw32-make ${MAKEFLAGS_GENERAL} 2>&1 | tee -a ./make.log
74 # cp ./qt/gui/libqt_gui.a ../../bin-win32/
75 # cp ./qt/gui/*.lib ../../bin-win32/
76 # cp ./qt/gui/*.dll ../../bin-win32/
84 cd libCSPosd/build-win32
85 echo ${CMAKE_FLAGS1} ${CMAKE_FLAGS2}
86 ${CMAKE} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_SCRIPT} \
88 "${CMAKE_FLAGS2}=${MAKEFLAGS_LIB_CXX}" \
89 "${CMAKE_FLAGS3}=${MAKEFLAGS_LIB_CC}" \
95 ${CMAKE} ${CMAKE_FLAGS1} \
96 "${CMAKE_FLAGS2}=${MAKEFLAGS_LIB_CXX}" \
97 "${CMAKE_FLAGS3}=${MAKEFLAGS_LIB_CC}" \
104 mingw32-make ${MAKEFLAGS_GENERAL} 2>&1 | tee -a ./make.log
107 # cp ./qt/gui/libqt_gui.a ../../bin-win32/
108 # cp ./qt/gui/*.lib ../../bin-win32/
109 # cp ./qt/gui/*.dll ../../bin-win32/
116 for SRCDATA in $@ ; do\
118 mkdir -p ${SRCDATA}/build
121 echo ${CMAKE_FLAGS1} ${CMAKE_FLAGS2}
122 ${CMAKE} -G "MinGW Makefiles" \
123 -D CMAKE_C_COMPILER:STRING=${CCMAKE_CC} \
124 -D CMAKE_CXX_COMPILER:STRING=${CCMAKE_CXX} \
126 "${CMAKE_FLAGS2}=${MAKEFLAGS_CXX}" \
127 "${CMAKE_FLAGS3}=${MAKEFLAGS_CC}" \
128 ${CMAKE_APPENDFLAG} \
132 ${CMAKE} -D CMAKE_C_COMPILER:STRING=${CCMAKE_CC} \
133 -D CMAKE_CXX_COMPILER:STRING=${CCMAKE_CXX} \
135 "${CMAKE_FLAGS2}=${MAKEFLAGS_CXX}" \
136 "${CMAKE_FLAGS3}=${MAKEFLAGS_CC}" \
137 ${CMAKE_APPENDFLAG} \
143 mingw32-make ${MAKEFLAGS_GENERAL} 2>&1 | tee -a ./make.log
145 0 ) cp ./qt/common/*.exe ../../bin-win32/ ;;
146 # 0 ) sudo make install 2>&1 | tee -a ./make.log ;;
154 cd libCSPgui/build-win32
158 cd libCSPosd/build-win32