update c++ complication rules

This commit is contained in:
dian.yuan 2026-01-15 14:38:22 +08:00
parent 3fd719e30d
commit ae39851162
8 changed files with 166 additions and 15 deletions

View file

@ -1,6 +1,6 @@
LOCAL_PATH := $(call my-dir)
LLM_SDK_PATH := $(LOCAL_PATH)/../../01_src
3RDPARTY_PATH := $(LOCAL_PATH)/../../3rdparty
LLM_SDK_PATH := $(LOCAL_PATH)/../../../../amlnn-toolkit/npu_runtime/llmsdk
3RDPARTY_PATH := $(LOCAL_PATH)/../../../dependency
$(warning $(LOCAL_PATH))
include $(CLEAR_VARS)
@ -8,11 +8,10 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := main.cpp
LOCAL_C_INCLUDES := \
$(LLM_SDK_PATH)/jni \
$(3RDPARTY_PATH)/include \
$(LLM_SDK_PATH)/include \
LOCAL_LDFLAGS := \
-L$(LLM_SDK_PATH)/libs/arm64-v8a -lllmsdk
-L$(LLM_SDK_PATH)/android/arm64-v8a -lllmsdk
LOCAL_LDLIBS := -llog -ldl -lm -fuse-ld=ld

View file

@ -0,0 +1,11 @@
#!/bin/bash
if [ ! -d "$NDK_PATH" ]; then
echo "Error: NDK_PATH '$NDK_PATH' not found."
echo "Please set NDK_PATH environment variable to your Android NDK directory."
exit 1
fi
$NDK_PATH/ndk-build \
NDK_PROJECT_PATH=. \
APP_BUILD_SCRIPT=./Android.mk \
NDK_APPLICATION_MK=./Application.mk

View file

@ -63,8 +63,6 @@ int main(int argc, char **argv)
return -1;
}
printf("\nWelcome to Amlogic LLM Demo!\n");
LLMContext context;
AML_LLMInitConfig init_config;
memset(&init_config, 0, sizeof(AML_LLMInitConfig));
@ -90,6 +88,31 @@ int main(int argc, char **argv)
MyUserData my_data;
memset(&my_data, 0, sizeof(MyUserData));
printf("***************************************************\n");
printf("* *\n");
printf("* _____ _ _ _ _____ __ __ *\n");
printf("* | ___|| \\ | | | || _ |\\ \\ / / *\n");
printf("* | |__ | \\| | | || | | | \\ \\_/ / *\n");
printf("* | __| | . ` | | || | | | \\ / *\n");
printf("* | |___ | |\\ |__| || |_| | | | *\n");
printf("* |_____||_| \\_|\\___/ \\___/ |_| *\n");
printf("* *\n");
printf("* _ __ __ _ ____ _____ _____ ____*\n");
printf("* / \\ | \\/ | | / __ \\ / ____|_ _/ ___|*\n");
printf("* / _ \\ | \\ / | | | | | | | __ | || | *\n");
printf("* / ___ \\| |\\/| | | | | | | | |_ | | || | *\n");
printf("* / / \\ \\ | | | |___| |__| | |__| |_| || |___ *\n");
printf("* /_/ \\_\\_| |_|______\\____/ \\_____|_____\\____|*\n");
printf("* *\n");
printf("* _ _ __ __ *\n");
printf("* | | | | | \\/ | *\n");
printf("* | | | | | \\ / | *\n");
printf("* | | | | | |\\/| | *\n");
printf("* | |____| |____| | | | *\n");
printf("* |______|______|_| |_| *\n");
printf("* *\n");
printf("***************************************************\n");
printf("\nType your prompt and press Enter.\n");
printf("Commands: [exit] to quit, [new_talk] to reset context.\n");