diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2010-10-20 19:06:05 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2010-10-20 19:06:05 +0000 |
| commit | 811ab29d661266059abc28108d69c9a3e0b0fc88 (patch) | |
| tree | 86e26478713192b399fc0d63994c31c242297715 /mingw.bld | |
| parent | 6ee70dc707ce3e0fb68c651817b8648bfd4f8915 (diff) | |
| download | libgats-811ab29d661266059abc28108d69c9a3e0b0fc88.tar.gz libgats-811ab29d661266059abc28108d69c9a3e0b0fc88.tar.bz2 libgats-811ab29d661266059abc28108d69c9a3e0b0fc88.tar.xz libgats-811ab29d661266059abc28108d69c9a3e0b0fc88.zip | |
It builds on windows.
Diffstat (limited to 'mingw.bld')
| -rw-r--r-- | mingw.bld | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/mingw.bld b/mingw.bld new file mode 100644 index 0000000..dafb73d --- /dev/null +++ b/mingw.bld | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | /** | ||
| 2 | * This is the default.bld file for libgats, it pretty much handles everything | ||
| 3 | * libgats related, kinda' cool, eh? It can completely replace the old build | ||
| 4 | * and actually does a better job with a number of things. | ||
| 5 | */ | ||
| 6 | |||
| 7 | CXXFLAGS += "-ggdb -W -Wall"; | ||
| 8 | |||
| 9 | action "default" | ||
| 10 | { | ||
| 11 | build: [targets("header-links"), "libgatswin.a"]; | ||
| 12 | } | ||
| 13 | |||
| 14 | target files("src/*.h").replace("src/", "gats/") | ||
| 15 | { | ||
| 16 | tag "header-links"; | ||
| 17 | display "symlink"; | ||
| 18 | input OUTPUT.replace("gats/","src/"); | ||
| 19 | profile "build" | ||
| 20 | { | ||
| 21 | execute("mkdir -p $(dirname ${OUTPUT}); ln -s ../${INPUT} ${OUTPUT}"); | ||
| 22 | } | ||
| 23 | } | ||
| 24 | target files("src/compat/*.h").replace("src/", "gats/") | ||
| 25 | { | ||
| 26 | tag "header-links"; | ||
| 27 | display "symlink"; | ||
| 28 | input OUTPUT.replace("gats/","src/"); | ||
| 29 | profile "build" | ||
| 30 | { | ||
| 31 | execute("mkdir -p $(dirname ${OUTPUT}); ln -s ../../${INPUT} ${OUTPUT}"); | ||
| 32 | } | ||
| 33 | } | ||
| 34 | |||
| 35 | target "libgatswin.a" | ||
| 36 | { | ||
| 37 | input files("src/*.cpp"); | ||
| 38 | rule "lib"; | ||
| 39 | CXXFLAGS += "-I. -Ilibbu++"; | ||
| 40 | } | ||
| 41 | |||
| 42 | function cppToWinObj() | ||
| 43 | { | ||
| 44 | if OBJ_DIR == null then | ||
| 45 | { | ||
| 46 | return INPUT.regex("\\.cpp$", ".win_o"); | ||
| 47 | } | ||
| 48 | else | ||
| 49 | { | ||
| 50 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".win_o"); | ||
| 51 | } | ||
| 52 | |||
| 53 | } | ||
| 54 | |||
| 55 | rule "lib" | ||
| 56 | { | ||
| 57 | input "*.win_o"; | ||
| 58 | profile "build" | ||
| 59 | { | ||
| 60 | execute("wine C:/MinGW/bin/ar.exe cr ${OUTPUT} ${INPUT}"); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | rule "wincpp" | ||
| 65 | { | ||
| 66 | input "*.cpp"; | ||
| 67 | output INPUT.cppToWinObj(); | ||
| 68 | //requires getMakeDeps("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -M ${INPUT}"); | ||
| 69 | profile "build" | ||
| 70 | { | ||
| 71 | execute("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}", "g++"); | ||
| 72 | } | ||
| 73 | } | ||
