diff --git a/app/my_first_app/BUILD.gn b/app/my_first_app/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..24941d3340f1ce4539d5b29eda796e9e09b4830d --- /dev/null +++ b/app/my_first_app/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright (c) 2020-2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +static_library("myapp") { + sources = [ "hello_world.c" ] + + include_dirs = [ + "//utils/native/lite/include" + ] +} diff --git a/app/my_first_app/hello_world.c b/app/my_first_app/hello_world.c new file mode 100644 index 0000000000000000000000000000000000000000..8464718a9b37635ca9ce931b376d8577a3acc109 --- /dev/null +++ b/app/my_first_app/hello_world.c @@ -0,0 +1,9 @@ +#include +#include "ohos_init.h" +#include "ohos_types.h" + +void HelloWorld(void) +{ + printf("[DEMO] hello, world!\n"); +} +SYS_RUN(HelloWorld);