#CONFIG_CROSS_COMPILER_PATH=/opt/toolchain/bin
#CROSS_COMPILE   = arm-linux-uclibc-

#export LIBS=-L$(OPENSOURCE_DIR)/termcap -ltermcap

#LDFLAGS+= -L$(OPENSOURCE_DIR)/termcap -ltermcap
CONFOPTS= --build=i686-linux \
	--host=arm-linux \
	--with-ldap=no\
	--enable-static=yes \
	--enable-shared=no \
	--enable-shared-libs=no \
	--with-configdir=/etc \
	 -with-ads=no \
	--with-static-modules=smbclient \
	--disable-largefile    \
        --enable-swat=no \
        --enable-cups=no \
        --enable-iprint=no \
        --enable-pie=no \
        --enable-fam=no \
        --enable-dnssd=no \
	--enable-avahi=no \
	--with-cifsmount=no \
	--with-cifsupcall=no \
        --with-utmp=no \
	--with-libmsrpc=no \
        --with-libtalloc=no \
        --with-libtdb=no \
        --with-libnetapi=no \
        --with-libaddns=no \
        --with-libsmbclient=no \
        --with-libsmbsharemodes=no \
        --with-acl-support=no \
        --with-winbind=no \
	--with-sys-quotas=no \
	--with-quotas=no \
	--with-included-popt=no \
	--with-included-iniparser=no \
	--with-python=no \
	--with-cluster-support=no 
#--without-random 

all: config
	make -f Makefile

config:
	CC=$(CONFIG_TOOLCHAIN_PATH)/$(CROSS_COMPILE)gcc \
	LD=$(CONFIG_TOOLCHAIN_PATH)/$(CROSS_COMPILE)ld \
	./configure $(CONFOPTS)
#	CC=$(CONFIG_CROSS_COMPILER_PATH)/$(CROSS_COMPILE)gcc \
#	LD=$(CONFIG_CROSS_COMPILER_PATH)/$(CROSS_COMPILE)ld \
#	STRIP=$(CONFIG_CROSS_COMPILER_PATH)/$(CROSS_COMPILE)strip \
#	./configure $(CONFOPTS)

clean:
	@if test  -f "Makefile"; then \
                make -f Makefile clean \
        else :; fi
install:
#	cp $(OPENSOURCE_DIR)/tnftp/src/ftp $(RAMDISK_ROOT)/bin/tnftp
all-recursive: Makefile
	make -f Makefile all-recursive
all-am: Makefile
	make -f Makefile all-am
clean-am: Makefile
	make -f Makefile clean-am
distclean: Makefile
	make -f Makefile distclean
realdistclean:Makefile
	make -f Makefile realdistclean
am--refresh: Makefile
	make -f Makefile am--refresh
