Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 2.74 KB

CompileAndLink.md

File metadata and controls

80 lines (59 loc) · 2.74 KB

Introduction

Maintaining a system always take a lot of work. One needs to read the documentation and figure out the multiple steps involved. There are many tools involved.

How to pass parameters to change the install path? 32 and 64 bit location

These command are configure related.

autoconf libtoolize aclocal autoheader

autoconf

autoconf generates the configuraition file

M4

M4 is the macro that used to define the make file and directories.

configure

Configure --help

cmake

cmake -DLIB_SUFFIX=64 This defines the library should be saved in /usr/local/lib/lib64.  Default is /usr/local

cross compiling

This lets one to compile software from one platform to another platform. Many embedded systems had limited memory to host a compiler. Therefore, their application need to be built on another platform. See https://en.wikipedia.org/wiki/Cross_compiler for more explanation

make CROSS=x86_64-w64-mingw32-

cross compiling examples.

ccache

Linux SysCalls.

printf SYS_read | gcc -include sys/syscall.h -E - printf SYS_read | gcc -include sys/syscall.h -m32 -E -


### Clang

clang -std=c99 -pedantic -Wall -Wextra -Wno-import -lobjc -framework Foundation
-I MYHEADERSDIR
ALLMYMFILES
-o main


### C/C++ libraries
* http://chenweixiang.github.io/2015/12/18/linux-series-05-libraries.html


####