aboutsummaryrefslogtreecommitdiff
path: root/mingw.bld
diff options
context:
space:
mode:
Diffstat (limited to 'mingw.bld')
-rw-r--r--mingw.bld80
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
7CXXFLAGS += "-ggdb -W -Wall";
8
9
10action "default"
11{
12 build: [targets("header-links"), "libbu++win.a"];
13}
14
15
16target 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
27target "libbu++win.a"
28{
29 input files("src/*.cpp");
30 rule "lib";
31 CXXFLAGS += "-I. -Isupport/windows";
32}
33
34target "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}
41target "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
49function 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
62rule "lib"
63{
64 input "*.win_o";
65 profile "build"
66 {
67 execute("wine C:/MinGW/bin/ar.exe cr ${OUTPUT} ${INPUT}");
68 }
69}
70
71rule "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}