
# This is the master makefile for VoxBo and the database project

-include make_vars.txt
include make_stuff.txt

# Here are our targets

COMMANDLINEDIRS = fileformats munge stats crunch stand_alone utils resample gdscript scheduler scripts
GUIDIRS = qtglm vbview
VOXBODIRS = $(COMMANDLINEDIRS) $(GUIDIRS)
INSTALLDIRS = $(COMMANDLINEDIRS) $(GUIDIRS)
MAKEDIRS = $(VOXBODIRS)
CLEANDIRS = lib vbwidgets $(MAKEDIRS)

# PHONY declaration makes life easier
.PHONY: clean install lib vbwidgets subdirs db nogui voxbo $(VOXBODIRS)

subdirs: lib $(VOXBODIRS)

nogui: $(COMMANDLINEDIRS)

voxbo: $(VOXBODIRS)

# all targets
$(MAKEDIRS): lib
	+make -C $@

# extra dependencies for specific targets
qtglm: vbwidgets utils
vbview: vbwidgets
client: vbwidgets vbview

lib:
	+make -C $@

vbwidgets:
	+make -C $@

install:
	mkdir -p $(VB_BINDIR)
	+for dir in $(INSTALLDIRS) ; do make -C $$dir install ; done

distclean: clean
	rm -f make_vars.txt

clean:
	+for dir in $(CLEANDIRS) ; do make -C $$dir clean ; done

