move source files to "src" subdirectory
This commit is contained in:
1 parent
0579235c93
commit
cd1e26318a
14 files changed
+3
-7
No files matched your search
+3
-7
@@ -37,18 +37,14 @@ env.Append(CCFLAGS = ['-O2', '-Wall'])
|
||||
if DEBUG:
|
||||
env.Append(CCFLAGS = ['-g'])
|
||||
|
||||
sources = [Glob('*.cc')]
|
||||
if not os.path.exists('ag_lua.cc'):
|
||||
sources.append('ag_lua.cc')
|
||||
if not os.path.exists('sdl_keymap.cc'):
|
||||
sources.append('sdl_keymap.cc')
|
||||
sources = [Glob('src/*.cc'), 'ag_lua.cc', 'sdl_keymap.cc']
|
||||
for sd in subdirs:
|
||||
sources += [Glob(sd + '/*.c'), Glob(sd + '/*.cc')]
|
||||
|
||||
def F2C(target, source, env):
|
||||
f = open(str(target[0]), 'w')
|
||||
for s in source:
|
||||
c_name = re.sub(r'\W', '_', str(s))
|
||||
c_name = re.sub(r'\W', '_', str(s).split('/')[-1])
|
||||
f.write('unsigned char %s[] = {' % c_name)
|
||||
src = open(str(s), 'r')
|
||||
s_len = 0
|
||||
@@ -76,7 +72,7 @@ def bt(cmd):
|
||||
env.Append(BUILDERS = {'SDLKeymap' : Builder(action = SDLKeymap)})
|
||||
env.Append(BUILDERS = {'F2C' : Builder(action = F2C)})
|
||||
|
||||
env.F2C('ag_lua.cc', 'ag.lua')
|
||||
env.F2C('ag_lua.cc', 'src/ag.lua')
|
||||
env.SDLKeymap('sdl_keymap.cc', 'gen-sdl-keymap.pl')
|
||||
env.Program(target, sources)
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user