Resolve issue 28 and issue 29 - add compiler flag variables and SONAME fields.
Credit for the original patch goes to Gianfranco Costamagna (thanks!). Also added a stderr warning if no flags are set at all, as this is almost certainly wrong. git-svn-id: https://cld2.googlecode.com/svn/trunk@194 b252ecd4-b096-bf77-eb8e-91563289f87e
This commit is contained in:
@@ -14,7 +14,20 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
g++ -shared -fPIC -O2 -m64 \
|
||||
if [ -z "${CFLAGS}" -a -z "${CXXFLAGS}" -a -z "${CPPFLAGS}" ]; then
|
||||
echo "Warning: None of CFLAGS, CXXFLAGS or CPPFLAGS is set; you probably should enable some options." 1>&2
|
||||
fi
|
||||
if [ -n "${CFLAGS}" ]; then
|
||||
echo "CFLAGS=${CFLAGS}"
|
||||
fi
|
||||
if [ -n "${CXXFLAGS}" ]; then
|
||||
echo "CXXFLAGS=${CXXFLAGS}"
|
||||
fi
|
||||
if [ -n "${CPPFLAGS}" ]; then
|
||||
echo "CPPFLAGS=${CPPFLAGS}"
|
||||
fi
|
||||
|
||||
g++ $CFLAGS $CPPFLAGS $CXXFLAGS -shared -fPIC \
|
||||
cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc \
|
||||
compact_lang_det_impl.cc debug.cc fixunicodevalue.cc \
|
||||
generated_entities.cc generated_language.cc generated_ulscript.cc \
|
||||
@@ -24,9 +37,9 @@ g++ -shared -fPIC -O2 -m64 \
|
||||
cld_generated_cjk_delta_bi_4.cc generated_distinct_bi_0.cc \
|
||||
cld2_generated_quadchrome_2.cc cld2_generated_deltaoctachrome.cc \
|
||||
cld2_generated_distinctoctachrome.cc cld_generated_score_quad_octa_2.cc \
|
||||
-o libcld2.so
|
||||
-o libcld2.so $LDFLAGS -Wl,-soname=libcld2.so
|
||||
|
||||
g++ -shared -fPIC -O2 -m64 \
|
||||
g++ $CFLAGS $CPPFLAGS $CXXFLAGS -shared -fPIC \
|
||||
cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc \
|
||||
compact_lang_det_impl.cc debug.cc fixunicodevalue.cc \
|
||||
generated_entities.cc generated_language.cc generated_ulscript.cc \
|
||||
@@ -36,5 +49,5 @@ g++ -shared -fPIC -O2 -m64 \
|
||||
cld_generated_cjk_delta_bi_32.cc generated_distinct_bi_0.cc \
|
||||
cld2_generated_quad0122.cc cld2_generated_deltaocta0122.cc \
|
||||
cld2_generated_distinctocta0122.cc cld_generated_score_quad_octa_0122.cc \
|
||||
-o libcld2_full.so
|
||||
-o libcld2_full.so $LDFLAGS -Wl,-soname=libcld2_full.so
|
||||
|
||||
|
Reference in New Issue
Block a user