CentOS System make install installer package case

Source: Internet
Author: User
Tags centos


Ready to write a C file

1, ws.h "header file, declare function name, not implemented"
2, wso.c "contains function body, implement function, need to compile into dynamic link library"
3, ws.h "main program execution document"

New Makefile File

Toucu Makefile Establish makefile file
VI Makefile Editor makefile,
Code to write make command in makefile

NEWWS:WS.C libme.so
Gcc-l./L Me ws.c-o newws
Libme.so:ws.c
gcc-shared Wso.c-o libme.so
Install
CP./libme.so/lib64
Ldconfig

Command resolution: 1, Makefile format the resulting file Newws dependent on Shenyi.c libme.so 2, gcc build compile File command-L./current directory-l MEWSO.C generate final NEWWS 3, libme.so dependent on W S.C 4, build the compiled file. So command (WS.C into libme.so) 5, make install installation

5.1, copy the compiled files into the core library
5.2. Update cache

Related Article

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.