build.zsh/build/library.zsh
Luka Vandervelden 45fd4e45eb Prevents make from using automated rules when nothing should be done.
- For libraries, at least. It probably should be done in many
	  other places too.
2015-05-15 19:26:50 +02:00

35 lines
692 B
Bash

function library.build {
write -n "${target}: ${target}.so ${target}.a"
write
write "\t@:"
targets+=("${target}.so" "${target}.a")
for i in ${target}.so ${target}.a; do
auto[$i]=true
sources[$i]="${sources[$target]}"
cflags[$i]="-fPIC ${cflags[$target]}"
ldflags[$i]="${ldflags[$target]}"
done
type[${target}.so]=sharedlib
type[${target}.a]=staticlib
}
function library.install {
write "${target}.install: ${target}.so.install ${target}.a.install"
write
}
function library.uninstall {
write "${target}.uninstall: ${target}.so.uninstall ${target}.a.uninstall"
write
}
function library.clean {
write "${target}.clean: ${target}.so.clean ${target}.a.clean"
write
}