Browse Source

wscript: move build env setup to main wscript

pull/2/head
Alibek Omarov 6 years ago
parent
commit
17f719558c
  1. 4
      engine/wscript
  2. 4
      game_launch/wscript
  3. 2
      mainui
  4. 6
      public/wscript
  5. 9
      ref_gl/wscript
  6. 4
      vgui_support/wscript
  7. 2
      wscript

4
engine/wscript

@ -4,7 +4,6 @@
from waflib import Logs from waflib import Logs
import os import os
from fwgslib import get_subproject_name
top = '.' top = '.'
@ -49,9 +48,6 @@ def configure(conf):
conf.env.append_unique('DEFINES', 'DBGHELP') conf.env.append_unique('DEFINES', 'DBGHELP')
def build(bld): def build(bld):
bld.load_envs()
bld.env = bld.all_envs[get_subproject_name(bld)]
libs = [ 'public' ] libs = [ 'public' ]
source = bld.path.ant_glob([ source = bld.path.ant_glob([
'common/*.c', 'common/*.c',

4
game_launch/wscript

@ -5,7 +5,6 @@
from waflib import Logs from waflib import Logs
import os import os
import sys import sys
from fwgslib import get_subproject_name
top = '.' top = '.'
@ -17,9 +16,6 @@ def configure(conf):
conf.load('winres') conf.load('winres')
def build(bld): def build(bld):
bld.load_envs()
bld.env = bld.all_envs[get_subproject_name(bld)]
source = ['game.cpp'] source = ['game.cpp']
includes = '. ../common' includes = '. ../common'
libs = [] libs = []

2
mainui

@ -1 +1 @@
Subproject commit f2a54fcb5465d4e3902004228918586aa54e5f47 Subproject commit cfa77685072cb5b6789de185b4512d654584d8e1

6
public/wscript

@ -17,17 +17,13 @@ def configure(conf):
return return
def build(bld): def build(bld):
bld.load_envs()
name = get_subproject_name(bld)
bld.env = bld.all_envs[name]
source = bld.path.ant_glob(['*.c']) source = bld.path.ant_glob(['*.c'])
libs = [] libs = []
includes = [ '.', '../common', '../engine' ] includes = [ '.', '../common', '../engine' ]
bld.stlib( bld.stlib(
source = source, source = source,
target = name, target = 'public',
features = 'c', features = 'c',
includes = includes, includes = includes,
use = libs, use = libs,

9
ref_gl/wscript

@ -23,13 +23,6 @@ def configure(conf):
conf.env.append_unique('DEFINES', 'REF_DLL') conf.env.append_unique('DEFINES', 'REF_DLL')
def build(bld): def build(bld):
if bld.env.DEDICATED:
return
bld.load_envs()
name = get_subproject_name(bld)
bld.env = bld.all_envs[name]
libs = [ 'public', 'M' ] libs = [ 'public', 'M' ]
source = bld.path.ant_glob(['*.c']) source = bld.path.ant_glob(['*.c'])
@ -45,7 +38,7 @@ def build(bld):
bld.shlib( bld.shlib(
source = source, source = source,
target = name, target = 'ref_gl',
features = 'c', features = 'c',
includes = includes, includes = includes,
use = libs, use = libs,

4
vgui_support/wscript

@ -4,7 +4,6 @@
from waflib import Logs from waflib import Logs
import os import os
from fwgslib import get_subproject_name
top = '.' top = '.'
@ -74,9 +73,6 @@ def configure(conf):
conf.fatal("Can't compile simple program. Check your path to vgui-dev repository.") conf.fatal("Can't compile simple program. Check your path to vgui-dev repository.")
def build(bld): def build(bld):
bld.load_envs()
bld.env = bld.all_envs[get_subproject_name(bld)]
if bld.env.NO_VGUI: if bld.env.NO_VGUI:
return return

2
wscript

@ -198,6 +198,7 @@ def configure(conf):
conf.setenv('') conf.setenv('')
def build(bld): def build(bld):
bld.load_envs()
for i in SUBDIRS: for i in SUBDIRS:
if bld.env.SINGLE_BINARY and i.singlebin: if bld.env.SINGLE_BINARY and i.singlebin:
continue continue
@ -208,4 +209,5 @@ def build(bld):
if i.ignore: if i.ignore:
continue continue
bld.env = bld.all_envs[i.name]
bld.recurse(i.name) bld.recurse(i.name)

Loading…
Cancel
Save