Centos make install package installation case
Prepare the written c file
1. ws. h [header file, declare function name, not implemented] 2. wso. c [contains the function body. To implement the function, you need to compile it into a dynamic link library.] 3. ws. h [main program execution file]
Create makefile
Toucu makefile create makefile vi makefile edit makefile,
Code that can be executed by the make command in makefile
Newws: ws. c libme. so gcc-L. /-l me ws. c-o newwslibme. so: ws. c gcc-shared wso. c-o libme. soinstall: cp. /libme. so/lib64 ldconfig
Command Parsing: 1. The final file newws in makefile format depends on shenyi. c libme. so 2. gcc command to generate the compilation file-L. /current directory-l mewso. c generates the final newws 3 and libme. so depends on ws. c 4. Generate the compilation file. so command (ws. c is changed to libme. so) 5. install make install
5.1 merge the compiled files into the core library 5.2 and update the cache