SOURCE=updatedd-2.6
TARGET=arm-linux
#TARGET=mipsel-linux-uclibc

.PHONY: all clean distclean openSource install
all: openSource
clean:
	make -C $(SOURCE) clean

distclean:
	make -C $(SOURCE) distclean
	rm -f $(SOURCE)/.configured

openSource: $(SOURCE)/.configured
	make CC=$(TARGET)-gcc -C $(SOURCE)

$(SOURCE)/.configured:
	cd $(SOURCE) \
		&& ./configure \
			--host=$(TARGET) \
			CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64'
	touch $(SOURCE)/.configured

install: $(SOURCE)/.configured
	make -C $(SOURCE) install-strip
