#
# .sub_build.base is prepared at check_env time
#
-include .sub_build.base

export LINUXDIR = $(LINUX_DIR)
export PPPD_DIR = $(TOP)/$(APPS_DIR)/src/ppp-2.4.2/pppd






SUBDIRS +=  pppd/plugins/rp-pppoe
SUBDIRS += pppd/plugins pppd
SUBDIRS += chat
SUBDIRS += pppstats
SUBDIRS += pppdump

all: 
	for d in $(SUBDIRS); do make $(MFLAGS) -C $$d all; done

#
# EDX Start
#
make_env:
	$(Q)ln -sf $(ABS_SUB_BUILD_FILE) $(SUB_BUILD_FILE) && \
	for x in $(SUBDIRS); do \
		if [ -f $$x/Makefile ]; then \
			make $(MAKEFLAGS) -C $$x $@ || exit $$?; \
		fi; \
	done

pre_romfs: all
	$(Q)make -C pppd $@
#
# EDX End
#

clean:
	rm -f `find . -name '*.[oas]' -print`
	rm -f `find . -name 'core' -print`
	rm -f `find . -name '*~' -print`
	for d in $(SUBDIRS); do make $(MFLAGS) -C $$d clean; done
