#/*********************************************************************************
# *  SuperWaba Virtual Machine, version 5                                         *
# *  Copyright (C) 2000-2005 SuperWaba Ltda.                                      *
# *  All Rights Reserved                                                          *
# *                                                                               *
# *  This library and virtual machine is distributed in the hope that it will     *
# *  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of    *
# *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                         *
# *                                                                               *
# *  Please see the software license located at /license.txt for more details.    *
# *                                                                               *
# *  You should have received a copy of the License along with this software;     *
# *  if not, write to                                                             *
# *                                                                               *
# *     SuperWaba Ltda.                                                           *
# *     Rua Padre Leonel Franca, 480, sala 27A                                    *
# *     Instituto Genesis - PUC-RIO                                               *
# *     Rio de Janeiro / RJ - Brazil                                              *
# *     Cep: 22451-000                                                            *
# *     E-mail: licensing@superwaba.com.br                                        *
# *********************************************************************************/

CC = m68k-palmos-gcc
BUILDPRC = build-prc
PILRC = pilrc

CFLAGS = -O2 -Wall -I.
		
all:	Stub.prc

# RCP resources

tAIN03e8.bin: resources.rcp resources.h
	$(PILRC) resources.rcp

tver03e8.bin: resources.rcp resources.h
	$(PILRC) resources.rcp

tFRM03e8.bin: resources.rcp resources.h
	$(PILRC) resources.rcp

tAIB03e8.bin: resources.rcp resources.h
	$(PILRC) resources.rcp

tAIB03e9.bin: resources.rcp resources.h
	$(PILRC) resources.rcp

# Stub palmOS PRC

Stub.prc:	Stub tAIN03e8.bin tver03e8.bin tFRM03e8.bin tAIB03e8.bin tAIB03e9.bin
	$(BUILDPRC) --output Stub.prc --name Stub --creator SW99 \
		tAIN03e8.bin tver03e8.bin tFRM03e8.bin tAIB03e8.bin tAIB03e9.bin Stub 

Stub:	Stub.c resources.h
	$(CC) $(CFLAGS) -o Stub Stub.c

install:	all
	cp Stub.prc ../../../../lib/stubs/palm
	
# Cleaning

clean:
	rm -f -r *.o Stub Stub.prc *.bin
