I am using gradle to build c library
1. Configure library target machines
library {
targetMachines = [
machines.linux.x86_64,
machines.windows.x86, machines.windows.x86_64,
machines.macOS.x86_64
]
}
2. Configure library linkages
library {
linkage = [Linkage.STATIC, Linkage.SHARED]
}
I can't understant the above targetmachines and linkage code. I want to create c library with specific architecture.
Can any one explain what is the purpose of those code ?
CodePudding user response:
The reference you've provided gives a very good documentation of what is needed.
There are 2 types of libraries, static
and shared
, that you can create.
For the linkage
config, you will have to specify the type of library that you would like to create.
The targetMachines
specifies the configuration of the system where your library is expected to be used.
one example here could be
library{
targetMachines= [machines.windows.x86, machines.windows.x86_64]
linkage = [Linkage.STATIC]
}