all: conf libjasper.a

conf:
	if [ ! -f Makefile ]; then \
    		CFLAGS="-fPIC" ./configure; \
	fi

libjasper.a: conf
	make

clean:
	if [ ! -f Makefile ]; then \
		make clean; \
		make distclean; \
	fi
