File wla-dx.spec of Package wla-dx

#
# spec file for package spec (Version 2.0)
#
# Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#

# norootforbuild

Name:         wla-dx
License:      GPL
Group:        unsorted
Autoreqprov:  on
Version:      9.4a
Release:      0
Summary:      Multi-Platform Cross-Assembler Package
Source:       wla_dx_%version.tar.gz
#Patch:        patch.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Features:
 *  Fast
 *  SNES support
 *  SMS/GG support
 *  Gameboy support
 *  PC-Engine support
 *  NO$GMB symbol file writing
 *  Support for object and library files
 *  You can patch ROM images with code
 *  WLA GB-Z80 disassembler included
 *  Numerous ways to comment code away
 *  ROM image and program file compiling
 *  Multilevel macros (actually, functions)

Compiles code for the following CPUs:
 *  6502 (NES, etc.)
 *  65C02 (VIC-20, etc.)
 *  6510 (C64, etc.)
 *  65816 (SNES, etc.)
 *  GB-Z80 (Game Boy)
 *  HuC6280 (PC-Engine)
 *  SPC-700 (SNES sound chip)
 *  Z80 (GG, SMS, MSX, Spectrum, TI86, etc.)

%prep
%setup -n wla_dx_9.4
#%patch

%build
export CFLAGS="$RPM_OPT_FLAGS -ansi -c"
export MAKE="make %{?jobs:-j%jobs} -e"
export LD=gcc

cd opcode_table_generator
./create_tables.sh
cd ..

cd wlab
cp makefile.unix makefile
make
cp wlab ../binaries
make clean
cd ..

cd wlad
cp makefile.unix makefile
make
cp wlad ../binaries
make clean
cd ..

echo
echo "****************************************************************"
echo "*                  compiling WLA binaries                      *"
echo "****************************************************************"
echo

make clean
cp makefiles/makefile.unix.gb makefile
make
cp wla-gb binaries

make clean
cp makefiles/makefile.unix.z80 makefile
make
cp wla-z80 binaries

make clean
cp makefiles/makefile.unix.6502 makefile
make
cp wla-6502 binaries

make clean
cp makefiles/makefile.unix.65c02 makefile
make
cp wla-65c02 binaries

make clean
cp makefiles/makefile.unix.6510 makefile
make
cp wla-6510 binaries

make clean
cp makefiles/makefile.unix.65816 makefile
make
cp wla-65816 binaries

make clean
cp makefiles/makefile.unix.spc700 makefile
make
cp wla-spc700 binaries

make clean
cp makefiles/makefile.unix.huc6280 makefile
make
cp wla-huc6280 binaries

make clean

echo
echo "****************************************************************"
echo "*                    compiling WLALINK                         *"
echo "****************************************************************"
echo

cd wlalink
cp makefile.unix makefile
make
cp wlalink ../binaries
make clean
cd ..

echo
echo "****************************************************************"
echo "*        all done! check ./binaries/ for the results           *"
echo "****************************************************************"
echo

%install
install -d -m 755 $RPM_BUILD_ROOT/usr/bin
install -m 755 binaries/* $RPM_BUILD_ROOT/usr/bin

%files
%defattr(-,root,root)
%doc README SCOPTIONS CHANGELOG INSTALL TODO examples txt/*.txt txt/opcodes/mnemonics_*.txt
/usr/bin/*
openSUSE Build Service is sponsored by