#CC = gcc -g -pg -a	# profiling flags
#CC = gcc -O5
CC = gcc -g -Wall

ifeq (${OSTYPE},cygwin32)
EXT=.exe
endif

OFILES = output.o character.o shape.o fill.o matrix.o font.o \
	 block.o cxform.o text.o action.o button.o \
	 outputblock.o method.o sprite.o fontinfo.o loadfont.o \
	 rect.o jpeg.o soundstream.o mp3.o textfield.o browserfont.o #sound.o

all: ${OFILES}

clean:
	rm -f *.o libswf.a test${EXT} *.core core

.c.o: .c .h
	${CC} -c $<

archive:
	tar zcvf libswf.tgz *.c *.h Makefile

libswf: ${OFILES}
	ar r swfblocks.a ${OFILES}

test: libswf test.o
	${CC} test.o -o test${EXT} -L. -lswf -lm

test.o: test.c ${OFILES}
