include $(ROOTDIR)/.config
include $(ROOTDIR)/BaseVar.mk
.PHONY: all build clean distclean 
SRCDIR=$(CURDIR)/libnfnetlink-1.0.0
all:configure build
configure:
	if [ ! -d "$(SRCDIR)" ]; then \
		tar -jxvf libnfnetlink-1.0.0.tar.bz2; \
	fi
	cd $(SRCDIR); \
	find | xargs touch; \
	CFLAGS=-DTBS_FLUSH_CONNTRACK_OTHER ./configure --prefix=$(TMPDISTDIR) --host=${TARGET};
	touch configure
build:
	make -C $(SRCDIR) all install

clean:
	cd $(SRCDIR); \
	make clean
distclean:	
	cd $(CURDIR); \
	rm -rf configure libnfnetlink-1.0.0
	
install:
	cp -Pf $(TMPDISTDIR)/lib/libnfnetlink.so* $(FSROOT)/lib
