#
# Copyright (C) 2009-2021 Alex Smith
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

vars = ['config', 'env']

Import(*vars)
from util import FeatureSources

sources = FeatureSources(config, [
    'loader/kboot.c',

    'console.c',
    'memory.c',
    'platform.c',
])

# Add architecture-specific headers.
env['CPPPATH'] += [Dir('arch/%s/include' % (config['ARCH']))]

# Get architecture-specific sources.
arch_sources = SConscript(dirs = ['arch/' + config['ARCH']], exports = vars)
sources = arch_sources + sources

# Build the final loader binary.
kboot = env.Command(
    env['OUTDIR'].File('kboot.bin'),
    env['KBOOT'],
    Action('$OBJCOPY -O binary --strip-all $SOURCE $TARGET', '$GENCOMSTR'))

Return('sources')

b0450bdd63b452b28a34bd35ed836b2d981a95b3
<mask token>

<mask token>
Import(*vars)
<mask token>
env['CPPPATH'] += [Dir('arch/%s/include' % config['ARCH'])]
<mask token>
Return('sources')

vars = ['config', 'env']
Import(*vars)
<mask token>
sources = FeatureSources(config, ['loader/kboot.c', 'console.c', 'memory.c',
    'platform.c'])
env['CPPPATH'] += [Dir('arch/%s/include' % config['ARCH'])]
arch_sources = SConscript(dirs=['arch/' + config['ARCH']], exports=vars)
sources = arch_sources + sources
kboot = env.Command(env['OUTDIR'].File('kboot.bin'), env['KBOOT'], Action(
    '$OBJCOPY -O binary --strip-all $SOURCE $TARGET', '$GENCOMSTR'))
Return('sources')

vars = ['config', 'env']
Import(*vars)
from util import FeatureSources
sources = FeatureSources(config, ['loader/kboot.c', 'console.c', 'memory.c',
    'platform.c'])
env['CPPPATH'] += [Dir('arch/%s/include' % config['ARCH'])]
arch_sources = SConscript(dirs=['arch/' + config['ARCH']], exports=vars)
sources = arch_sources + sources
kboot = env.Command(env['OUTDIR'].File('kboot.bin'), env['KBOOT'], Action(
    '$OBJCOPY -O binary --strip-all $SOURCE $TARGET', '$GENCOMSTR'))
Return('sources')

#
# Copyright (C) 2009-2021 Alex Smith
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

vars = ['config', 'env']

Import(*vars)
from util import FeatureSources

sources = FeatureSources(config, [
    'loader/kboot.c',

    'console.c',
    'memory.c',
    'platform.c',
])

# Add architecture-specific headers.
env['CPPPATH'] += [Dir('arch/%s/include' % (config['ARCH']))]

# Get architecture-specific sources.
arch_sources = SConscript(dirs = ['arch/' + config['ARCH']], exports = vars)
sources = arch_sources + sources

# Build the final loader binary.
kboot = env.Command(
    env['OUTDIR'].File('kboot.bin'),
    env['KBOOT'],
    Action('$OBJCOPY -O binary --strip-all $SOURCE $TARGET', '$GENCOMSTR'))

Return('sources')
