# SConscript for Nonpareil
# $Id: SConscript 832 2005-06-26 08:52:47Z eric $
# Copyright 2004, 2005 Eric L. Smith <eric@brouhaha.com>

# Nonpareil is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.  Note that I am not
# granting permission to redistribute or modify Nonpareil under the
# terms of any later version of the General Public License.

# Nonpareil is distributed in the hope that they 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 (in the file "COPYING"); if not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111, USA.

Import('env source_release_dir snapshot_dir')

#-----------------------------------------------------------------------------
# Assemble ROM sources
#-----------------------------------------------------------------------------

asm_srcs = Split ("""35.asm 45.asm 55.asm 80.asm""")

asm_objs = [env.Assemble(src) for src in asm_srcs]

Default (asm_objs)

env.Alias (target = 'install',
           source = env.Install (dir = env ['destdir'] + env ['libdir'],
                                 source = asm_objs))

#-----------------------------------------------------------------------------
# source tarball
#-----------------------------------------------------------------------------

dist_files = ['SConscript'] + asm_srcs

env.Distribute (source_release_dir, dist_files)

env.Distribute (snapshot_dir, dist_files)

#-----------------------------------------------------------------------------
# Windows distribution ZIP file
#-----------------------------------------------------------------------------

if env ['target'] == 'win32':
    Import ('win32_bin_dist_dir')
    Install (win32_bin_dist_dir, asm_objs)
