-
Notifications
You must be signed in to change notification settings - Fork 2
Tutorials
Contents
Getting ndr-build-env
Can put it where I want?
Write your Makefile
How does it work?
More examples?
The simplest way to get ndr-build-env is downloading the latest release. Download an 'ndr-build-env' compressed file; then just extract it in your project root directory!
You can also use git-submodule to get ndr-build-env.
Unfortunately, No :(
You must put it in your project root directory.
Technically, it must be in directory where execute 'make' on
Let's start with a Makefile configuration. Say you will use ndr-build-env to build a project named 'SampleProj'.
If you want to execute 'make' from '/src', you must write a '/src/Makefile' like below.
PROJECT_NAME = SampleProj
# TODO: add your handling variables here
include $(CURDIR)/ndr-build-env/ndr.mkroot.mk
And then, add components what you need.
Here is an example case.
[Project Information]
Project Name : Example_1
Project type : Console Application
[Directory Structure]
TestProject
|--- test
| |--- test.c
| |--- test.h
| |--- Makefile
|--- core
| |--- main.c
| |--- Makefile
|--- Makefile
|--- ndr-build-env
[Dependency Graph]
int main (main.c : Entry)
|---> int test_function (test.h : Declare)
|---> int test_function (test.c : Define)
In this case, write your Makefiles like this.
PROJECT_NAME = Example_1
RDIRS += test
RDIRS += core
include $(CURDIR)/ndr-build-env/ndr.mkroot.mk
OBJ = obj_test
HDRS += test.h
SRCS += test.c
include $(NBE_DIR)/ndr.obj.mk
APP = Example_1
EXTOBJS += obj_test
SRCS += main.c
include $(NBE_DIR)/ndr.app.mk
This sample project will produce a executable file in 'TestProject/native/bin/' as console application named 'Example_1' after 'make' complete.
This section is a Work in Progress :)
Reference here