CC = ppc-morphos-gcc
STRIP = ppc-morphos-strip

all: thumbnails.library

lib/ffmpeg/objects/.build-stamp:
	$(MAKE) -C lib/ffmpeg build

thumbnails.library: lib/ffmpeg/objects/.build-stamp thumbnails.o
	$(CC) -noixemul -nostartfiles -o $@.db thumbnails.o -Llib/ffmpeg/objects/installdir/lib -lavformat -lavcodec -lswscale -lavutil -lz -ldebug -lm -lmath
	$(STRIP) --strip-unneeded --remove-section=.comment $@.db -o $@

clean:
	rm -rf lib/ffmpeg/objects
	rm -f thumbnails.library thumbnails.library.db

.PHONY: all clean
