Remove config system
It was an interesting idea, but it really wasn't being used for anything. I'll stop trying to copy Kbuild now...
This commit is contained in:
parent
868898ec07
commit
c06106bff8
19
Sconstruct
19
Sconstruct
|
@ -1,21 +1,14 @@
|
||||||
MAJOR = 5
|
MAJOR = 5
|
||||||
MINOR = 3
|
MINOR = 3
|
||||||
BUG = 0
|
BUG = 0
|
||||||
|
EXTRA = ""
|
||||||
CONFIG={"FLAGS":[]}
|
DEBUG = True
|
||||||
def read_config():
|
|
||||||
for line in open("config"):
|
|
||||||
(key, value) = line.strip().split("=")
|
|
||||||
CONFIG[key] = value
|
|
||||||
if value == "y":
|
|
||||||
CONFIG["FLAGS"] += ["-D"+key]
|
|
||||||
read_config()
|
|
||||||
|
|
||||||
FLAGS = ["-O2"]
|
FLAGS = ["-O2"]
|
||||||
if CONFIG["DEBUG"] == "y":
|
if DEBUG == True:
|
||||||
FLAGS = ["-Wall", "-Werror", "-g"]
|
FLAGS = ["-Wall", "-Werror", "-g", "-DDEBUG"]
|
||||||
|
|
||||||
env = Environment(CCFLAGS = FLAGS + CONFIG["FLAGS"])
|
env = Environment(CCFLAGS = FLAGS)
|
||||||
if ARGUMENTS.get('VERBOSE') != "1":
|
if ARGUMENTS.get('VERBOSE') != "1":
|
||||||
env.Append(CXXCOMSTR = "CXX $TARGET")
|
env.Append(CXXCOMSTR = "CXX $TARGET")
|
||||||
env.Append(LINKCOMSTR = "Linking $TARGET")
|
env.Append(LINKCOMSTR = "Linking $TARGET")
|
||||||
|
@ -31,7 +24,7 @@ def version_h():
|
||||||
line = line.replace("__MAJOR__", str(MAJOR))
|
line = line.replace("__MAJOR__", str(MAJOR))
|
||||||
line = line.replace("__MINOR__", str(MINOR))
|
line = line.replace("__MINOR__", str(MINOR))
|
||||||
line = line.replace("__BUG__", str(BUG))
|
line = line.replace("__BUG__", str(BUG))
|
||||||
line = line.replace("__EXTRA__", CONFIG["EXTRA"])
|
line = line.replace("__EXTRA__", str(EXTRA))
|
||||||
f.write(line)
|
f.write(line)
|
||||||
f.close()
|
f.close()
|
||||||
version_h()
|
version_h()
|
||||||
|
|
Loading…
Reference in New Issue