2018-11-20 10:44:49 +01:00
|
|
|
|
2020-04-27 03:43:11 +02:00
|
|
|
package=libipc # Package name.
|
2020-07-13 14:12:08 +02:00
|
|
|
version=0.7.0 # Package version.
|
2018-11-20 10:44:49 +01:00
|
|
|
|
2020-04-27 03:43:11 +02:00
|
|
|
# Our targets are the library and its documentation.
|
|
|
|
targets=(libipc man/libipc.7)
|
2019-07-27 15:46:04 +02:00
|
|
|
|
2020-04-27 03:43:11 +02:00
|
|
|
# The libipc target is a library ("for the C language" is implied).
|
|
|
|
# The `library` type automatically adds tho targets:
|
|
|
|
# `target`.so of type `sharedlib`
|
|
|
|
# `target`.a of type `staticlib`
|
2018-11-20 10:44:49 +01:00
|
|
|
type[libipc]=library
|
2020-04-27 03:43:11 +02:00
|
|
|
# Sources are added by default to the tarball.
|
2018-11-20 10:44:49 +01:00
|
|
|
sources[libipc]="$(ls src/*.c)"
|
|
|
|
|
2020-04-27 03:43:11 +02:00
|
|
|
depends[libipc]=$(ls src/*.h)
|
2018-11-20 10:44:49 +01:00
|
|
|
|
2020-04-27 03:43:11 +02:00
|
|
|
# We need to add extra compilation flags.
|
|
|
|
variables+=(CFLAGS "-Wall -Wextra -g")
|
2018-11-20 10:44:49 +01:00
|
|
|
|
2020-04-27 03:43:11 +02:00
|
|
|
# Let's add some CFLAGS, with another syntax.
|
|
|
|
cflags[libipc]="-std=c11"
|
|
|
|
|
|
|
|
# The man/libipc.7 target is a manual generated with `scdoc`.
|
|
|
|
# `scdocman` is one of the many back-ends of build.zsh: https://git.baguette.netlib.re/Baguette/build.zsh
|
|
|
|
type[man/libipc.7]=scdocman
|
2018-11-20 10:44:49 +01:00
|
|
|
|
2020-04-27 03:43:11 +02:00
|
|
|
# Finally, we tell what we want in the tarball, generated with `make dist`.
|
|
|
|
dist=(libipc.so libipc.a) # The library in both shared and static versions.
|
|
|
|
dist+=(man/*.scd man/*.[1-9]) # Manual pages (and sources).
|
|
|
|
dist+=(Makefile project.zsh) # The generated Makefile and this project.zsh.
|