Improve build. Compile two versions: with enabled compiler's -ftree-parallelize-loops and disabled
This commit is contained in:
parent
4eac1bc371
commit
9608a09587
@ -1,18 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Clean
|
||||
rm -rf obj/ libs/armeabi-v7a libs/armeabi libs/x86 bin/ gen/ assets/ pak/
|
||||
|
||||
# Regenerate PAK file
|
||||
mkdir -p pak/
|
||||
mkdir -p assets/
|
||||
cp -vr ../3rdparty/extras/* pak/
|
||||
#cp -vr extras_src/CS16Client_vgui_buy_classic/touch/* pak/touch/
|
||||
#cp -vr extras_src/CS16client_vgui_radio/touch/* pak/touch/
|
||||
#cp -vr extras_src/CS16Client_vgui_team_classic/touch/* pak/touch/
|
||||
python2 makepak.py pak/ assets/extras.pak
|
||||
|
||||
ndk-build NDK_TOOLCHAIN_VERSION=4.8 -j5
|
||||
# Build OpenMP version
|
||||
ndk-build NDK_TOOLCHAIN_VERSION=4.8 -j5 _CS16CLIENT_ENABLE_OPENMP=1
|
||||
ant release
|
||||
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../../myks.keystore bin/cs16-client-release-unsigned.apk xashdroid -tsa https://timestamp.geotrust.com/tsa
|
||||
/home/a1ba/.android/android-sdk-linux/build-tools/22.0.1/zipalign 4 bin/cs16-client-release-unsigned.apk bin/cs16-client.apk
|
||||
#adb install -r -f bin/cs16-client-debug.apk
|
||||
mv bin/cs16-client-debug.apk cs16-client-debug-`date +"%d-%m-%y-%H-%M"`.apk
|
||||
mv bin/cs16-client.apk cs16-client-release-omp.apk
|
||||
|
||||
mv bin/cs16-client.apk cs16-client-release-`date +"%d-%m-%y-%H-%M"`.apk
|
||||
# Clean out
|
||||
rm -rf obj/ libs/armeabi-v7a lib/armeabi libs/x86 bin/
|
||||
|
||||
# Build NoOpenMP version
|
||||
ndk-build NDK_TOOLCHAIN_VERSION=4.8 -j5 _CS16CLIENT_ENABLE_OPENMP=0
|
||||
ant release
|
||||
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../../myks.keystore bin/cs16-client-release-unsigned.apk xashdroid -tsa https://timestamp.geotrust.com/tsa
|
||||
/home/a1ba/.android/android-sdk-linux/build-tools/22.0.1/zipalign 4 bin/cs16-client-release-unsigned.apk bin/cs16-client.apk
|
||||
mv bin/cs16-client.apk cs16-client-release-noomp.apk
|
||||
|
@ -1,6 +1,11 @@
|
||||
#LOCAL_LDFLAGS += -fopenmp
|
||||
#LOCAL_CFLAGS += -ftree-parallelize-loops=4 -fopenmp
|
||||
|
||||
ifeq ($(_CS16CLIENT_ENABLE_OPENMP), 1)
|
||||
LOCAL_LDFLAGS += -fopenmp
|
||||
LOCAL_CFLAGS += -ftree-parallelize-loops=4 -fopenmp
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += $(CFLAGS_OPT)
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard)
|
||||
LOCAL_CFLAGS += $(CFLAGS_OPT_ARM) $(CFLAGS_HARDFP)
|
||||
|
Loading…
Reference in New Issue
Block a user