How to build app using WRLinux SDK
1. Prepare sdk
===============
In $PRJ directory, execute
# make export-sdk
then ensure that wrlinux-8.0.0.24-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh is generated in $PRJ/export.
Copy the sdk to a work directory and extract the sdk.
# cp $PRJ/export/wrlinux-8.0.0.24-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh /path-to-work-dir
# cd /path-to-work-dir
# ./wrlinux-8.0.0.24-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh
Setup the buid env
# source ./env.sh
2. An example for building app
==============================
a. Create a directory to create app source.
b. Generate a C file in the app source as below:
/* hello.c */
#include
int main(int argc, char *argv[])
{
printf("Hello world!\n");
return 0;
}
c. Generate a Makefile in the app source as below:
#Makefile for app
all:hello
hello: hello.c
$(CC) -o $@ $^
clean:
rm -rf hello
d. Build the app
# make
then the 'hello' is generated.
阅读(1048) | 评论(0) | 转发(0) |