include ../../arch.mk
include ../../path.mk
include $(TOPDIR)/.config

KERNEL_SRC=$(KERNELDIR)
HOST=$(HOST_TYPE)
ARCH=$(HOST_CPU)

all:mkstart nas mkend

mkstart:
	$(Q)if [ ! -f ./.configured ]; then make configure; fi;

mkend:
	$(Q)touch ./.configured;

configure:
	HOST=$(HOST) ./ntfs-3g.config.sh 

nas:
	CROSS_COMPILE=$(CROSS_COMPILE) make -C ./ntfs-3g
	$(STRIP) ntfs-3g/src/ntfs-3g

install:
	$(Q)cp -f ntfs-3g/src/ntfs-3g                        $(TARGET)/sbin/. 
	$(Q)chmod 777 $(TARGET)/sbin/ntfs-3g

distclean:
	make -C ./ntfs-3g   distclean

clean:
	make -C ./ntfs-3g   clean
	rm .configured
