diff options
| author | David <david@xagasoft.com> | 2010-02-04 21:37:00 +0000 |
|---|---|---|
| committer | David <david@xagasoft.com> | 2010-02-04 21:37:00 +0000 |
| commit | 1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b (patch) | |
| tree | bd4236dd6ffb7e7ca19eb3611e3c57e8f1ef924e /mingw.bld | |
| parent | 81b7d806028bd484e2765cbc57b9677544bf52b2 (diff) | |
| download | libbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.tar.gz libbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.tar.bz2 libbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.tar.xz libbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.zip | |
david - Made a build-M3 file for building to windows (mingw). This one actually builds *.cpp, yay!... Although i took out Process, Plugger, and Regex... to be re-added later... also had to stubify a few more functions when compiling on WIN32.
Diffstat (limited to 'mingw.bld')
| -rw-r--r-- | mingw.bld | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/mingw.bld b/mingw.bld new file mode 100644 index 0000000..61dbeaf --- /dev/null +++ b/mingw.bld | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /** | ||
| 2 | * This is the default.bld file for libbu++, it pretty much handles everything | ||
| 3 | * libbu++ 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 | |||
| 10 | action "default" | ||
| 11 | { | ||
| 12 | build: [targets("header-links"), "libbu++win.a"]; | ||
| 13 | } | ||
| 14 | |||
| 15 | |||
| 16 | target files("src/*.h").replace("src/", "bu/") | ||
| 17 | { | ||
| 18 | tag "header-links"; | ||
| 19 | display "symlink"; | ||
| 20 | input OUTPUT.replace("bu/","src/"); | ||
| 21 | profile "build" | ||
| 22 | { | ||
| 23 | execute("ln -s ../${INPUT} ${OUTPUT}"); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | target "libbu++win.a" | ||
| 28 | { | ||
| 29 | input files("src/*.cpp"); | ||
| 30 | rule "lib"; | ||
| 31 | CXXFLAGS += "-I. -Isupport/windows"; | ||
| 32 | } | ||
| 33 | |||
| 34 | target "src/process.win_o" | ||
| 35 | { | ||
| 36 | profile "build" | ||
| 37 | { | ||
| 38 | execute("rm -f src/process.win_o && touch src/process.win_o && echo NOT BUILDING PROCESS RIGHT NOW!!!"); | ||
| 39 | } | ||
| 40 | } | ||
| 41 | target "src/regex.win_o" | ||
| 42 | { | ||
| 43 | profile "build" | ||
| 44 | { | ||
| 45 | execute("rm -f src/regex.win_o && touch src/regex.win_o && echo NOT BUILDING REGEX RIGHT NOW!!!"); | ||
| 46 | } | ||
| 47 | } | ||
| 48 | |||
| 49 | function cppToWinObj() | ||
| 50 | { | ||
| 51 | if OBJ_DIR == null then | ||
| 52 | { | ||
| 53 | return INPUT.regex("\\.cpp$", ".win_o"); | ||
| 54 | } | ||
| 55 | else | ||
| 56 | { | ||
| 57 | return OBJ_DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".win_o"); | ||
| 58 | } | ||
| 59 | |||
| 60 | } | ||
| 61 | |||
| 62 | rule "lib" | ||
| 63 | { | ||
| 64 | input "*.win_o"; | ||
| 65 | profile "build" | ||
| 66 | { | ||
| 67 | execute("wine C:/MinGW/bin/ar.exe cr ${OUTPUT} ${INPUT}"); | ||
| 68 | } | ||
| 69 | } | ||
| 70 | |||
| 71 | rule "wincpp" | ||
| 72 | { | ||
| 73 | input "*.cpp"; | ||
| 74 | output INPUT.cppToWinObj(); | ||
| 75 | //requires getMakeDeps("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -M ${INPUT}"); | ||
| 76 | profile "build" | ||
| 77 | { | ||
| 78 | execute("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}", "g++"); | ||
| 79 | } | ||
| 80 | } | ||
