Skip to content

Add new module

lex edited this page Mar 19, 2017 · 1 revision
  1. Create directory with name like you module in /source (/source/<YOUR_MODULE_NAME>)
  2. In created directory create Makefile.mk with content:
# List of directories for search source files (*.c)
# for example:
# . -- /source/<YOUR_MODULE_NAME>/
# utils -- /source/<YOUR_MODULE_NAME>/utils/
<YOUR_MODULE_NAME>_dirs := .
<YOUR_MODULE_NAME>_objs := $(call MODEST_UTILS_OBJS,<YOUR_MODULE_NAME>,$(<YOUR_MODULE_NAME>_dirs))

<YOUR_MODULE_NAME>_all: $(<YOUR_MODULE_NAME>_objs)

<YOUR_MODULE_NAME>_clean: 
	rm -f $(<YOUR_MODULE_NAME>_objs)

<YOUR_MODULE_NAME>_clone: 
	$(call MODEST_UTILS_HDRS_CLONE,<YOUR_MODULE_NAME>,$(<YOUR_MODULE_NAME>_dirs))

Change all <YOUR_MODULE_NAME> to your module name, it must be match by created directory name in /source

  1. Done

Your module be included in the library. See /source/myhtml/Makefile.mk, for example.

In order to header (*.h) files can be include to base API (/include directory) and must be installed after use command make install you must run command make clone in root directory of project (/) after added your module.

Clone this wiki locally