How to include Tizen SDK in a .mk file for make command

Original Created Apr 05, 2017 | Regeneration Apr 22, 2026

I'm developing using a .mk file with the Linux make command. My .mk file contains the following configuration:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := $(CONFIG_MODULE_...)

LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/src \
    ...

LOCAL_SRC_FILES := \
    $(wildcard $(CONFIG_DIR)/*.c)

LOCAL_CFLAGS := \
    $(CONFIG_LOCAL_EXPORT_CFLAGS) \
    $(CONFIG_COVERAGE_CFLAGS)

include $(BUILD_STATIC_LIBRARY)

One of my header files includes #include <tizen_error.h>. When I run the make command, I get the error:

...h:24:25: fatal error: tizen_error.h: No such file or directory

The command works fine with dummy files when I remove this include. How can I properly add the Tizen library or SDK to my .mk configuration to resolve this dependency?

Problem Understanding

The error occurs because the build system cannot find the Tizen SDK headers, specifically tizen_error.h. This is a common issue when building Tizen applications outside of the standard Tizen Studio environment.

Solution Methods

  1. Using GBS (Git Build System)

    • Install GBS if you haven't already
    • Create a GBS build root:
      gbs build -A armv7l --include-all
      
    • Copy your project to the GBS root:
      cp -r your_project $HOME/GBS-ROOT/local/BUILD-ROOTS/scratch.armv7l.0/home/
      
    • Enter the chroot environment:
      sudo chroot $HOME/GBS-ROOT/local/BUILD-ROOTS/scratch.armv7l.0
      
    • Navigate to your project and build:
      cd /home/your_project
      make
      
  2. Manual SDK Path Configuration

    • Add the Tizen SDK include paths to your LOCAL_C_INCLUDES:
      LOCAL_C_INCLUDES := \
          $(LOCAL_PATH)/src \
          $(TIZEN_SDK_PATH)/include \
          $(TIZEN_SDK_PATH)/include/privilege
      
    • Set TIZEN_SDK_PATH to point to your Tizen SDK installation

Additional Tips

  • For ARM builds, you may need to install additional packages:
    sudo apt-get install qemu binfmt-support qemu-user-static
    
  • Consider using Tizen Studio for development as it handles these dependencies automatically
  • For more information on GBS, refer to the official documentation at Samsung Tizen OS

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.