#
# Makefile to compile OL2TP
#

include ../../makefile.envars

CHECKOUT_PREFIX ?= svn://svn.atc.amit.com.tw
COMPO_URL := $(CHECKOUT_PREFIX)/Sahara/ODHCP20175/trunk
COMPO_REV := -r 33
COMPO_DIR := $(COMPO_BASE)/open_src/ODHCP20175

include ../../makefile.compo
include ../../makefile.install

#to broadcast the DHCP REPLY( OFFER & ACK ) message,because the br0 interface can't send message correctly at kernel 2.4.18 when we switch the interface from wlan0 to eth0 (Set AMIT_BROADCAST_DHCP_REPLY=1 )

AMIT_BROADCAST_DHCP_REPLY=1;

ifeq ($(BIG_ENDIAN),1)
ENDIAN := -b
else
ENDIAN :=
endif

build:
	make -C $(COMPO_DIR) AMIT_BROADCAST_DHCP_REPLY=$(AMIT_BROADCAST_DHCP_REPLY)
ifdef FULL_COPY
	${PRIV_TOOLS}/bin/mkuo ${COMPO_DIR}/src/samples/udhcpd.conf ${COMPO_DIR}/src/samples/udhcpd.conf.uo $(ENDIAN)
endif
	
install: INSTALL.copy_ODHCP20175


clean:
	make -C $(COMPO_DIR) clean
	-rm -f $(COMPO_DIR)/*.uo
copying:
