Linux generates makefile and executables with autoconf series Tools __linux

Source: Internet
Author: User

Go to the Xx.cpp directory and run the shell directive:

dpkg--configure-a
apt-get install autoconf
autoscan
cp configure.scan configure.ac
vim configure.ac

In Configure.ac, you need to add Am_init_automake macros, SEND_RTP is the last generated file name, other than the tube, xx.cpp have one on the line, for example:

Ac_prereq ([2.69])
Ac_init (SEND_RTP, 1.0, dongzy08@163.com)
am_init_automake (send_rtp,1.0)
Ac_config_ Srcdir ([H264Encoder.cpp])
ac_config_headers ([config.h])

# Checks for programs.
Ac_prog_cxx
AC_PROG_CC

In another place, the name of the specified output is makefile

Ac_output (Makefile)

Continue to execute shell directives:

Aclocal
autoconf 
autoheader
vim makefile.am
For makefile.am, you need to edit it as follows:

Automake_options=foreign
BIN_PROGRAMS=SEND_RTP
send_rtp_sources=h264encoder.cpp inttypes.h rtpframe.h H264Encoder.h main.cpp h264frame.cxx h264frame.h
Where Bin_programs is the last generated file name, Send_rtp_sources is all the source file names.

Continue to execute shell directives:

Automake--add-missing
./configure make all
 

The SEND_RTP executable file can be generated at the end.


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.