include $(ROOTDIR)/.config
include $(ROOTDIR)/BaseVar.mk
.PHONY: all build clean distclean 
SRCDIR=$(CURDIR)/bing_src-1.1.3
all: build
CFLAGS=-Os

export CFLAGS
configure:
	cd $(SRCDIR); \
	find  | xargs touch;\
	if [ ! -f configure ]; then \
	  autoconf; \
	fi; \
	./configure --prefix=$(TMPDISTDIR) --host=$(TARGET) --with-linux-headers=$(KERNEL_DIR)/include/;
	touch configure
build:
	make -C $(SRCDIR) all
	#CFLAGS=${CFLAGS}; 

clean:
	cd $(SRCDIR); \
	make clean
distclean:	
	cd $(SRCDIR); \
	make distclean; 
	rm -f configure
	
install:
	cp $(SRCDIR)/bing $(FSROOT)/sbin/bing
	$(STRIP) $(FSROOT)/sbin/bing

