aboutsummaryrefslogtreecommitdiff
path: root/c++-libbu++/mingw.bld
diff options
context:
space:
mode:
Diffstat (limited to 'c++-libbu++/mingw.bld')
-rw-r--r--c++-libbu++/mingw.bld106
1 files changed, 106 insertions, 0 deletions
diff --git a/c++-libbu++/mingw.bld b/c++-libbu++/mingw.bld
new file mode 100644
index 0000000..9ed7af3
--- /dev/null
+++ b/c++-libbu++/mingw.bld
@@ -0,0 +1,106 @@
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
7CXXFLAGS += "-ggdb -W -Wall";
8
9action "default"
10{
11 build: [targets("header-links"), "libgatswin.a"];
12}
13
14action "gatscon"
15{
16 build: ["gatscon.exe"];
17}
18
19target files("src/*.h").replace("src/", "gats/")
20{
21 tag "header-links";
22 display "symlink";
23 input OUTPUT.replace("gats/","src/");
24 profile "build"
25 {
26 execute("mkdir -p $(dirname ${OUTPUT}); ln -s ../${INPUT} ${OUTPUT}");
27 }
28}
29target files("src/compat/*.h").replace("src/", "gats/")
30{
31 tag "header-links";
32 display "symlink";
33 input OUTPUT.replace("gats/","src/");
34 profile "build"
35 {
36 execute("mkdir -p $(dirname ${OUTPUT}); ln -s ../../${INPUT} ${OUTPUT}");
37 }
38}
39
40target "libgatswin.a"
41{
42 input files("src/*.cpp");
43 rule "lib";
44 CXXFLAGS += "-I. -Ilibbu++";
45}
46
47target "gatscon.exe"
48{
49 rule "winexe";
50 tag "exe";
51 input files("src/gatscon/*.cpp", "src/gatscon/*.ui", "src/gatscon/*.h",
52 "tmp/*.cpp");
53
54 CXXFLAGS += "-O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -IC:/Qt/qt-4/include/QtCore -IC:/Qt/qt-4/include/QtGui -IC:/Qt/qt-4/include/QtSvg -IC:/Qt/qt-4/include -IC:/Qt/qt-4/mkspecs/default -Ilibbu++ -Isrc/gatscon -I. -Ilibzamui/src";
55
56 LDFLAGS += "-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -LC:/Qt/qt-4/lib -Llibbu++ -lgatswin -lbu++win -L. -Llibzamui -lzamuiwin -lmingw32 -lqtmain -lQtGui4 -lQtCore4 -lQtSvg4 -lwsock32";
57
58 CXXFLAGS += "-ggdb -Itmp";
59}
60
61function cppToWinObj()
62{
63 if OBJ_DIR == null then
64 {
65 return INPUT.regex("\\.cpp$", ".win_o");
66 }
67 else
68 {
69 return OBJ_DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".win_o");
70 }
71
72}
73
74rule "lib"
75{
76 input "*.win_o";
77 profile "build"
78 {
79 execute("wine C:/MinGW/bin/ar.exe cr ${OUTPUT} ${INPUT}");
80 }
81}
82
83rule "wincpp"
84{
85 input "*.cpp";
86 output INPUT.cppToWinObj();
87 //requires getMakeDeps("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -M ${INPUT}");
88 profile "build"
89 {
90 execute("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}", "g++");
91 }
92}
93
94rule "winexe"
95{
96 input "*.win_o";
97 profile "build"
98 {
99 if DEBUG != "true" then
100 {
101 LDFLAGS += "-Wl,-s";
102 }
103 execute("wine C:/MinGW/bin/mingw32-g++.exe -o ${OUTPUT} ${INPUT} ${LDFLAGS}");
104 }
105}
106