# DVX GUI  -- Top-level Makefile
#
# Builds the full DVX stack: core library, task switcher,
# bootstrap loader, text help library, widgets, shell, and apps.

.PHONY: all clean core tasks loader texthelp listhelp widgets shell taskmgr serial sql apps tools

all: core tasks loader texthelp listhelp tools widgets shell taskmgr serial sql apps

core:
	$(MAKE) -C core

tasks:
	$(MAKE) -C tasks

loader: core tasks
	$(MAKE) -C loader

texthelp: core tasks
	$(MAKE) -C texthelp

listhelp: core tasks
	$(MAKE) -C listhelp

widgets: core tasks texthelp listhelp
	$(MAKE) -C widgets

shell: core tasks
	$(MAKE) -C shell

taskmgr: shell
	$(MAKE) -C taskmgr

serial: core tasks
	$(MAKE) -C serial

sql: core tasks
	$(MAKE) -C sql

tools:
	$(MAKE) -C tools

apps: core tasks shell tools
	$(MAKE) -C apps

clean:
	$(MAKE) -C core clean
	$(MAKE) -C tasks clean
	$(MAKE) -C loader clean
	$(MAKE) -C texthelp clean
	$(MAKE) -C listhelp clean
	$(MAKE) -C widgets clean
	$(MAKE) -C shell clean
	$(MAKE) -C taskmgr clean
	$(MAKE) -C serial clean
	$(MAKE) -C sql clean
	$(MAKE) -C apps clean
	$(MAKE) -C tools clean
	-rmdir obj 2>/dev/null
	-rm -rf bin/config bin/widgets bin/libs
	-rmdir bin/apps/cpanel bin/apps/imgview bin/apps/progman bin/apps/notepad bin/apps/clock bin/apps/dvxdemo bin/apps bin 2>/dev/null
