beardsvibe / buildfox

Minimalistic Ninja generator
MIT License
50 stars 8 forks source link

Simpler shared lib algorithm #150

Open jimon opened 8 years ago

jimon commented 8 years ago

Check if possible to link against shared library directly, something like this :

out = build/bin_${variation}
includedirs = test1 test2

# build all
build objects($out/test1/*): auto test1/*.cpp | test1/*.h
    defines += DLL_EXPORT
build shared_library($out/test1) | library($out/test1): auto objects($out/test1/*)

build objects($out/test2/*): auto test2/*.cpp | test2/*.h
    defines += DLL_EXPORT2
build shared_library($out/test2) | library($out/test2): auto objects($out/test2/*)

build objects($out/*): auto *.cpp | *.h
build application($out/app): auto objects($out/*) library($out/*)