#
# Makefile to compile the news samples with amake
# (it should work with other make tools)
# Written by Alexis Wilke for Made to Order Software Corp. (c) 2004-2009
#
# Copyright (c) 2004-2009 Made to Order Software Corp.
#
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and
# associated documentation files (the "Software"), to
# deal in the Software without restriction, including
# without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the
# following conditions:
#
# The above copyright notice and this permission notice
# shall be included in all copies or substantial
# portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
# EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

#if system(IRIX)
CFLAGS:=-DIRIX=1 -L/usr/freeware/lib32
#else
CFLAGS:=-DIRIX=0 -I../../include
#endif

MOLIB:=../../lib/libsswf.so
CLIBS:=-L../../lib -lsswf -ljpeg -lz -Wl,-rpath=../../lib


all: simple.swf rotate.swf sprite.swf bounce.swf once.swf morph.swf script.swf

simple: simple.c++ $(MOLIB)
	g++ $(CFLAGS) -o $@ $< $(CLIBS)

simple.swf: simple
	./simple
	

rotate: rotate.c++ $(MOLIB)
	g++ $(CFLAGS) -o $@ $< $(CLIBS)

rotate.swf: rotate
	./rotate


sprite: sprite.c++ $(MOLIB)
	g++ $(CFLAGS) -o $@ $< $(CLIBS)

sprite.swf: sprite
	./sprite


bounce: bounce.c++ $(MOLIB)
	g++ $(CFLAGS) -o $@ $< $(CLIBS)

bounce.swf: bounce
	./bounce


once: once.c++ $(MOLIB)
	g++ $(CFLAGS) -o $@ $< $(CLIBS)

once.swf: once
	./once


morph: morph.c++ $(MOLIB)
	g++ $(CFLAGS) -o $@ $< $(CLIBS)

morph.swf: morph
	./morph


script: script.c++ $(MOLIB)
	g++ $(CFLAGS) -o $@ $< $(CLIBS)

script.swf: script
	./script


clean:
	rm -f simple simple.swf rotate rotate.swf sprite sprite.swf \
		bounce bounce.swf once once.swf morph morph.swf \
		script script.swf

