Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (41 sloc) 1.77 KB
ver = 0.0.1
major = 0
name = stackonfigure
rule cxx
command = clang++ -c -g -fPIC -Wall -Wextra -Fall -Fextra -pedantic -Iheaders -Iheaders/stackonfigure -o$out $in -std=c++0x
rule link
command = clang++ -shared -o$out $in -Wl,-soname,$soname -Wl,-z,now -fstack-protector
rule ln
command = ln -sf $in $out
bd = ./build
sd = ./src
build $bd/value.o: cxx $sd/value.cc
build $bd/config.o: cxx $sd/config.cc
build lib$name.so.$ver: link $bd/value.o $bd/config.o
soname = lib$name.so.$major
build lib$name.so.$major: ln lib$name.so.$ver
build lib$name.so: ln lib$name.so.$ver
packfiles = stackonfigure/headers stackonfigure/src stackonfigure/stackonfigure.pc stackonfigure/build.ninja stackonfigure/LICENSE
packname = $name.$ver.tar.gz
rule pack
command = tar -C .. -cf `pwd`/$packname --gzip $packfiles
build $packname: pack | lib$name.so lib$name.so.$major
build pack: phony $packname
incdir = /usr/include/stackonfigure
rule n_install
command = if [ ! -d $incdir ] ; then mkdir $incdir ; fi ; install headers/stackonfigure/*.hh -C $incdir
rule n_install_lib
command = install lib$name* -C /usr/lib ; install stackonfigure.pc -C /usr/lib/pkgconfig/
rule n_install_lib64
command = install lib$name* -C /usr/lib64 ; install stackonfigure.pc -C /usr/lib64/pkgconfig
rule n_install_warn
command = echo "Please use install_lib64 on x64 systems with /usr/lib64 folder, otherwise please use install_lib"
rule n_links
command = if [ ! -e lib$name.so ] ; then ln $lname -s lib$name.so ; fi
build install: n_install_warn
build _install: n_install | lib$name.so lib$name.so.$major
build links: n_links
build install_lib64: n_install_lib64 links _install
build install_lib: n_install_lib links _install
build all: phony lib$name.so lib$name.so.$major
default all
Something went wrong with that request. Please try again.