Use Automake to generate the release of multiple executable files and software packages
Source: Internet
Author: User
Use Automake to generate the release of multiple executable files and software packages-Linux general technology-Linux programming and kernel information. The following is a detailed description. 1. Compile configure using autoscan. after the in file, in the AM_INIT_AUTOMAKE (PACKAGE, VERSION) Statement, PACKAGE is your PACKAGE name. When you use make dist to automatically obtain the software PACKAGE for release, the name specified here. VERSION indicates the VERSION number of the released software package. For example, AM_INIT_AUTOMAKE (hello, 1.0) is called hello-1.0.tar.gz in the software package generated by make dist.
2. When compiling the Makefile. am File
Bin_PROGRAMS is the name of the executable file to be generated. If you need to generate multiple executable files at a time, you need to list each executable file name after it and separate it with spaces. For example, you need to generate two executable programs, server and client, which are written as follows:
Bin_PROGRAMS = server client
Helloworld_SOURCES = helloworld. c
$ Bin_SOURCES indicates the source code required to generate executable files. $ Bin indicates the executable file to be generated.
If multiple source files are associated with them, separate them with spaces. At the same time, to generate multiple executable files, each corresponding executable file must define the corresponding $ bin_SOURCES. For example, to generate two executable files server and client, in addition to the source files server. c and client. c, they are also associated with unp. h, wr. c, respectively, as follows:
Server_SOURCES = server. c unp. h
Client_SOURCES = client. c wr. c
3. Generate the makefile after./configure. Then, execute make to generate two executable files: server and client. If you run the make dist command, this command will package the relevant files into a compressed file named package-version.tar.gz for release as a software package.
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