File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,14 @@ INCLUDEDIR=include
3939STATIC_MODE=false
4040DEPSDIR=deps
4141BOTANDIR=
42+ MAKE=mingw32-make
43+ if which make > /dev/null
44+ then
45+ MAKE=make
46+ elif which mingw32-make > /dev/null
47+ then
48+ MAKE=mingw32-make
49+ fi
4250
4351while [[ $# > 0 ]]
4452do
@@ -107,7 +115,6 @@ DEPSDIR=$DEPSDIR
107115BOTANDIR=$BOTANDIR
108116EOM
109117
110-
111118cat > build/libencryptmsg.pc << EOM
112119prefix=$PREFIX
113120libdir=$PREFIX /$LIBDIR
@@ -121,31 +128,32 @@ Libs: -L\${libdir} -lencryptmsg
121128Cflags: -I\$ {includedir}
122129EOM
123130
124- if [[ $DEBUG_MODE != true ]]; then
125- RELEASE=on
126- fi
127-
128- if [[ $STATIC_MODE == true ]]; then
129- pushd src > /dev/null
130-
131- SUBDIR=$( cat << EOM | make -s --no-print-directory -f -
131+ cat > build/get_platform.mak << EOM
132132RELEASE=$RELEASE
133133include ${DEPSDIR} /makefiles/platform.mak
134134all:
135135 @echo \$ (SUBDIR)
136136EOM
137- )
138137
139- LIBRARIES= $( cat << EOM | make -s --no-print-directory -f -
138+ cat > build/get_libraries.mak << EOM
140139.DEFAULT_GOAL := default
141140RELEASE=$RELEASE
142141include ./Makefile
143142default::
144143 @echo \$ (LIBRARIES)
145144EOM
146- )
145+
146+ if [[ $DEBUG_MODE != true ]]; then
147+ RELEASE=on
148+ fi
149+
150+ if [[ $STATIC_MODE == true ]]; then
151+ SUBDIR=$( $MAKE -s --no-print-directory -f build/get_platform.mak)
152+ LIBRARIES=$( $MAKE -s --no-print-directory -f build/get_libraries.mak)
147153 LIBRARIES+=" ."
148154
155+ pushd src > /dev/null
156+
149157 for L in $LIBRARIES
150158 do
151159 LIB=$L
You can’t perform that action at this time.
0 commit comments