-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSConstruct
50 lines (38 loc) · 1.81 KB
/
SConstruct
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
# rFactor Remote LCD
# Copyright (C) 2014 Ingo Ruhnke <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
plugin_env = Environment(CXX = "i586-mingw32msvc-c++",
AR = "i586-mingw32msvc-ar",
RANLIB = "i586-mingw32msvc-ranlib",
CXXFLAGS=["-Wall", "-Wconversion"],
SHLIBPREFIX="",
SHLIBSUFFIX=".dll",
CPPPATH="external/InternalsPlugins/Include/",
LIBS=["ws2_32", "shlwapi"])
rfactorlcdPlugin = plugin_env.SharedLibrary("rfactorlcdPlugin", ["src/rfactorlcd.cpp"])
Default(rfactorlcdPlugin)
env = Environment(ENV = os.environ)
sources = Glob("*.py", strings=True) + \
Glob("rfactorlcd/*.py", strings=True) + \
Glob("rfactorlcd/dashlets/*.py", strings=True)
flake_check = env.Command("flake.results", sources,
"python -m flake8.run --max-line-length=120 $SOURCES")
AlwaysBuild(env.Alias("test", [], "python -m unittest discover"))
for i in sources:
Alias("pylint", Command(i + ".pylint", i, "/usr/bin/epylint $SOURCE"))
Default(flake_check)
Alias("all", [flake_check, "pylint", "test", rfactorlcdPlugin])
# EOF #