diff options
Diffstat (limited to 'mingw.bld')
-rw-r--r-- | mingw.bld | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/mingw.bld b/mingw.bld deleted file mode 100644 index 9ed7af3..0000000 --- a/mingw.bld +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
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 | action "gatscon" | ||
15 | { | ||
16 | build: ["gatscon.exe"]; | ||
17 | } | ||
18 | |||
19 | target 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 | } | ||
29 | target 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 | |||
40 | target "libgatswin.a" | ||
41 | { | ||
42 | input files("src/*.cpp"); | ||
43 | rule "lib"; | ||
44 | CXXFLAGS += "-I. -Ilibbu++"; | ||
45 | } | ||
46 | |||
47 | target "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 | |||
61 | function 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 | |||
74 | rule "lib" | ||
75 | { | ||
76 | input "*.win_o"; | ||
77 | profile "build" | ||
78 | { | ||
79 | execute("wine C:/MinGW/bin/ar.exe cr ${OUTPUT} ${INPUT}"); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | rule "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 | |||
94 | rule "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 | |||