Graphical interface support system for real-time embedded systems

Source: Internet
Author: User
The graphic interface of the real-time embedded system supports the system-general Linux technology-Linux programming and kernel information. The following is a detailed description. 1. software maintenance and creation tools in Linux

For Open-Source Free Software, programmers usually get the source code. Many tools and libraries are often involved in the process of compiling the source code and correctly installing and configuring the source code. Therefore, the process is often complicated. MiniGUI is no exception. To demonstrate the correct compilation and Installation Process of MiniGUI, we need to first understand the tools used for software maintenance and establishment in Linux.

   1.1 make and makefile

Make is the most common binary program and function library creation and generation tool in Linux. During the make operation, you must determine the type of binary file to be generated and the corresponding commands Based on the makefile file in the current directory (generally Makefile. We can also establish the dependency between the target and the source code in the makefile file, so that the make tool can automatically determine whether to generate the final target through the intermediate process based on the time. Although makefile can be used to organize a large project, it is not easy to manually compile a makefile file. In addition, when you need to maintain a directory tree of the source code, the maintenance of makefile files will be greatly increased. Therefore, GNU has developed the Autoconfi/Automake tool to automatically generate makefile files and check system configuration information to help provide source code portability.

   1.2 Autoconf/Automake

The GNU Autoconf and Automake software are actually composed of several Shell scripts, which can help programmers easily generate makefile files. Currently, various free software, such as Apache and MySQL, are automatically configured and compiled using Autoconf and Automake. MiniGUI also uses the Autoconf/Automake interface. You only need to use "./configure", "make", and "make install" to compile the program and install it in the system.

To better understand Autoconf and Automake, we need to make a simple review of makefile. Makefile is basically a series of rules composed of "target", "dependency", and "action. Make decides how to compile (compile) and connect (link) programs or other actions according to the rules of makefile files. Of course, make can not only compile and connect programs. For example, in the FreeBSD port collection, Makefile can also automatically download remote programs, extract (extract), patch (patch ), then compile and install it to the system.

Although the basic structure of Makefile is very simple, using these rules can transform many different patterns. Because of this, many people will feel that there are no rules to follow when they first learn to write makefiles. The makefiles written by each person are not the same, and they do not know where to start, in addition, it is often restricted by the development environment. As long as the environment parameters are different or the path is changed, makefile may have to be modified. Although GNU Makefile Conventions (GNU Makefile Convention) has developed some standards and specifications for compiling makefile during GNU program design, its content is very long and complex, in addition, we often make some adjustments. In order to reduce the burden on program developers to maintain makefiles, Automake emerged.

With Automake, programmers only need to write some predefined macros (macro) and submit them to Automake for processing. A Makefile. in file that can be used by Autoconf will be generated. Then, use the automatic configuration file configure generated by Autoconf to generate a Makeifle that complies with the GNU Makefile convention.

Before using Automake, make sure that your system has the following software installed:

GNU Automake

GNU Autoconf

GNU m4

Perl

GNU Libtool (if you need to generate a shared library)

It is best to use the gnu c/C ++ compiler, GNU Make, and other GNU tool programs as the development environment. These tools are all GPL free software, not only free but also powerful. If you are using Red Hat Linux, you can find all the rpm files of the above software.

The Makefile generated by configure has several preset targets for use. Here, we will briefly describe the following.

Make all generates the set targets. You can only press make. At this time, the source code will be compiled, connected, and the execution file will be generated.

Make clean clears the previously compiled executable files and target files (*. o ).

Make distclean clears the Makefile generated by configure in addition to the executable and target files. This command is usually executed before the software is released.

Make install the program to the system. If the source code is compiled successfully and the execution result is correct, you can install the program to the pre-set execution file storage path of the system, if the bin_PROGRAMS macro is used, the program will be installed under/usr/local/bin.

Make dist packs programs and related documents into a compressed document for release. After the execution is complete, a file named package-version.tar.gz will be created under the directory. PACKAGE and VERSION are defined according to AM_INIT_AUTOMAKE (PACKAGE, VERSION) in configure. in.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.