ifeq ($(CONFIG_USER_PPPD),y)
    SUBDIRS += pppd pppd/plugins
endif

ifeq ($(CONFIG_USER_PPPD_PPPSTATS),y)
    SUBDIRS += pppstats
endif

ifeq ($(CONFIG_USER_PPPD_PPPDUMP),y)
    SUBDIRS += pppdump
endif

#Add CONFIG_USER_PPPD_CHAT for include chat - Ricky Cao on Dec. 24 2008
ifeq ($(CONFIG_USER_PPPD_CHAT),y)
    SUBDIRS += chat
endif

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

romfs:
	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d romfs; done

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
