From 74dd68ad611d15abf16a65c36a7cfd3f4492930a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 9 Nov 2012 16:25:22 +0000 Subject: Made the repo less libbu++-centric. --- c++-libbu++/mingw.bld | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 c++-libbu++/mingw.bld (limited to 'c++-libbu++/mingw.bld') 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 @@ +/** + * This is the default.bld file for libgats, it pretty much handles everything + * libgats related, kinda' cool, eh? It can completely replace the old build + * and actually does a better job with a number of things. + */ + +CXXFLAGS += "-ggdb -W -Wall"; + +action "default" +{ + build: [targets("header-links"), "libgatswin.a"]; +} + +action "gatscon" +{ + build: ["gatscon.exe"]; +} + +target files("src/*.h").replace("src/", "gats/") +{ + tag "header-links"; + display "symlink"; + input OUTPUT.replace("gats/","src/"); + profile "build" + { + execute("mkdir -p $(dirname ${OUTPUT}); ln -s ../${INPUT} ${OUTPUT}"); + } +} +target files("src/compat/*.h").replace("src/", "gats/") +{ + tag "header-links"; + display "symlink"; + input OUTPUT.replace("gats/","src/"); + profile "build" + { + execute("mkdir -p $(dirname ${OUTPUT}); ln -s ../../${INPUT} ${OUTPUT}"); + } +} + +target "libgatswin.a" +{ + input files("src/*.cpp"); + rule "lib"; + CXXFLAGS += "-I. -Ilibbu++"; +} + +target "gatscon.exe" +{ + rule "winexe"; + tag "exe"; + input files("src/gatscon/*.cpp", "src/gatscon/*.ui", "src/gatscon/*.h", + "tmp/*.cpp"); + + 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"; + + 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"; + + CXXFLAGS += "-ggdb -Itmp"; +} + +function cppToWinObj() +{ + if OBJ_DIR == null then + { + return INPUT.regex("\\.cpp$", ".win_o"); + } + else + { + return OBJ_DIR + "/" + INPUT.fileName().regex("\\.cpp$", ".win_o"); + } + +} + +rule "lib" +{ + input "*.win_o"; + profile "build" + { + execute("wine C:/MinGW/bin/ar.exe cr ${OUTPUT} ${INPUT}"); + } +} + +rule "wincpp" +{ + input "*.cpp"; + output INPUT.cppToWinObj(); + //requires getMakeDeps("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -M ${INPUT}"); + profile "build" + { + execute("wine C:/MinGW/bin/g++.exe ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}", "g++"); + } +} + +rule "winexe" +{ + input "*.win_o"; + profile "build" + { + if DEBUG != "true" then + { + LDFLAGS += "-Wl,-s"; + } + execute("wine C:/MinGW/bin/mingw32-g++.exe -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); + } +} + -- cgit v1.2.3