aboutsummaryrefslogtreecommitdiff
path: root/buildMinGW.conf
blob: e61b949731a905700d23f257edbd69d1079cf258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Build config file for libbu++
#
# Copyright (C) 2007-2008 Xagasoft, All rights reserved.
#
# This file is part of the libbu++ library and is released under the
# terms of the license contained in the file LICENSE.

default action: check group "lnhdrs", check "libbu++win.a"
"tests" action: check group "lnhdrs", check group "tests"
"all" action: check group "lnhdrs", check targets()

set "CXXFLAGS" += "-ggdb -Wall -D_POSIX_SOURCE"

filesIn("src") filter regexp("^src/(.*)\\.h$", "bu/{re:1}.h"):
	rule "hln",
	group "lnhdrs",
	target file,
	input "src/{re:1}.h"

"libbu++win.a":
	rule "lib",
	target file,
	set "CXXFLAGS" += "-I. -Isupport/windows",
	#input filesIn("src") filter regexp("^.*\\.cpp$")
	input ["src/array.cpp", "src/list.cpp", "src/exceptionbase.cpp", "src/fbasicstring.cpp", "src/fstring.cpp", "src/file.cpp", "src/set.cpp", "src/hash.cpp", "src/sptr.cpp", "src/tafnode.cpp", "src/tafreader.cpp", "src/tafwriter.cpp", "src/stdstream.cpp", "src/stream.cpp", "src/archive.cpp", "src/archival.cpp", "src/socket.cpp", "src/serversocket.cpp", "src/unitsuite.cpp", "src/win32_compatibility.cpp", "src/membuf.cpp", "src/formatter.cpp", "src/sio.cpp", "src/md5.cpp", "src/cryptohash.cpp", "src/filter.cpp", "src/bzip2.cpp"]

rule "exe":
	matches regexp("(.*)\\.win_o$"),
	aggregate toString(" "),
	perform command("wine c:/MinGW/bin/mingw32-g++.exe -o {target} {match} {LDFLAGS}")

rule "lib":
	matches regexp("(.*)\\.win_o$"),
	aggregate toString(" "),
	perform command("wine c:/MinGW/bin/ar.exe cr {target} {match}")

rule "cpp":
	matches regexp("(.*)\\.cpp$"),
	produces "{re:1}.win_o",
	requires commandToList("wine c:/MinGW/bin/mingw32-g++.exe -M {CXXFLAGS} {match}", "make"),
	perform command("wine c:/MinGW/bin/mingw32-g++.exe {CXXFLAGS} -c -o {target} {match}")

rule "hln":
	matches regexp("src/(.*)\\.h"),
	produces "bu/{re:1}.h",
	perform command("ln -s ../src/{re:1}.h {target}")