<commit_before>USE_ASM = No
ARCH = arm
SHAREDLIBSUFFIX = so
GCCVERSION = 4.8
NDKLEVEL = 12
HOSTOS = $(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
HOSTARCH = $(shell uname -m)
ifeq ($(ARCH), arm)
    GCCPATHPREFIX = arm-linux-androideabi
    GCCPREFIX = arm-linux-androideabi
    CFLAGS += -march=armv7-a -mfloat-abi=softfp
ifeq (Yes, $(HAVE_NEON))
    CFLAGS += -mfpu=neon
endif
    LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8
    APP_ABI = armeabi-v7a
else
    GCCPATHPREFIX = x86
    GCCPREFIX = i686-linux-android
    APP_ABI = x86
ifeq (Yes, $(USE_ASM))
    ASM = nasm
    CFLAGS += -DX86_ASM
    ASMFLAGS += -DNOPREFIX -f elf32 -DX86_32
endif
endif

ifndef NDKROOT
$(error NDKROOT is not set)
endif
ifndef TARGET
$(error TARGET is not set)
endif

SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH)
CXX = $(NDKROOT)/toolchains/$(GCCPATHPREFIX)-$(GCCVERSION)/prebuilt/$(HOSTOS)-$(HOSTARCH)/bin/$(GCCPREFIX)-g++
CFLAGS += -DLINUX -fpic --sysroot=$(SYSROOT) -fno-rtti -fno-exceptions
LDFLAGS += --sysroot=$(SYSROOT) -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-soname,libwels.so


binaries : decdemo encdemo

decdemo: libraries
	cd ./codec/build/android/dec/jni && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && cd .. && android update project -t $(TARGET) -p . && ant debug && cd ../../../..

encdemo: libraries
	cd ./codec/build/android/enc/jni && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && cd .. && android update project -t $(TARGET) -p . && ant debug && cd ../../../..<commit_msg>Run ndk-build from the android project top level directory<commit_after>USE_ASM = No
ARCH = arm
SHAREDLIBSUFFIX = so
GCCVERSION = 4.8
NDKLEVEL = 12
HOSTOS = $(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
HOSTARCH = $(shell uname -m)
ifeq ($(ARCH), arm)
    GCCPATHPREFIX = arm-linux-androideabi
    GCCPREFIX = arm-linux-androideabi
    CFLAGS += -march=armv7-a -mfloat-abi=softfp
ifeq (Yes, $(HAVE_NEON))
    CFLAGS += -mfpu=neon
endif
    LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8
    APP_ABI = armeabi-v7a
else
    GCCPATHPREFIX = x86
    GCCPREFIX = i686-linux-android
    APP_ABI = x86
ifeq (Yes, $(USE_ASM))
    ASM = nasm
    CFLAGS += -DX86_ASM
    ASMFLAGS += -DNOPREFIX -f elf32 -DX86_32
endif
endif

ifndef NDKROOT
$(error NDKROOT is not set)
endif
ifndef TARGET
$(error TARGET is not set)
endif

SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH)
CXX = $(NDKROOT)/toolchains/$(GCCPATHPREFIX)-$(GCCVERSION)/prebuilt/$(HOSTOS)-$(HOSTARCH)/bin/$(GCCPREFIX)-g++
CFLAGS += -DLINUX -fpic --sysroot=$(SYSROOT) -fno-rtti -fno-exceptions
LDFLAGS += --sysroot=$(SYSROOT) -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-soname,libwels.so


binaries : decdemo encdemo

decdemo: libraries
	cd ./codec/build/android/dec && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug

encdemo: libraries
	cd ./codec/build/android/enc && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
{'fraction_non_alphanumeric': 0.17395593554751726, 'fraction_numerical': 0.015126603091088459, 'mean_word_length': 3.5267857142857144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4790791', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1185, 'n_words': 274}