diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2010-08-14 07:12:29 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2010-08-14 07:12:29 +0000 |
| commit | 1b797548dff7e2475826ba29a71c3f496008988f (patch) | |
| tree | 2a81ee2e8fa2f17fd95410aabbf44533d35a727a /default.bld | |
| download | libgats-1b797548dff7e2475826ba29a71c3f496008988f.tar.gz libgats-1b797548dff7e2475826ba29a71c3f496008988f.tar.bz2 libgats-1b797548dff7e2475826ba29a71c3f496008988f.tar.xz libgats-1b797548dff7e2475826ba29a71c3f496008988f.zip | |
libgats gets it's own repo. The rest of the history is in my misc repo.
Diffstat (limited to 'default.bld')
| -rw-r--r-- | default.bld | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/default.bld b/default.bld new file mode 100644 index 0000000..ae6c61b --- /dev/null +++ b/default.bld | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | |||
| 2 | action "default" | ||
| 3 | { | ||
| 4 | build: [targets("header-links"), "libgats.a"]; | ||
| 5 | } | ||
| 6 | |||
| 7 | action "all" | ||
| 8 | { | ||
| 9 | build: [targets("header-links"), "libgats.a", targets()]; | ||
| 10 | } | ||
| 11 | |||
| 12 | |||
| 13 | CXXFLAGS += "-ggdb -Wall"; | ||
| 14 | |||
| 15 | target files("src/*.h").replace("src/", "gats/") | ||
| 16 | { | ||
| 17 | tag "header-links"; | ||
| 18 | display "symlink"; | ||
| 19 | input OUTPUT.replace("gats/","src/"); | ||
| 20 | profile "build" | ||
| 21 | { | ||
| 22 | execute("ln -s ../${INPUT} ${OUTPUT}"); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | target "libgats.a" | ||
| 27 | { | ||
| 28 | rule "lib"; | ||
| 29 | input files("src/*.cpp"); | ||
| 30 | CXXFLAGS += "-I. -Ilibbu++ -fPIC"; | ||
| 31 | } | ||
| 32 | |||
| 33 | target files("src/tests/*.cpp").replace("src/","").replace(".cpp","") | ||
| 34 | { | ||
| 35 | input "src/${OUTPUT}.cpp"; | ||
| 36 | rule "exe"; | ||
| 37 | tag ["tests", "general tests"]; | ||
| 38 | CXXFLAGS += "-I. -Ilibbu++"; | ||
| 39 | LDFLAGS += "-L. -lgats -Llibbu++ -lbu++"; | ||
| 40 | } | ||
| 41 | |||
| 42 | target files("src/unit/*.unit").replace("src/","").replace(".unit","") | ||
| 43 | { | ||
| 44 | input "src/${OUTPUT}.unit"; | ||
| 45 | rule "exe"; | ||
| 46 | requires "libbu++.a"; | ||
| 47 | tag ["tests", "unit tests"]; | ||
| 48 | CXXFLAGS += "-I."; | ||
| 49 | LDFLAGS += "-L. -lbu++ -lgats"; | ||
| 50 | } | ||
| 51 | |||
| 52 | rule "unit" | ||
| 53 | { | ||
| 54 | input "*.unit"; | ||
| 55 | output INPUT.replace(".unit", ".cpp"); | ||
| 56 | |||
| 57 | profile "build" | ||
| 58 | { | ||
| 59 | execute("../libbu++/mkunit \"${INPUT}\" \"${OUTPUT}\""); | ||
| 60 | } | ||
| 61 | } | ||
| 62 | |||
