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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
--[[
usage example:
premake4 gmake && make config=release server
only works with Linux for now
]]
local paths = {
--root = path.getabsolute("../../"), -- root openparsec folder
--premakefolder = path.getabsolute(""),
root = "../../",
premakefolder = "./"
}
paths.parsecroot = path.join(paths.root, "parsec_root")
local srcpaths = {
libraries = "../../src/libraries",
libparsec = "../../src/libparsec",
parsec = "../../src/parsec",
parsecserver = "../../src/parsec_server",
}
solution "ParsecSolution"
language "C++"
platforms { "x32" }
includedirs { srcpaths.libraries }
configurations { "Debug", "Release" }
configuration "Debug"
defines { "DEBUG" }
flags "Symbols"
configuration "Release"
flags "Optimize"
configuration "linux"
includedirs { "/usr/include", "/usr/local/include", "/opt/include" }
project "client"
kind "WindowedApp"
location "build/client"
targetdir "build/client"
targetname "Parsec"
defines { "PARSEC_CLIENT" }
includedirs {
srcpaths.libparsec.."/include",
srcpaths.parsec.."/include",
}
files {
srcpaths.libraries.."/**",
srcpaths.libparsec.."/**",
srcpaths.parsec.."/**",
}
configuration "not windows"
-- These are apparently windows thingies
excludes { srcpaths.parsec.."/**.rc" }
configuration "linux"
targetname "parsec"
links { "SDL", "SDL_mixer", "GL" }
postbuildcommands {
--("cp parsec %q"):format(paths.parsecroot.."/client/"),
"cp parsec ../../../../parsec_root/client/"
}
project "server"
kind "ConsoleApp"
location "build/server"
targetdir "build/server"
targetname "parsec_server"
defines { "PARSEC_SERVER" }
includedirs {
srcpaths.libparsec.."/include",
srcpaths.parsecserver.."/include",
}
files {
srcpaths.libparsec.."/**",
srcpaths.parsecserver.."/**",
}
configuration "linux"
links { "ncurses" }
postbuildcommands {
--("cp parsec_server %q"):format(paths.parsecroot.."/server/"),
"cp parsec_server ../../../../parsec_root/server/"
}
|