execute("mkdir -p tmp"); action "default" { build: [targets("header-links"), "libgats.a"]; } action "all" { build: [targets("header-links"), "libgats.a", targets()]; } action "gatscon" { build: [targets("header-links"), "libgats.a", targets("headers"), "gatscon"]; } CXXFLAGS += "-ggdb -Wall"; target [files("src/*.h").replace("src/", "gats/"), "gats/version.h"] { tag "header-links"; display "symlink"; input OUTPUT.replace("gats/","src/"); profile "build" { execute("ln -s ../${INPUT} ${OUTPUT}"); } } target "src/version.h" { input ".svn"; display "svnver"; profile "build" { execute("echo Revision number: `svnversion`; echo \\#ifndef LIBGATS_VC_ID > ${OUTPUT}; echo \\#define LIBGATS_VC_ID \\\"`svnversion`\\\" >> ${OUTPUT}; echo \\#endif >> ${OUTPUT}"); } } target "libgats.a" { rule "lib"; input files("src/*.cpp"); CXXFLAGS += "-I. -Ilibbu++ -fPIC"; } target files("src/tests/*.cpp").replace("src/","").replace(".cpp","") { input "src/${OUTPUT}.cpp"; rule "exe"; tag ["tests", "general tests"]; CXXFLAGS += "-I. -Ilibbu++"; LDFLAGS += "-L. -lgats -Llibbu++ -lbu++"; } target files("src/unit/*.unit").replace("src/","").replace(".unit","") { input "src/${OUTPUT}.unit"; rule "exe"; requires "libbu++.a"; tag ["tests", "unit tests"]; CXXFLAGS += "-I."; LDFLAGS += "-L. -lgats -lbu++"; } rule "unit" { input "*.unit"; output INPUT.replace(".unit", ".cpp"); profile "build" { execute("../libbu++/mkunit \"${INPUT}\" \"${OUTPUT}\""); } } include "qt4.bld"; QTDIR = "/opt/qt-4"; MOC_DIR = "tmp"; RCC_DIR = "tmp"; UI_DIR = "tmp"; target "gatscon" { input files("src/gatscon/*.h", "src/gatscon/*.cpp", "src/gatscon/*.ui"); rule "exe"; CXXFLAGS += qt_getCXXFLAGS(); LDFLAGS += qt_getLDFLAGS(); CXXFLAGS += "-Isrc/gatscon"; CXXFLAGS += "-I. -Ilibbu++ -Itmp -Ilibzamui/src"; LDFLAGS += "-L. -lgats -Llibbu++ -lbu++ -Llibzamui -lzamui"; }