build: make it easy to compile a Seastar-based project
build: make it easy to compile a Seastar-based project

This patch makes compiling a file "hello.cc" using seastar as simple as:

g++ `pkg-config --cflags --libs build/release/seastar.pc` hello.cc

Our current build system makes it very hard for users to build a project
*using* Seastar - basically requiring them to integrate their project into
the Seastar tree and its Makefile into our "ninja" framework.

This patch simplifies things considerably by doing two things:

First it builds an archive of all Seastar objects - build/$mode/libseastar.a.

But this in itself is not enough - the user wouldn't know how to use it
(currently, -Wl,--whole-archive is needed, unfortunately, because of reliance
of C++ static constructors), and will also need a long list of other
libraries, as wall as various definitions and include paths during compilation.

The solution is to use pkg-config, which has become the de-facto standard
method on Linux for makefiles to figure out how to compile with a certain
library. With this patch, someone can do this for example, to compile
tests/fileiotests.cc:

g++ `pkg-config --cflags --libs build/release/seastar.pc` tests/fileiotest.cc

Note how we have a different ".pc" file for each mode, with the appropriate
compile and link flags. A more eleborate example with separate compile and
link stages will use "pkg-config --cflags" on the compilation stage, and
"--libs" on the linking stage.

Eventually, we should have a "ninja install", which will install libseastar.a
and seastar.pc to their system-wide default location, and then the above
command line will become as simple as:

g++ `pkg-config --cflags --libs seastar` tests/fileiotest.cc

Signed-off-by: Nadav Har'El <625169824b719df98706d88646d0aae6f368ae4d@cloudius-systems.com>

acbellini/seastar,xtao/seastar,asias/scylla,guiquanz/scylla,dreamsxin/seastar,anzihenry/seastar,anzihenry/seastar,norcimo5/seastar,justintung/scylla,kjniemi/seastar,joerg84/seastar,rentongzhang/scylla,senseb/scylla,senseb/scylla,printedheart/seastar,acbellini/scylla,gwicke/scylla,wildinto/scylla,chunshengster/seastar,leejir/seastar,dwdm/seastar,koolhazz/seastar,syuu1228/seastar,ducthangho/imdb,cloudius-systems/seastar,hongliangzhao/seastar,mixja/seastar,raphaelsc/scylla,scylladb/scylla-seastar,wildinto/seastar,stamhe/seastar,scylladb/scylla-seastar,respu/scylla,tempbottle/scylla,sjperkins/seastar,scylladb/scylla-seastar,scylladb/seastar,jonathanleang/seastar,jonathanleang/seastar,tempbottle/seastar,syuu1228/seastar,victorbriz/scylla,dreamsxin/seastar,xtao/seastar,shyamalschandra/seastar,capturePointer/scylla,scylladb/scylla,duarten/scylla,ducthangho/imdb,avikivity/scylla,shyamalschandra/seastar,phonkee/scylla,eklitzke/scylla,avikivity/scylla,kangkot/scylla,bzero/seastar,cloudius-systems/seastar,asias/scylla,dwdm/scylla,eklitzke/scylla,linearregression/seastar,guiquanz/scylla,wildinto/seastar,bzero/seastar,hongliangzhao/seastar,dreamsxin/seastar,linearregression/scylla,xtao/seastar,kjniemi/seastar,stamhe/seastar,phonkee/scylla,linearregression/scylla,wildinto/scylla,avikivity/scylla,koolhazz/seastar,syuu1228/seastar,jonathanleang/seastar,scylladb/scylla,stamhe/seastar,gwicke/scylla,kangkot/scylla,rentongzhang/scylla,mixja/seastar,tempbottle/seastar,bowlofstew/seastar,tempbottle/scylla,justintung/scylla,chunshengster/seastar,scylladb/scylla,victorbriz/scylla,dwdm/seastar,avikivity/seastar,respu/scylla,anzihenry/seastar,respu/scylla,raphaelsc/scylla,flashbuckets/seastar,kjniemi/scylla,dwdm/seastar,kjniemi/scylla,kjniemi/seastar,gwicke/scylla,leejir/seastar,shyamalschandra/seastar,asias/scylla,aruanruan/scylla,capturePointer/scylla,joerg84/seastar,linearregression/scylla,raphaelsc/scylla,justintung/scylla,dwdm/scylla,mixja/seastar,linearregression/seastar,cloudius-systems/seastar,wildinto/seastar,scylladb/scylla,wildinto/scylla,sjperkins/seastar,shaunstanislaus/scylla,bowlofstew/scylla,koolhazz/seastar,shaunstanislaus/scylla,avikivity/seastar,ducthangho/imdb,scylladb/seastar,norcimo5/seastar,eklitzke/scylla,scylladb/seastar,rluta/scylla,kangkot/scylla,bowlofstew/scylla,stamhe/scylla,guiquanz/scylla,glommer/scylla,acbellini/seastar,bowlofstew/seastar,acbellini/scylla,bowlofstew/scylla,rentongzhang/scylla,bzero/seastar,acbellini/seastar,dwdm/scylla,norcimo5/seastar,aruanruan/scylla,joerg84/seastar,hongliangzhao/seastar,avikivity/seastar,phonkee/scylla,tempbottle/seastar,printedheart/seastar,senseb/scylla,chunshengster/seastar,stamhe/scylla,printedheart/seastar,acbellini/scylla,shaunstanislaus/scylla,kjniemi/scylla,sjperkins/seastar,rluta/scylla,tempbottle/scylla,duarten/scylla,victorbriz/scylla,aruanruan/scylla,capturePointer/scylla,glommer/scylla,duarten/scylla,bowlofstew/seastar,stamhe/scylla,leejir/seastar,flashbuckets/seastar,linearregression/seastar,flashbuckets/seastar,glommer/scylla,rluta/scylla